2017-08-22 10:53:26 +03:00
|
|
|
import Component from '@ember/component';
|
|
|
|
import {computed} from '@ember/object';
|
2017-10-30 12:38:01 +03:00
|
|
|
import {inject as service} from '@ember/service';
|
2016-06-30 21:14:25 +03:00
|
|
|
|
2017-01-25 23:05:28 +03:00
|
|
|
export default Component.extend({
|
2019-11-26 15:20:49 +03:00
|
|
|
session: service(),
|
2017-07-13 12:55:13 +03:00
|
|
|
|
2015-06-13 17:34:09 +03:00
|
|
|
tagName: 'li',
|
2019-06-18 13:47:21 +03:00
|
|
|
classNames: ['gh-list-row', 'gh-posts-list-item'],
|
2014-03-02 18:30:35 +04:00
|
|
|
|
2018-03-13 14:17:29 +03:00
|
|
|
authorNames: computed('post.authors.[]', function () {
|
|
|
|
let authors = this.get('post.authors');
|
2015-06-13 17:34:09 +03:00
|
|
|
|
2018-03-13 14:17:29 +03:00
|
|
|
return authors.map(author => author.get('name') || author.get('email')).join(', ');
|
2019-08-27 12:42:27 +03:00
|
|
|
})
|
2014-03-04 00:18:10 +04:00
|
|
|
});
|