mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 11:06:32 +08:00
DEV: Co-locate select-kit component templates (#20779)
This commit is contained in:
parent
69a72015f0
commit
b3e063bc63
|
@ -1,12 +1,10 @@
|
|||
import ComboBoxSelectBoxHeaderComponent from "select-kit/components/combo-box/combo-box-header";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import layout from "select-kit/templates/components/category-drop/category-drop-header";
|
||||
import { readOnly } from "@ember/object/computed";
|
||||
import { schedule } from "@ember/runloop";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
|
||||
export default ComboBoxSelectBoxHeaderComponent.extend({
|
||||
layout,
|
||||
classNames: ["category-drop-header"],
|
||||
classNameBindings: ["categoryStyleClass"],
|
||||
categoryStyleClass: readOnly("site.category_style"),
|
||||
|
|
|
@ -4,12 +4,10 @@ import Category from "discourse/models/category";
|
|||
import SelectKitRowComponent from "select-kit/components/select-kit/select-kit-row";
|
||||
import { categoryBadgeHTML } from "discourse/helpers/category-link";
|
||||
import { computed } from "@ember/object";
|
||||
import layout from "select-kit/templates/components/category-row";
|
||||
import { setting } from "discourse/lib/computed";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
|
||||
export default SelectKitRowComponent.extend({
|
||||
layout,
|
||||
classNames: ["category-row"],
|
||||
hideParentCategory: bool("selectKit.options.hideParentCategory"),
|
||||
allowUncategorized: bool("selectKit.options.allowUncategorized"),
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
import SelectKitRowComponent from "select-kit/components/select-kit/select-kit-row";
|
||||
import { computed } from "@ember/object";
|
||||
import layout from "select-kit/templates/components/color-palettes/color-palettes-row";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
|
||||
export default SelectKitRowComponent.extend({
|
||||
classNames: ["color-palettes-row"],
|
||||
layout,
|
||||
|
||||
palettes: computed("item.colors.[]", function () {
|
||||
return htmlSafe(
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
import { and, reads } from "@ember/object/computed";
|
||||
import SingleSelectHeaderComponent from "select-kit/components/select-kit/single-select-header";
|
||||
import { computed } from "@ember/object";
|
||||
import layout from "select-kit/templates/components/combo-box/combo-box-header";
|
||||
|
||||
export default SingleSelectHeaderComponent.extend({
|
||||
layout,
|
||||
classNames: ["combo-box-header"],
|
||||
clearable: reads("selectKit.options.clearable"),
|
||||
caretUpIcon: reads("selectKit.options.caretUpIcon"),
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
import SelectKitRowComponent from "select-kit/components/select-kit/select-kit-row";
|
||||
import { escapeExpression } from "discourse/lib/utilities";
|
||||
import layout from "select-kit/templates/components/create-color-row";
|
||||
import { schedule } from "@ember/runloop";
|
||||
|
||||
export default SelectKitRowComponent.extend({
|
||||
layout,
|
||||
classNames: ["create-color-row"],
|
||||
|
||||
didReceiveAttrs() {
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
import SingleSelectHeaderComponent from "select-kit/components/select-kit/single-select-header";
|
||||
import { computed } from "@ember/object";
|
||||
import layout from "select-kit/templates/components/dropdown-select-box/dropdown-select-box-header";
|
||||
import { readOnly } from "@ember/object/computed";
|
||||
|
||||
export default SingleSelectHeaderComponent.extend({
|
||||
layout,
|
||||
classNames: ["dropdown-select-box-header"],
|
||||
classNameBindings: ["btnClassName", "btnStyleClass"],
|
||||
showFullTitle: readOnly("selectKit.options.showFullTitle"),
|
||||
|
@ -19,7 +17,6 @@ export default SingleSelectHeaderComponent.extend({
|
|||
}),
|
||||
|
||||
caretUpIcon: readOnly("selectKit.options.caretUpIcon"),
|
||||
|
||||
caretDownIcon: readOnly("selectKit.options.caretDownIcon"),
|
||||
|
||||
caretIcon: computed(
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
import SelectKitRowComponent from "select-kit/components/select-kit/select-kit-row";
|
||||
import layout from "select-kit/templates/components/dropdown-select-box/dropdown-select-box-row";
|
||||
import { readOnly } from "@ember/object/computed";
|
||||
|
||||
export default SelectKitRowComponent.extend({
|
||||
layout,
|
||||
classNames: ["dropdown-select-box-row"],
|
||||
|
||||
description: readOnly("item.description"),
|
||||
});
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import SelectKitRowComponent from "select-kit/components/select-kit/select-kit-row";
|
||||
import layout from "select-kit/templates/components/email-group-user-chooser-row";
|
||||
|
||||
export default SelectKitRowComponent.extend({
|
||||
layout,
|
||||
classNames: ["email-group-user-chooser-row"],
|
||||
});
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import SelectKitRowComponent from "select-kit/components/select-kit/select-kit-row";
|
||||
import layout from "select-kit/templates/components/flair-row";
|
||||
|
||||
export default SelectKitRowComponent.extend({
|
||||
layout,
|
||||
classNames: ["flair-row"],
|
||||
});
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import ComboBoxHeaderComponent from "select-kit/components/combo-box/combo-box-header";
|
||||
import layout from "select-kit/templates/components/future-date-input-selector/future-date-input-selector-header";
|
||||
|
||||
export default ComboBoxHeaderComponent.extend({
|
||||
layout,
|
||||
classNames: "future-date-input-selector-header",
|
||||
});
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import SelectKitRowComponent from "select-kit/components/select-kit/select-kit-row";
|
||||
import layout from "select-kit/templates/components/future-date-input-selector/future-date-input-selector-row";
|
||||
|
||||
export default SelectKitRowComponent.extend({
|
||||
layout,
|
||||
classNames: ["future-date-input-selector-row"],
|
||||
});
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
import ComboBoxSelectBoxHeaderComponent from "select-kit/components/combo-box/combo-box-header";
|
||||
import layout from "select-kit/templates/components/mini-tag-chooser/mini-tag-chooser-header";
|
||||
|
||||
export default ComboBoxSelectBoxHeaderComponent.extend({
|
||||
layout,
|
||||
classNames: ["mini-tag-chooser-header"],
|
||||
});
|
|
@ -1,13 +1,9 @@
|
|||
import { reads } from "@ember/object/computed";
|
||||
import Component from "@ember/component";
|
||||
import { computed } from "@ember/object";
|
||||
import layout from "select-kit/templates/components/mini-tag-chooser/selected-collection";
|
||||
|
||||
export default Component.extend({
|
||||
tagName: "",
|
||||
|
||||
layout,
|
||||
|
||||
selectedTags: reads("collection.content.selectedTags.[]"),
|
||||
|
||||
tags: computed("selectedTags.[]", "selectKit.filter", function () {
|
||||
|
|
|
@ -2,12 +2,10 @@ import SelectKitComponent from "select-kit/components/select-kit";
|
|||
import { computed } from "@ember/object";
|
||||
import { isPresent } from "@ember/utils";
|
||||
import { next } from "@ember/runloop";
|
||||
import layout from "select-kit/templates/components/multi-select";
|
||||
import { makeArray } from "discourse-common/lib/helpers";
|
||||
|
||||
export default SelectKitComponent.extend({
|
||||
pluginApiIdentifiers: ["multi-select"],
|
||||
layout,
|
||||
classNames: ["multi-select"],
|
||||
multiSelect: true,
|
||||
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
import Component from "@ember/component";
|
||||
import { computed } from "@ember/object";
|
||||
import layout from "select-kit/templates/components/multi-select/format-selected-content";
|
||||
import { makeArray } from "discourse-common/lib/helpers";
|
||||
import UtilsMixin from "select-kit/mixins/utils";
|
||||
|
||||
export default Component.extend(UtilsMixin, {
|
||||
tagName: "",
|
||||
layout,
|
||||
content: null,
|
||||
selectKit: null,
|
||||
|
||||
|
|
|
@ -2,11 +2,9 @@ import I18n from "I18n";
|
|||
import SelectKitFilterComponent from "select-kit/components/select-kit/select-kit-filter";
|
||||
import { isEmpty } from "@ember/utils";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import layout from "select-kit/templates/components/select-kit/select-kit-filter";
|
||||
import { action } from "@ember/object";
|
||||
|
||||
export default SelectKitFilterComponent.extend({
|
||||
layout,
|
||||
classNames: ["multi-select-filter"],
|
||||
|
||||
@discourseComputed("placeholder", "selectKit.hasSelection")
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import SelectKitHeaderComponent from "select-kit/components/select-kit/select-kit-header";
|
||||
import layout from "select-kit/templates/components/multi-select/multi-select-header";
|
||||
import { computed } from "@ember/object";
|
||||
import { reads } from "@ember/object/computed";
|
||||
|
||||
|
@ -7,11 +6,10 @@ export default SelectKitHeaderComponent.extend({
|
|||
tagName: "summary",
|
||||
classNames: ["multi-select-header"],
|
||||
attributeBindings: ["ariaLabel:aria-label"],
|
||||
layout,
|
||||
|
||||
caretUpIcon: reads("selectKit.options.caretUpIcon"),
|
||||
caretDownIcon: reads("selectKit.options.caretDownIcon"),
|
||||
ariaLabel: reads("selectKit.options.headerAriaLabel"),
|
||||
|
||||
caretIcon: computed(
|
||||
"selectKit.isExpanded",
|
||||
"caretUpIcon",
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
import SelectedNameComponent from "select-kit/components/selected-name";
|
||||
import { categoryBadgeHTML } from "discourse/helpers/category-link";
|
||||
import { computed } from "@ember/object";
|
||||
import layout from "select-kit/templates/components/multi-select/selected-category";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
|
||||
export default SelectedNameComponent.extend({
|
||||
classNames: ["selected-category"],
|
||||
layout,
|
||||
|
||||
badge: computed("item", function () {
|
||||
return htmlSafe(
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
{{#if this.category}}
|
||||
<div class="category-status" aria-hidden="true">
|
||||
{{#if this.hasParentCategory}}
|
||||
{{#unless this.hideParentCategory}}
|
||||
{{this.badgeForParentCategory}}
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
{{this.badgeForCategory}}
|
||||
</div>
|
||||
|
||||
{{#if this.shouldDisplayDescription}}
|
||||
<div class="category-desc" aria-hidden="true">{{dir-span
|
||||
this.descriptionText
|
||||
htmlSafe="true"
|
||||
}}</div>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{html-safe this.label}}
|
||||
{{/if}}
|
|
@ -1,11 +1,9 @@
|
|||
import CategoryRowComponent from "select-kit/components/category-row";
|
||||
import { categoryBadgeHTML } from "discourse/helpers/category-link";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import layout from "select-kit/templates/components/category-row";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
|
||||
export default CategoryRowComponent.extend({
|
||||
layout,
|
||||
classNames: "none category-row",
|
||||
|
||||
@discourseComputed("category")
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
import DropdownSelectBoxHeaderComponent from "select-kit/components/dropdown-select-box/dropdown-select-box-header";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { fmt } from "discourse/lib/computed";
|
||||
import layout from "select-kit/templates/components/notifications-filter/notifications-filter-header";
|
||||
|
||||
export default DropdownSelectBoxHeaderComponent.extend({
|
||||
layout,
|
||||
|
||||
classNames: ["notifications-filter-header"],
|
||||
|
||||
label: fmt("value", "user.user_notifications.filters.%@"),
|
||||
|
||||
@discourseComputed("selectKit.isExpanded")
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
import DropdownSelectBoxHeaderComponent from "select-kit/components/dropdown-select-box/dropdown-select-box-header";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import layout from "select-kit/templates/components/period-chooser/period-chooser-header";
|
||||
|
||||
export default DropdownSelectBoxHeaderComponent.extend({
|
||||
layout,
|
||||
classNames: ["period-chooser-header"],
|
||||
|
||||
@discourseComputed("selectKit.isExpanded")
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
import DropdownSelectBoxRowComponent from "select-kit/components/dropdown-select-box/dropdown-select-box-row";
|
||||
import I18n from "I18n";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import layout from "select-kit/templates/components/period-chooser/period-chooser-row";
|
||||
|
||||
export default DropdownSelectBoxRowComponent.extend({
|
||||
layout,
|
||||
classNames: ["period-chooser-row"],
|
||||
|
||||
@discourseComputed("rowName")
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
import Component from "@ember/component";
|
||||
import I18n from "I18n";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import layout from "select-kit/templates/components/pinned-button";
|
||||
|
||||
export default Component.extend({
|
||||
pluginApiIdentifiers: ["pinned-button"],
|
||||
descriptionKey: "help",
|
||||
classNames: "pinned-button",
|
||||
classNameBindings: ["isHidden"],
|
||||
layout,
|
||||
|
||||
@discourseComputed("topic.pinned_globally", "pinned")
|
||||
reasonText(pinnedGlobally, pinned) {
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import Component from "@ember/component";
|
||||
import layout from "select-kit/templates/components/select-kit/errors-collection";
|
||||
|
||||
export default Component.extend({
|
||||
layout,
|
||||
tagName: "",
|
||||
});
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
import Component from "@ember/component";
|
||||
import { bind } from "@ember/runloop";
|
||||
import { computed } from "@ember/object";
|
||||
import layout from "select-kit/templates/components/select-kit/select-kit-body";
|
||||
|
||||
export default Component.extend({
|
||||
layout,
|
||||
classNames: ["select-kit-body"],
|
||||
classNameBindings: ["emptyBody:empty-body"],
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import Component from "@ember/component";
|
||||
import layout from "select-kit/templates/components/select-kit/select-kit-collection";
|
||||
|
||||
export default Component.extend({
|
||||
layout,
|
||||
tagName: "",
|
||||
});
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import SelectKitRowComponent from "select-kit/components/select-kit/select-kit-row";
|
||||
import layout from "select-kit/templates/components/select-kit/select-kit-row";
|
||||
|
||||
export default SelectKitRowComponent.extend({
|
||||
layout,
|
||||
classNames: "create",
|
||||
});
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
{{#unless this.isHidden}}
|
||||
{{! filter-input-search prevents 1password from attempting autocomplete }}
|
||||
{{! template-lint-disable no-down-event-binding }}
|
||||
|
||||
<Input
|
||||
tabindex={{0}}
|
||||
class="filter-input"
|
||||
placeholder={{this.placeholder}}
|
||||
autocomplete="off"
|
||||
autocorrect="off"
|
||||
autocapitalize="off"
|
||||
name="filter-input-search"
|
||||
spellcheck={{false}}
|
||||
@value={{readonly this.selectKit.filter}}
|
||||
@type="search"
|
||||
{{on "paste" (action "onPaste")}}
|
||||
{{on "keydown" (action "onKeydown")}}
|
||||
{{on "keyup" (action "onKeyup")}}
|
||||
{{on "input" (action "onInput")}}
|
||||
/>
|
||||
|
||||
{{#if this.selectKit.options.filterIcon}}
|
||||
{{d-icon this.selectKit.options.filterIcon class="filter-icon"}}
|
||||
{{/if}}
|
||||
{{/unless}}
|
|
@ -4,11 +4,9 @@ import UtilsMixin from "select-kit/mixins/utils";
|
|||
import { action, computed } from "@ember/object";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { isPresent } from "@ember/utils";
|
||||
import layout from "select-kit/templates/components/select-kit/select-kit-filter";
|
||||
import { not } from "@ember/object/computed";
|
||||
|
||||
export default Component.extend(UtilsMixin, {
|
||||
layout,
|
||||
classNames: ["select-kit-filter"],
|
||||
classNameBindings: ["isExpanded:is-expanded"],
|
||||
attributeBindings: ["role"],
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
{{#each this.icons as |icon|}}
|
||||
{{d-icon icon translatedTitle=this.dasherizedTitle}}
|
||||
{{/each}}
|
||||
|
||||
<span class="name">
|
||||
{{this.label}}
|
||||
</span>
|
|
@ -1,7 +1,5 @@
|
|||
import SelectKitRowComponent from "select-kit/components/select-kit/select-kit-row";
|
||||
import layout from "select-kit/templates/components/select-kit/select-kit-row";
|
||||
|
||||
export default SelectKitRowComponent.extend({
|
||||
layout,
|
||||
classNames: "none",
|
||||
});
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
{{#each this.icons as |icon|}}
|
||||
{{d-icon icon translatedTitle=this.dasherizedTitle}}
|
||||
{{/each}}
|
||||
|
||||
<span class="name">
|
||||
{{this.label}}
|
||||
</span>
|
|
@ -3,16 +3,15 @@ import Component from "@ember/component";
|
|||
import I18n from "I18n";
|
||||
import UtilsMixin from "select-kit/mixins/utils";
|
||||
import { guidFor } from "@ember/object/internals";
|
||||
import layout from "select-kit/templates/components/select-kit/select-kit-row";
|
||||
import { makeArray } from "discourse-common/lib/helpers";
|
||||
import { reads } from "@ember/object/computed";
|
||||
import { dasherize } from "@ember/string";
|
||||
|
||||
export default Component.extend(UtilsMixin, {
|
||||
layout,
|
||||
classNames: ["select-kit-row"],
|
||||
tagName: "li",
|
||||
tabIndex: 0,
|
||||
|
||||
attributeBindings: [
|
||||
"tabIndex",
|
||||
"title",
|
||||
|
@ -24,6 +23,7 @@ export default Component.extend(UtilsMixin, {
|
|||
"guid:data-guid",
|
||||
"rowLang:lang",
|
||||
],
|
||||
|
||||
classNameBindings: [
|
||||
"isHighlighted",
|
||||
"isSelected",
|
||||
|
@ -31,8 +31,8 @@ export default Component.extend(UtilsMixin, {
|
|||
"isNone:none",
|
||||
"item.classNames",
|
||||
],
|
||||
index: 0,
|
||||
|
||||
index: 0,
|
||||
role: "menuitemradio",
|
||||
|
||||
didInsertElement() {
|
||||
|
|
|
@ -2,15 +2,12 @@ import { computed } from "@ember/object";
|
|||
import { or } from "@ember/object/computed";
|
||||
import SelectKitHeaderComponent from "select-kit/components/select-kit/select-kit-header";
|
||||
import UtilsMixin from "select-kit/mixins/utils";
|
||||
import layout from "select-kit/templates/components/select-kit/single-select-header";
|
||||
import I18n from "I18n";
|
||||
|
||||
export default SelectKitHeaderComponent.extend(UtilsMixin, {
|
||||
tagName: "summary",
|
||||
layout,
|
||||
classNames: ["single-select-header"],
|
||||
attributeBindings: ["name", "ariaLabel:aria-label"],
|
||||
|
||||
ariaLabel: or("selectKit.options.headerAriaLabel", "name"),
|
||||
|
||||
focusIn(event) {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import layout from "select-kit/templates/components/selected-choice-category";
|
||||
import SelectedChoiceComponent from "select-kit/components/selected-choice";
|
||||
import { categoryBadgeHTML } from "discourse/helpers/category-link";
|
||||
import { computed } from "@ember/object";
|
||||
|
@ -6,7 +5,6 @@ import { htmlSafe } from "@ember/template";
|
|||
|
||||
export default SelectedChoiceComponent.extend({
|
||||
tagName: "",
|
||||
layout,
|
||||
extraClass: "selected-choice-category",
|
||||
|
||||
badge: computed("item", function () {
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
import { guidFor } from "@ember/object/internals";
|
||||
import Component from "@ember/component";
|
||||
import { computed } from "@ember/object";
|
||||
import layout from "select-kit/templates/components/selected-choice";
|
||||
import UtilsMixin from "select-kit/mixins/utils";
|
||||
|
||||
export default Component.extend(UtilsMixin, {
|
||||
tagName: "",
|
||||
layout,
|
||||
item: null,
|
||||
selectKit: null,
|
||||
extraClass: null,
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
{{#if this.item.url}}
|
||||
<AvatarFlair
|
||||
@flairName={{this.item.name}}
|
||||
@flairUrl={{this.item.url}}
|
||||
@flairBgColor={{this.item.bgColor}}
|
||||
@flairColor={{this.item.color}}
|
||||
/>
|
||||
{{/if}}
|
||||
|
||||
<span>{{this.label}}</span>
|
|
@ -1,7 +1,5 @@
|
|||
import SelectedNameComponent from "select-kit/components/selected-name";
|
||||
import layout from "select-kit/templates/components/flair-row";
|
||||
|
||||
export default SelectedNameComponent.extend({
|
||||
layout,
|
||||
tagName: "",
|
||||
});
|
||||
|
|
|
@ -2,13 +2,11 @@ import { guidFor } from "@ember/object/internals";
|
|||
import { computed, get } from "@ember/object";
|
||||
import Component from "@ember/component";
|
||||
import UtilsMixin from "select-kit/mixins/utils";
|
||||
import layout from "select-kit/templates/components/selected-name";
|
||||
import { makeArray } from "discourse-common/lib/helpers";
|
||||
import { reads } from "@ember/object/computed";
|
||||
|
||||
export default Component.extend(UtilsMixin, {
|
||||
tagName: "",
|
||||
layout,
|
||||
name: null,
|
||||
value: null,
|
||||
headerTitle: null,
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
import SelectKitComponent from "select-kit/components/select-kit";
|
||||
import { computed } from "@ember/object";
|
||||
import { isEmpty } from "@ember/utils";
|
||||
import layout from "select-kit/templates/components/single-select";
|
||||
|
||||
export default SelectKitComponent.extend({
|
||||
pluginApiIdentifiers: ["single-select"],
|
||||
layout,
|
||||
classNames: ["single-select"],
|
||||
singleSelect: true,
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import SelectKitRowComponent from "select-kit/components/select-kit/select-kit-row";
|
||||
import layout from "select-kit/templates/components/tag-chooser-row";
|
||||
|
||||
export default SelectKitRowComponent.extend({
|
||||
layout,
|
||||
classNames: ["tag-chooser-row"],
|
||||
});
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
import Component from "@ember/component";
|
||||
import layout from "select-kit/templates/components/tag-drop/more-tags-collection";
|
||||
|
||||
export default Component.extend({
|
||||
tagName: "",
|
||||
|
||||
layout,
|
||||
|
||||
collection: null,
|
||||
});
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import ComboBoxSelectBoxHeaderComponent from "select-kit/components/combo-box/combo-box-header";
|
||||
import layout from "select-kit/templates/components/tag-drop/tag-drop-header";
|
||||
|
||||
export default ComboBoxSelectBoxHeaderComponent.extend({
|
||||
layout,
|
||||
classNames: "tag-drop-header",
|
||||
});
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import SelectKitRowComponent from "select-kit/components/select-kit/select-kit-row";
|
||||
import layout from "select-kit/templates/components/tag-row";
|
||||
|
||||
export default SelectKitRowComponent.extend({
|
||||
layout,
|
||||
classNames: ["tag-row"],
|
||||
});
|
||||
|
|
|
@ -5,10 +5,8 @@ import { NotificationLevels } from "discourse/lib/notification-levels";
|
|||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import getURL from "discourse-common/lib/get-url";
|
||||
import Component from "@ember/component";
|
||||
import layout from "select-kit/templates/components/topic-notifications-button";
|
||||
|
||||
export default Component.extend({
|
||||
layout,
|
||||
classNames: ["topic-notifications-button"],
|
||||
classNameBindings: ["isLoading"],
|
||||
appendReason: true,
|
||||
|
@ -17,6 +15,7 @@ export default Component.extend({
|
|||
topic: null,
|
||||
showCaret: true,
|
||||
isLoading: false,
|
||||
|
||||
icon: computed("isLoading", function () {
|
||||
return this.isLoading ? "spinner" : null;
|
||||
}),
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import SelectKitRowComponent from "select-kit/components/select-kit/select-kit-row";
|
||||
import layout from "select-kit/templates/components/topic-row";
|
||||
|
||||
export default SelectKitRowComponent.extend({
|
||||
layout,
|
||||
classNames: ["topic-row"],
|
||||
});
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import SelectKitRowComponent from "select-kit/components/select-kit/select-kit-row";
|
||||
import layout from "select-kit/templates/components/user-chooser/user-row";
|
||||
|
||||
export default SelectKitRowComponent.extend({
|
||||
layout,
|
||||
classNames: ["user-row"],
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user