mirror of
https://github.com/discourse/discourse.git
synced 2025-02-27 02:19:39 +08:00
21 lines
757 B
JavaScript
21 lines
757 B
JavaScript
import NotificationsButton from 'discourse/views/notifications-button';
|
|
|
|
export default NotificationsButton.extend({
|
|
longDescriptionBinding: 'topic.details.notificationReasonText',
|
|
topic: Em.computed.alias('controller.model'),
|
|
target: Em.computed.alias('topic'),
|
|
hidden: Em.computed.alias('topic.deleted'),
|
|
notificationLevels: Discourse.Topic.NotificationLevel,
|
|
notificationLevel: Em.computed.alias('topic.details.notification_level'),
|
|
isPrivateMessage: Em.computed.alias('topic.isPrivateMessage'),
|
|
i18nPrefix: 'topic.notifications',
|
|
|
|
i18nPostfix: function() {
|
|
return this.get('isPrivateMessage') ? '_pm' : '';
|
|
}.property('isPrivateMessage'),
|
|
|
|
clicked: function(id) {
|
|
this.get('topic.details').updateNotifications(id);
|
|
}
|
|
});
|