Ghost/ghost/admin/app/components/gh-user-active.js
Kevin Ansfield 5b43350112 Add {{background-image-style}} helper
no issue
- cleans up multiple CPs that were only outputting a background image style
- moves URL decoding/encoding and `htmlSafe` output into one place
2018-05-14 13:04:53 +01:00

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)';
})
});