DEV: Convert tag-upload to the new modal API (#23590)
This commit is contained in:
parent
e1c3b14b1a
commit
ed8d0656f9
|
@ -0,0 +1,9 @@
|
||||||
|
<DModal @title={{i18n "tagging.upload"}} @closeModal={{@closeModal}}>
|
||||||
|
<:body>
|
||||||
|
<TagsUploader
|
||||||
|
@refresh={{route-action "triggerRefresh"}}
|
||||||
|
@closeModal={{@closeModal}}
|
||||||
|
@id="tags-uploader"
|
||||||
|
/>
|
||||||
|
</:body>
|
||||||
|
</DModal>
|
|
@ -5,12 +5,12 @@ import I18n from "I18n";
|
||||||
import { ajax } from "discourse/lib/ajax";
|
import { ajax } from "discourse/lib/ajax";
|
||||||
import discourseComputed from "discourse-common/utils/decorators";
|
import discourseComputed from "discourse-common/utils/decorators";
|
||||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||||
import showModal from "discourse/lib/show-modal";
|
|
||||||
|
|
||||||
import { inject as service } from "@ember/service";
|
import { inject as service } from "@ember/service";
|
||||||
|
import TagUpload from "discourse/components/modal/tag-upload";
|
||||||
|
|
||||||
export default Controller.extend({
|
export default Controller.extend({
|
||||||
dialog: service(),
|
dialog: service(),
|
||||||
|
modal: service(),
|
||||||
sortedByCount: true,
|
sortedByCount: true,
|
||||||
sortedByName: false,
|
sortedByName: false,
|
||||||
canAdminTags: alias("currentUser.staff"),
|
canAdminTags: alias("currentUser.staff"),
|
||||||
|
@ -63,7 +63,7 @@ export default Controller.extend({
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
showUploader() {
|
showUploader() {
|
||||||
showModal("tag-upload");
|
this.modal.show(TagUpload);
|
||||||
},
|
},
|
||||||
|
|
||||||
deleteUnused() {
|
deleteUnused() {
|
||||||
|
|
|
@ -23,7 +23,6 @@ const KNOWN_LEGACY_MODALS = [
|
||||||
"reject-reason-reviewable",
|
"reject-reason-reviewable",
|
||||||
"reorder-categories",
|
"reorder-categories",
|
||||||
"request-group-membership-form",
|
"request-group-membership-form",
|
||||||
"tag-upload",
|
|
||||||
];
|
];
|
||||||
|
|
||||||
const LEGACY_OPTS = new Set([
|
const LEGACY_OPTS = new Set([
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
<DModalBody @title="tagging.upload">
|
|
||||||
<TagsUploader
|
|
||||||
@refresh={{route-action "triggerRefresh"}}
|
|
||||||
@closeModal={{route-action "closeModal"}}
|
|
||||||
@id="tags-uploader"
|
|
||||||
/>
|
|
||||||
</DModalBody>
|
|
Loading…
Reference in New Issue