2019-10-23 12:30:52 -04:00
|
|
|
import Component from "@ember/component";
|
2020-04-28 20:12:16 +02:00
|
|
|
import { action } from "@ember/object";
|
2020-02-03 14:22:14 +01:00
|
|
|
|
2019-10-23 12:30:52 -04:00
|
|
|
export default Component.extend({
|
2017-11-21 11:53:09 +01:00
|
|
|
layoutName: "select-kit/templates/components/topic-notifications-button",
|
2020-02-03 14:22:14 +01:00
|
|
|
classNames: ["topic-notifications-button"],
|
|
|
|
appendReason: true,
|
2017-10-19 12:51:08 -07:00
|
|
|
showFullTitle: true,
|
2020-02-21 21:32:58 +01:00
|
|
|
placement: "bottom-start",
|
2020-04-28 20:12:16 +02:00
|
|
|
notificationLevel: null,
|
|
|
|
topic: null,
|
2020-02-03 14:22:14 +01:00
|
|
|
|
2020-04-28 20:12:16 +02:00
|
|
|
@action
|
|
|
|
changeTopicNotificationLevel(levelId) {
|
|
|
|
if (levelId !== this.notificationLevel) {
|
|
|
|
this.topic.details.updateNotifications(levelId);
|
2020-02-03 14:22:14 +01:00
|
|
|
}
|
|
|
|
}
|
2017-10-19 12:51:08 -07:00
|
|
|
});
|