mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 07:09:48 +03:00
1f87c59055
no issue - moved `primaryTag` CP into the post model as per `primaryAuthor` - removed all unnecessary or unused CPs in the component's backing class - switched to using `@post` for direct argument access rather than `this.post`
17 lines
478 B
JavaScript
17 lines
478 B
JavaScript
import Component from '@ember/component';
|
|
import {computed} from '@ember/object';
|
|
import {inject as service} from '@ember/service';
|
|
|
|
export default Component.extend({
|
|
session: service(),
|
|
|
|
tagName: 'li',
|
|
classNames: ['gh-list-row', 'gh-posts-list-item'],
|
|
|
|
authorNames: computed('post.authors.[]', function () {
|
|
let authors = this.get('post.authors');
|
|
|
|
return authors.map(author => author.get('name') || author.get('email')).join(', ');
|
|
})
|
|
});
|