DEV: Convert to native class syntax (#611)

This commit is contained in:
David Taylor 2024-11-29 15:41:13 +00:00 committed by GitHub
parent 935e7ac7df
commit 67d9b1c1d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 14 additions and 12 deletions

View File

@ -1,17 +1,19 @@
import { action } from "@ember/object"; import { action } from "@ember/object";
import { classNames } from "@ember-decorators/component";
import I18n from "I18n"; import I18n from "I18n";
import DropdownSelectBoxComponent from "select-kit/components/dropdown-select-box"; import DropdownSelectBoxComponent from "select-kit/components/dropdown-select-box";
import { selectKitOptions } from "select-kit/components/select-kit";
export default DropdownSelectBoxComponent.extend({ @selectKitOptions({
classNames: ["assign-actions-dropdown"],
headerIcon: null,
allowInitialValueMutation: false,
showFullTitle: true,
selectKitOptions: {
icon: null, icon: null,
translatedNone: "...", translatedNone: "...",
showFullTitle: true, showFullTitle: true,
}, })
@classNames("assign-actions-dropdown")
export default class AssignActionsDropdown extends DropdownSelectBoxComponent {
headerIcon = null;
allowInitialValueMutation = false;
showFullTitle = true;
computeContent() { computeContent() {
let options = []; let options = [];
@ -49,7 +51,7 @@ export default DropdownSelectBoxComponent.extend({
}); });
} }
return options; return options;
}, }
@action @action
onChange(id) { onChange(id) {
@ -65,5 +67,5 @@ export default DropdownSelectBoxComponent.extend({
if (postId) { if (postId) {
this.unassign(postId, "Post"); this.unassign(postId, "Post");
} }
}, }
}); }