mirror of
https://github.com/discourse/discourse.git
synced 2025-03-01 19:48:40 +08:00

`discourse-common` was created in the past to share logic between the 'wizard' app and the main 'discourse' app. Since then, the wizard has been consolidated into the main app, so the separation of `discourse-common` is no longer useful. This commit moves `discourse-common/(lib|utils)/*` into `discourse/lib/*`, adds shims for the imports, and updates existing uses in core.
24 lines
730 B
JavaScript
24 lines
730 B
JavaScript
import { computed } from "@ember/object";
|
|
import { classNames } from "@ember-decorators/component";
|
|
import { makeArray } from "discourse/lib/helpers";
|
|
import MultiSelectComponent from "select-kit/components/multi-select";
|
|
import {
|
|
pluginApiIdentifiers,
|
|
selectKitOptions,
|
|
} from "select-kit/components/select-kit";
|
|
|
|
@classNames("watched-word-input-field")
|
|
@selectKitOptions({
|
|
autoInsertNoneItem: false,
|
|
fullWidthOnMobile: true,
|
|
allowAny: true,
|
|
none: "admin.watched_words.form.words_or_phrases",
|
|
})
|
|
@pluginApiIdentifiers("watched-words")
|
|
export default class WatchedWords extends MultiSelectComponent {
|
|
@computed("value.[]")
|
|
get content() {
|
|
return makeArray(this.value).map((x) => this.defaultItem(x, x));
|
|
}
|
|
}
|