2017-08-22 10:53:26 +03:00
|
|
|
import Component from '@ember/component';
|
2017-04-05 20:45:35 +03:00
|
|
|
import moment from 'moment';
|
2017-08-22 10:53:26 +03:00
|
|
|
import {computed} from '@ember/object';
|
2017-01-04 18:52:00 +03:00
|
|
|
|
2015-10-28 14:36:45 +03:00
|
|
|
export default Component.extend({
|
2015-06-13 17:34:09 +03:00
|
|
|
tagName: '',
|
|
|
|
|
|
|
|
user: null,
|
|
|
|
|
2016-06-14 11:11:59 +03:00
|
|
|
lastLoginUTC: computed('user.lastLoginUTC', function () {
|
|
|
|
let lastLoginUTC = this.get('user.lastLoginUTC');
|
2015-06-13 17:34:09 +03:00
|
|
|
|
2016-06-14 11:11:59 +03:00
|
|
|
return lastLoginUTC ? moment(lastLoginUTC).fromNow() : '(Never)';
|
2015-06-13 17:34:09 +03:00
|
|
|
})
|
|
|
|
});
|