discourse/app/assets/javascripts/select-kit/addon/components/topic-notifications-options.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
793 B
JavaScript
Raw Normal View History

import { computed } from "@ember/object";
import { classNames } from "@ember-decorators/component";
2017-10-20 03:51:08 +08:00
import { topicLevels } from "discourse/lib/notification-levels";
import NotificationsButtonComponent from "select-kit/components/notifications-button";
import {
pluginApiIdentifiers,
selectKitOptions,
} from "select-kit/components/select-kit";
2017-10-20 03:51:08 +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
@computed("topic.archetype")
get i18nPostfix() {
return this.topic.archetype === "private_message" ? "_pm" : "";
}
}