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
2017-05-17 21:42:31 +08:00

21 lines
548 B
JavaScript

import MountWidget from 'discourse/components/mount-widget';
import { observes } from 'ember-addons/ember-computed-decorators';
export default MountWidget.extend({
widget: 'topic-notifications-button',
buildArgs() {
return { topic: this.get('topic'), appendReason: true, showFullTitle: true };
},
@observes('topic.details.notification_level')
_queueRerender() {
this.queueRerender();
},
didInsertElement() {
this._super();
this.dispatch('topic-notifications-button:changed', 'topic-notifications-button');
}
});