mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 04:03:57 -06:00
DEV: Convert delete-topic-disallowed
modal to component-based API (#22830)
This commit is contained in:
parent
173de8afe6
commit
de6070fac4
@ -0,0 +1,8 @@
|
||||
<DModal @closeModal={{@closeModal}}>
|
||||
<:body>
|
||||
<p>{{html-safe (i18n "post.controls.delete_topic_disallowed_modal")}}</p>
|
||||
</:body>
|
||||
<:footer>
|
||||
<DButton @action={{@closeModal}} class="btn-primary" @label="close" />
|
||||
</:footer>
|
||||
</DModal>
|
@ -24,7 +24,6 @@ const KNOWN_LEGACY_MODALS = [
|
||||
"create-account",
|
||||
"create-invite-bulk",
|
||||
"create-invite",
|
||||
"delete-topic-disallowed",
|
||||
"download-calendar",
|
||||
"edit-slow-mode",
|
||||
"edit-topic-timer",
|
||||
|
@ -1,10 +0,0 @@
|
||||
<DModalBody>
|
||||
<p>{{html-safe (i18n "post.controls.delete_topic_disallowed_modal")}}</p>
|
||||
</DModalBody>
|
||||
<div class="modal-footer">
|
||||
<DButton
|
||||
@action={{route-action "closeModal"}}
|
||||
@class="btn-primary"
|
||||
@label="close"
|
||||
/>
|
||||
</div>
|
@ -4,7 +4,6 @@ import discourseLater from "discourse-common/lib/later";
|
||||
import { Promise } from "rsvp";
|
||||
import { formattedReminderTime } from "discourse/lib/bookmark";
|
||||
import { h } from "virtual-dom";
|
||||
import showModal from "discourse/lib/show-modal";
|
||||
import { smallUserAtts } from "discourse/widgets/actions-summary";
|
||||
import I18n from "I18n";
|
||||
import {
|
||||
@ -12,6 +11,7 @@ import {
|
||||
WITH_REMINDER_ICON,
|
||||
} from "discourse/models/bookmark";
|
||||
import { isTesting } from "discourse-common/config/environment";
|
||||
import DeleteTopicDisallowedModal from "discourse/components/modal/delete-topic-disallowed";
|
||||
|
||||
const LIKE_ACTION = 2;
|
||||
const VIBRATE_DURATION = 5;
|
||||
@ -447,6 +447,7 @@ function replaceButton(buttons, find, replace) {
|
||||
|
||||
export default createWidget("post-menu", {
|
||||
tagName: "section.post-menu-area.clearfix",
|
||||
services: ["modal"],
|
||||
|
||||
settings: {
|
||||
collapseButtons: true,
|
||||
@ -712,7 +713,7 @@ export default createWidget("post-menu", {
|
||||
},
|
||||
|
||||
showDeleteTopicModal() {
|
||||
showModal("delete-topic-disallowed");
|
||||
this.modal.show(DeleteTopicDisallowedModal);
|
||||
},
|
||||
|
||||
showMoreActions() {
|
||||
|
Loading…
Reference in New Issue
Block a user