mirror of
https://github.com/discourse/discourse.git
synced 2025-02-06 04:34:59 +08:00
21 lines
559 B
JavaScript
21 lines
559 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')
|
|
_triggerRerender() {
|
|
this.queueRerender();
|
|
},
|
|
|
|
didInsertElement() {
|
|
this._super();
|
|
this.dispatch('topic-notifications-button:keyboard-trigger', 'topic-notifications-button');
|
|
}
|
|
});
|