We previously included this option conditionally when users were replying or creating a new topic while they had content already in the composer. This makes the dialog always include three buttons: - Close and discard - Close and save draft for later - Keed editing This also changes how the backend notifies the frontend when there is a current draft topic. This is now sent via the `has_topic_draft` property in the current user serializer.
20 lines
459 B
JavaScript
20 lines
459 B
JavaScript
import Controller from "@ember/controller";
|
|
import ModalFunctionality from "discourse/mixins/modal-functionality";
|
|
|
|
export default Controller.extend(ModalFunctionality, {
|
|
actions: {
|
|
destroyDraft() {
|
|
this.onDestroyDraft();
|
|
this.send("closeModal");
|
|
},
|
|
saveDraftAndClose() {
|
|
this.onSaveDraft();
|
|
this.send("closeModal");
|
|
},
|
|
dismissModal() {
|
|
this.onDismissModal();
|
|
this.send("closeModal");
|
|
},
|
|
},
|
|
});
|