mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
20 lines
508 B
JavaScript
20 lines
508 B
JavaScript
import computed from 'ember-addons/ember-computed-decorators';
|
|
|
|
export default Ember.Component.extend({
|
|
composer: Ember.inject.controller(),
|
|
|
|
@computed('composer.presenceUsers', 'currentUser.id')
|
|
users(presenceUsers, currentUser_id){
|
|
return (presenceUsers || []).filter(user => user.id !== currentUser_id);
|
|
},
|
|
|
|
@computed('composer.presenceState.action')
|
|
isReply(action){
|
|
return action === 'reply';
|
|
},
|
|
|
|
@computed('users.length')
|
|
shouldDisplay(length){
|
|
return length > 0;
|
|
}
|
|
});
|