From 6e82a63d56dfc07ed3042cb6ea5bf255523b4acf Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Fri, 20 Dec 2024 16:08:21 +0100 Subject: [PATCH] DEV: reintroduces category-notifications-button.js (#30398) This file has been incorrectly removed in https://github.com/discourse/discourse/commit/41df7051883dca8404c38e151294058ec8525b83 while it's still being used by plugins (https://github.com/discourse/discourse-circles). --- .../components/category-notifications-button.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 app/assets/javascripts/select-kit/addon/components/category-notifications-button.js 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; +}