mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 06:28:11 +08:00
DEV: Convert select-kit subclasses to native class syntax (#28491)
This covers all select-kit subclasses in core and core plugins Followup to https://github.com/discourse/discourse/pull/28489
This commit is contained in:
@ -1,14 +1,17 @@
|
||||
import { classNames } from "@ember-decorators/component";
|
||||
import ComboBoxComponent from "select-kit/components/combo-box";
|
||||
import {
|
||||
pluginApiIdentifiers,
|
||||
selectKitOptions,
|
||||
} from "select-kit/components/select-kit";
|
||||
|
||||
export default ComboBoxComponent.extend({
|
||||
pluginApiIdentifiers: ["chat-channel-chooser"],
|
||||
classNames: ["chat-channel-chooser"],
|
||||
|
||||
selectKitOptions: {
|
||||
headerComponent: "chat-channel-chooser-header",
|
||||
},
|
||||
|
||||
@classNames("chat-channel-chooser")
|
||||
@selectKitOptions({
|
||||
headerComponent: "chat-channel-chooser-header",
|
||||
})
|
||||
@pluginApiIdentifiers("chat-channel-chooser")
|
||||
export default class ChatChannelChooser extends ComboBoxComponent {
|
||||
modifyComponentForRow() {
|
||||
return "chat-channel-chooser-row";
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1,14 +1,18 @@
|
||||
import { classNames } from "@ember-decorators/component";
|
||||
import NotificationsButtonComponent from "select-kit/components/notifications-button";
|
||||
import {
|
||||
pluginApiIdentifiers,
|
||||
selectKitOptions,
|
||||
} from "select-kit/components/select-kit";
|
||||
import { threadNotificationButtonLevels } from "discourse/plugins/chat/discourse/lib/chat-notification-levels";
|
||||
|
||||
export default NotificationsButtonComponent.extend({
|
||||
pluginApiIdentifiers: ["thread-notifications-button"],
|
||||
classNames: ["thread-notifications-button"],
|
||||
content: threadNotificationButtonLevels,
|
||||
|
||||
selectKitOptions: {
|
||||
i18nPrefix: "chat.thread.notifications",
|
||||
showFullTitle: false,
|
||||
btnCustomClasses: "btn-flat",
|
||||
},
|
||||
});
|
||||
@classNames("thread-notifications-button")
|
||||
@selectKitOptions({
|
||||
i18nPrefix: "chat.thread.notifications",
|
||||
showFullTitle: false,
|
||||
btnCustomClasses: "btn-flat",
|
||||
})
|
||||
@pluginApiIdentifiers("thread-notifications-button")
|
||||
export default class ChatThreadTrackingDropdown extends NotificationsButtonComponent {
|
||||
content = threadNotificationButtonLevels;
|
||||
}
|
||||
|
@ -1,14 +1,18 @@
|
||||
import { classNames } from "@ember-decorators/component";
|
||||
import NotificationsButtonComponent from "select-kit/components/notifications-button";
|
||||
import {
|
||||
pluginApiIdentifiers,
|
||||
selectKitOptions,
|
||||
} from "select-kit/components/select-kit";
|
||||
import { threadNotificationButtonLevels } from "discourse/plugins/chat/discourse/lib/chat-notification-levels";
|
||||
|
||||
export default NotificationsButtonComponent.extend({
|
||||
pluginApiIdentifiers: ["thread-notifications-button"],
|
||||
classNames: ["thread-notifications-button"],
|
||||
content: threadNotificationButtonLevels,
|
||||
|
||||
selectKitOptions: {
|
||||
i18nPrefix: "chat.thread.notifications",
|
||||
showFullTitle: false,
|
||||
btnCustomClasses: "btn-flat",
|
||||
},
|
||||
});
|
||||
@classNames("thread-notifications-button")
|
||||
@selectKitOptions({
|
||||
i18nPrefix: "chat.thread.notifications",
|
||||
showFullTitle: false,
|
||||
btnCustomClasses: "btn-flat",
|
||||
})
|
||||
@pluginApiIdentifiers("thread-notifications-button")
|
||||
export default class ThreadNotificationsButton extends NotificationsButtonComponent {
|
||||
content = threadNotificationButtonLevels;
|
||||
}
|
||||
|
Reference in New Issue
Block a user