mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
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 discourseComputed from "discourse-common/utils/decorators";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import showModal from "discourse/lib/show-modal";
|
||||
|
||||
import { inject as service } from "@ember/service";
|
||||
import TagUpload from "discourse/components/modal/tag-upload";
|
||||
|
||||
export default Controller.extend({
|
||||
dialog: service(),
|
||||
modal: service(),
|
||||
sortedByCount: true,
|
||||
sortedByName: false,
|
||||
canAdminTags: alias("currentUser.staff"),
|
||||
|
@ -63,7 +63,7 @@ export default Controller.extend({
|
|||
|
||||
actions: {
|
||||
showUploader() {
|
||||
showModal("tag-upload");
|
||||
this.modal.show(TagUpload);
|
||||
},
|
||||
|
||||
deleteUnused() {
|
||||
|
|
|
@ -23,7 +23,6 @@ const KNOWN_LEGACY_MODALS = [
|
|||
"reject-reason-reviewable",
|
||||
"reorder-categories",
|
||||
"request-group-membership-form",
|
||||
"tag-upload",
|
||||
];
|
||||
|
||||
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
Block a user