2020-02-03 21:22:14 +08:00
|
|
|
import { computed } from "@ember/object";
|
2024-08-23 19:17:07 +08:00
|
|
|
import { classNames } from "@ember-decorators/component";
|
2017-10-20 03:51:08 +08:00
|
|
|
import { topicLevels } from "discourse/lib/notification-levels";
|
2023-10-11 02:38:59 +08:00
|
|
|
import NotificationsButtonComponent from "select-kit/components/notifications-button";
|
2024-08-23 19:17:07 +08:00
|
|
|
import {
|
|
|
|
pluginApiIdentifiers,
|
|
|
|
selectKitOptions,
|
|
|
|
} from "select-kit/components/select-kit";
|
2017-10-20 03:51:08 +08:00
|
|
|
|
2024-08-23 19:17:07 +08:00
|
|
|
@classNames("topic-notifications-options")
|
|
|
|
@selectKitOptions({
|
|
|
|
i18nPrefix: "topic.notifications",
|
|
|
|
i18nPostfix: "i18nPostfix",
|
|
|
|
showCaret: true,
|
|
|
|
})
|
|
|
|
@pluginApiIdentifiers("topic-notifications-options")
|
|
|
|
export default class TopicNotificationsOptions extends NotificationsButtonComponent {
|
|
|
|
content = topicLevels;
|
2017-10-20 03:51:08 +08:00
|
|
|
|
2024-08-23 19:17:07 +08:00
|
|
|
@computed("topic.archetype")
|
|
|
|
get i18nPostfix() {
|
2020-02-03 21:22:14 +08:00
|
|
|
return this.topic.archetype === "private_message" ? "_pm" : "";
|
2024-08-23 19:17:07 +08:00
|
|
|
}
|
|
|
|
}
|