Ghost/ghost/admin/app/components/gh-members-list-item.js

27 lines
759 B
JavaScript
Raw Normal View History

2019-10-02 06:59:47 +03:00
import Component from '@ember/component';
import moment from 'moment';
import {alias} from '@ember/object/computed';
import {computed} from '@ember/object';
import {inject as service} from '@ember/service';
export default Component.extend({
ghostPaths: service(),
notifications: service(),
router: service(),
tagName: 'li',
classNames: ['gh-list-row'],
2019-10-02 06:59:47 +03:00
active: false,
id: alias('member.id'),
email: alias('member.email'),
2019-10-03 13:56:31 +03:00
name: alias('member.name'),
memberSince: computed('member.createdAt', function () {
return moment(this.member.createdAt).from(moment());
}),
createdDate: computed('member.createdAt', function () {
return moment(this.member.createdAt).format('MMM DD, YYYY');
2019-10-02 06:59:47 +03:00
})
});