Skip to content

A platform for community discussion. Free, open, simple.

DEV: reintroduces category-notifications-button.js (#30398)

Joffrey JAFFEUX6e82a63d56df
diff --git a/app/assets/javascripts/select-kit/addon/components/category-notifications-button.js b/app/assets/javascripts/select-kit/addon/components/category-notifications-button.js
new file mode 100644
index 00000000000..12938f1e248
--- /dev/null
+++ b/app/assets/javascripts/select-kit/addon/components/category-notifications-button.js
@@ -0,0 +1,15 @@
+import { readOnly } from "@ember/object/computed";
+import { classNames } from "@ember-decorators/component";
+import { i18n } from "discourse-i18n";
+import NotificationOptionsComponent from "select-kit/components/notifications-button";
+import { pluginApiIdentifiers, selectKitOptions } from "./select-kit";
+@selectKitOptions({
+ i18nPrefix: "category.notifications",
+ showFullTitle: false,
+ headerAriaLabel: i18n("category.notifications.title"),
+})
+@pluginApiIdentifiers(["category-notifications-button"])
+@classNames("category-notifications-button")
+export default class CategoryNotificationsButton extends NotificationOptionsComponent {
+ @readOnly("category.deleted") isHidden;
+}