Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 17:30:29 +01:00
FIX: ensure we have the right upload ID when navigating between steps
Dieser Commit ist enthalten in:
Ursprung
294c35cf9b
Commit
dec670ac43
1 geänderte Dateien mit 11 neuen und 0 gelöschten Zeilen
|
@ -1,6 +1,7 @@
|
||||||
import DiscourseURL from "discourse/lib/url";
|
import DiscourseURL from "discourse/lib/url";
|
||||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||||
import getUrl from "discourse-common/lib/get-url";
|
import getUrl from "discourse-common/lib/get-url";
|
||||||
|
import { observes } from "discourse-common/utils/decorators";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "custom-wizard-edits",
|
name: "custom-wizard-edits",
|
||||||
|
@ -35,6 +36,16 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
api.modifyClass("component:uppy-image-uploader", {
|
||||||
|
// Needed to ensure appEvents get registered when navigating between steps
|
||||||
|
@observes("id")
|
||||||
|
initOnStepChange() {
|
||||||
|
if (/wizard-field|wizard-step/.test(this.id)) {
|
||||||
|
this._initialize();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Laden …
In neuem Issue referenzieren