0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-22 09:20:29 +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 = const IMAGE_MARKDOWN_REGEX =
/!\[(.*?)\|(\d{1,4}x\d{1,4})(,\s*\d{1,3}%)?(.*?)\]\((upload:\/\/.*?)\)(?!(.*`))/g; /!\[(.*?)\|(\d{1,4}x\d{1,4})(,\s*\d{1,3}%)?(.*?)\]\((upload:\/\/.*?)\)(?!(.*`))/g;
export const wizardComposerEdtiorEventPrefix = "wizard-editor"; export const wizardComposerEdtiorEventPrefix = "wizard-editor";
export default ComposerEditor.extend({ 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 discourseLater from "discourse-common/lib/later";
import { wizardComposerEdtiorEventPrefix } from "./custom-wizard-composer-editor"; import { wizardComposerEdtiorEventPrefix } from "./custom-wizard-composer-editor";
const uploadStartedEventKeys = [ const uploadStartedEventKeys = ["upload-started"];
"upload-started"
];
const uploadEndedEventKeys = [ const uploadEndedEventKeys = [
"upload-success", "upload-success",
"upload-error", "upload-error",
"upload-cancelled", "upload-cancelled",
"uploads-cancelled", "uploads-cancelled",
"uploads-aborted", "uploads-aborted",
"all-uploads-complete" "all-uploads-complete",
]; ];
export default Component.extend({ export default Component.extend({
@ -42,12 +40,12 @@ export default Component.extend({
this.set("cookedDescription", cookedDescription); this.set("cookedDescription", cookedDescription);
}); });
uploadStartedEventKeys.forEach(key => { uploadStartedEventKeys.forEach((key) => {
this.appEvents.on(`${wizardComposerEdtiorEventPrefix}:${key}`, () => { this.appEvents.on(`${wizardComposerEdtiorEventPrefix}:${key}`, () => {
this.set("uploading", true); this.set("uploading", true);
}); });
}); });
uploadEndedEventKeys.forEach(key => { uploadEndedEventKeys.forEach((key) => {
this.appEvents.on(`${wizardComposerEdtiorEventPrefix}:${key}`, () => { this.appEvents.on(`${wizardComposerEdtiorEventPrefix}:${key}`, () => {
this.set("uploading", false); this.set("uploading", false);
}); });