mirror of
https://github.com/discourse/discourse.git
synced 2024-12-11 20:03:42 +08:00
d1cc60c435
Changes made using the ember-native-class-codemod, plus some manual tweaks
25 lines
793 B
JavaScript
25 lines
793 B
JavaScript
import { computed } from "@ember/object";
|
|
import { classNames } from "@ember-decorators/component";
|
|
import { topicLevels } from "discourse/lib/notification-levels";
|
|
import NotificationsButtonComponent from "select-kit/components/notifications-button";
|
|
import {
|
|
pluginApiIdentifiers,
|
|
selectKitOptions,
|
|
} from "select-kit/components/select-kit";
|
|
|
|
@classNames("topic-notifications-options")
|
|
@selectKitOptions({
|
|
i18nPrefix: "topic.notifications",
|
|
i18nPostfix: "i18nPostfix",
|
|
showCaret: true,
|
|
})
|
|
@pluginApiIdentifiers("topic-notifications-options")
|
|
export default class TopicNotificationsOptions extends NotificationsButtonComponent {
|
|
content = topicLevels;
|
|
|
|
@computed("topic.archetype")
|
|
get i18nPostfix() {
|
|
return this.topic.archetype === "private_message" ? "_pm" : "";
|
|
}
|
|
}
|