0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-25 02:30:28 +01:00
Dieser Commit ist enthalten in:
merefield 2024-05-29 16:00:11 +01:00
Ursprung 9ec820fce8
Commit fbf52aae3c
2 geänderte Dateien mit 4 neuen und 7 gelöschten Zeilen

Datei anzeigen

@ -18,7 +18,6 @@ import { inject as service } from "@ember/service";
const IMAGE_MARKDOWN_REGEX =
/!\[(.*?)\|(\d{1,4}x\d{1,4})(,\s*\d{1,3}%)?(.*?)\]\((upload:\/\/.*?)\)(?!(.*`))/g;
export const wizardComposerEdtiorEventPrefix = "wizard-editor";
export default ComposerEditor.extend({

Datei anzeigen

@ -11,16 +11,14 @@ import { alias, not, or } from "@ember/object/computed";
import discourseLater from "discourse-common/lib/later";
import { wizardComposerEdtiorEventPrefix } from "./custom-wizard-composer-editor";
const uploadStartedEventKeys = [
"upload-started"
];
const uploadStartedEventKeys = ["upload-started"];
const uploadEndedEventKeys = [
"upload-success",
"upload-error",
"upload-cancelled",
"uploads-cancelled",
"uploads-aborted",
"all-uploads-complete"
"all-uploads-complete",
];
export default Component.extend({
@ -42,12 +40,12 @@ export default Component.extend({
this.set("cookedDescription", cookedDescription);
});
uploadStartedEventKeys.forEach(key => {
uploadStartedEventKeys.forEach((key) => {
this.appEvents.on(`${wizardComposerEdtiorEventPrefix}:${key}`, () => {
this.set("uploading", true);
});
});
uploadEndedEventKeys.forEach(key => {
uploadEndedEventKeys.forEach((key) => {
this.appEvents.on(`${wizardComposerEdtiorEventPrefix}:${key}`, () => {
this.set("uploading", false);
});