1
0
mirror of https://github.com/flarum/core.git synced 2025-05-08 16:35:26 +02:00
php-flarum/js/lib/helpers/userOnline.js
AFR 1a2df2d581 FontAwesome v5.0.6 (#1372)
* Update FontAwesome to v5.0.6

* Adapt DiscussionListItem-count icon to match FontAwesome 5 syntax

* Change icon name to match FontAwesome 5.0.6 fas icon

* Add font type prefix parameter to icon helper

* Add Enable Icon Prefix to show icon in Extension Page

* Fix invalid icon behavior

* Change icon name to match FontAwesome 5.0.6 far icon

* Use iconPrefix property on component

* Use full icon class name

* Update icon helper docblock

* Full icon class syntax
2018-02-23 23:42:00 +01:00

14 lines
343 B
JavaScript

import icon from 'flarum/helpers/icon';
/**
* The `useronline` helper displays a green circle if the user is online
*
* @param {User} user
* @return {Object}
*/
export default function userOnline(user) {
if (user.lastSeenTime() && user.isOnline()) {
return <span className="UserOnline">{icon('fa fa-circle')}</span>;
}
}