Files
discourse/app/assets/javascripts/select-kit/addon/components/topic-notifications-options.js
Robin Ward 09ca75d17e FIX: select-kit was in the wrong place
`app/` means we want to merge it into our application there. `addon`
means give it its own module namespace, which is what we wanted.
2020-05-20 11:51:49 -04:00

22 lines
658 B
JavaScript

import NotificationsButtonComponent from "select-kit/components/notifications-button";
import { topicLevels } from "discourse/lib/notification-levels";
import { computed } from "@ember/object";
export default NotificationsButtonComponent.extend({
pluginApiIdentifiers: ["topic-notifications-options"],
classNames: ["topic-notifications-options"],
content: topicLevels,
selectKitOptions: {
i18nPrefix: "i18nPrefix",
i18nPostfix: "i18nPostfix",
showCaret: true
},
i18nPrefix: "topic.notifications",
i18nPostfix: computed("topic.archetype", function() {
return this.topic.archetype === "private_message" ? "_pm" : "";
})
});