mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 19:52:01 +03:00
5b43350112
no issue - cleans up multiple CPs that were only outputting a background image style - moves URL decoding/encoding and `htmlSafe` output into one place
16 lines
387 B
JavaScript
16 lines
387 B
JavaScript
import Component from '@ember/component';
|
|
import moment from 'moment';
|
|
import {computed} from '@ember/object';
|
|
|
|
export default Component.extend({
|
|
tagName: '',
|
|
|
|
user: null,
|
|
|
|
lastLoginUTC: computed('user.lastLoginUTC', function () {
|
|
let lastLoginUTC = this.get('user.lastLoginUTC');
|
|
|
|
return lastLoginUTC ? moment(lastLoginUTC).fromNow() : '(Never)';
|
|
})
|
|
});
|