1
0
Fork 0
Dieser Commit ist enthalten in:
merefield 2023-07-10 07:03:45 +01:00
Ursprung 39b947d003
Commit 2df920895d
3 geänderte Dateien mit 46 neuen und 67 gelöschten Zeilen

Datei anzeigen

@ -14,7 +14,8 @@ import { uploadIcon } from "discourse/lib/uploads";
import { dasherize } from "@ember/string"; import { dasherize } from "@ember/string";
import showModal from "discourse/lib/show-modal"; import showModal from "discourse/lib/show-modal";
const IMAGE_MARKDOWN_REGEX = /!\[(.*?)\|(\d{1,4}x\d{1,4})(,\s*\d{1,3}%)?(.*?)\]\((upload:\/\/.*?)\)(?!(.*`))/g; const IMAGE_MARKDOWN_REGEX =
/!\[(.*?)\|(\d{1,4}x\d{1,4})(,\s*\d{1,3}%)?(.*?)\]\((upload:\/\/.*?)\)(?!(.*`))/g;
export default ComposerEditor.extend({ export default ComposerEditor.extend({
classNameBindings: ["fieldClass"], classNameBindings: ["fieldClass"],
@ -116,9 +117,8 @@ export default ComposerEditor.extend({
event.target.closest(".button-wrapper").dataset.imageIndex, event.target.closest(".button-wrapper").dataset.imageIndex,
10 10
); );
const matchingPlaceholder = this.get("composer.reply").match( const matchingPlaceholder =
IMAGE_MARKDOWN_REGEX this.get("composer.reply").match(IMAGE_MARKDOWN_REGEX);
);
this.session.set("wizardEventFieldId", this.field.id); this.session.set("wizardEventFieldId", this.field.id);
this.appEvents.trigger( this.appEvents.trigger(

Datei anzeigen

@ -21,29 +21,8 @@ export default Controller.extend({
"application/x-www-form-urlencoded", "application/x-www-form-urlencoded",
]), ]),
successCodes: selectKitContent([ successCodes: selectKitContent([
100, 100, 101, 102, 200, 201, 202, 203, 204, 205, 206, 207, 208, 226, 300, 301,
101, 302, 303, 303, 304, 305, 306, 307, 308,
102,
200,
201,
202,
203,
204,
205,
206,
207,
208,
226,
300,
301,
302,
303,
303,
304,
305,
306,
307,
308,
]), ]),
@discourseComputed( @discourseComputed(

Datei anzeigen

@ -21,7 +21,7 @@ export default {
}; };
withPluginApi("0.8.36", (api) => { withPluginApi("0.8.36", (api) => {
api.onAppEvent('page:changed', (data) => { api.onAppEvent("page:changed", (data) => {
const currentUser = container.lookup("service:current-user"); const currentUser = container.lookup("service:current-user");
const settings = container.lookup("service:site-settings"); const settings = container.lookup("service:site-settings");
const redirectToWizard = currentUser.redirect_to_wizard; const redirectToWizard = currentUser.redirect_to_wizard;
@ -30,10 +30,10 @@ export default {
.concat(["loading"]); .concat(["loading"]);
if ( if (
redirectToWizard && redirectToWizard &&
(data.currentRouteName !== "customWizardStep") && data.currentRouteName !== "customWizardStep" &&
!(excludedPaths.find((p) => { !excludedPaths.find((p) => {
return data.currentRouteName.indexOf(p) > -1; return data.currentRouteName.indexOf(p) > -1;
})) })
) { ) {
window.location = "/w/" + redirectToWizard.dasherize(); window.location = "/w/" + redirectToWizard.dasherize();
} }