mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
28 lines
770 B
JavaScript
28 lines
770 B
JavaScript
import NotificationOptionsComponent from "discourse/components/notifications-button";
|
|
import computed from "ember-addons/ember-computed-decorators";
|
|
import { iconHTML } from "discourse-common/lib/icon-library";
|
|
|
|
export default NotificationOptionsComponent.extend({
|
|
classNames: ["category-notifications-button"],
|
|
|
|
hidden: Ember.computed.or("category.deleted", "site.isMobileDevice"),
|
|
|
|
i18nPrefix: "category.notifications",
|
|
|
|
value: Em.computed.alias("category.notification_level"),
|
|
|
|
@computed("value")
|
|
icon() {
|
|
return `${this._super()}${iconHTML("caret-down")}`.htmlSafe();
|
|
},
|
|
|
|
generatedHeadertext: null,
|
|
|
|
actions: {
|
|
onSelectRow(content) {
|
|
this._super(content);
|
|
|
|
this.get("category").setNotification(this.get("value"));
|
|
}
|
|
}
|
|
});
|