This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/components/topic-notifications-button.js.es6
2015-02-27 10:33:39 -05:00

17 lines
568 B
JavaScript

import NotificationsButton from 'discourse/components/notifications-button';
export default NotificationsButton.extend({
longDescription: Em.computed.alias('topic.details.notificationReasonText'),
hidden: Em.computed.alias('topic.deleted'),
notificationLevel: Em.computed.alias('topic.details.notification_level'),
i18nPrefix: 'topic.notifications',
i18nPostfix: function() {
return this.get('topic.isPrivateMessage') ? '_pm' : '';
}.property('topic.isPrivateMessage'),
clicked(id) {
this.get('topic.details').updateNotifications(id);
}
});