1
0
mirror of https://github.com/flarum/core.git synced 2025-07-24 18:21:33 +02:00

Added user online indicator to post

This commit is contained in:
Peter Mein
2015-12-16 13:43:46 +01:00
parent 79c1fdf5db
commit 2e110b6ccb
3 changed files with 24 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
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('circle')}</span>;
}
}