Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-09 20:02:54 +01:00
wip - prevent step change during upload
Dieser Commit ist enthalten in:
Ursprung
0d0fb83bd1
Commit
d4c5cb92ee
2 geänderte Dateien mit 18 neuen und 9 gelöschten Zeilen
|
@ -4,22 +4,26 @@ import {
|
|||
} from "discourse-common/utils/decorators";
|
||||
import EmberObject from "@ember/object";
|
||||
import Component from "@ember/component";
|
||||
import { inject as service } from "@ember/service";
|
||||
|
||||
export default Component.extend({
|
||||
showPreview: false,
|
||||
composer: service(),
|
||||
classNameBindings: [
|
||||
":wizard-field-composer",
|
||||
"showPreview:show-preview:hide-preview",
|
||||
],
|
||||
|
||||
didInsertElement() {
|
||||
this.set(
|
||||
"composer",
|
||||
EmberObject.create({
|
||||
loading: false,
|
||||
reply: this.get("field.value") || "",
|
||||
})
|
||||
);
|
||||
debugger;
|
||||
this.set("composer.reply", this.get("field.value") || "");
|
||||
// this.set(
|
||||
// "composer",
|
||||
// EmberObject.create({
|
||||
// loading: false,
|
||||
// reply: this.get("field.value") || "",
|
||||
// })
|
||||
// );
|
||||
},
|
||||
|
||||
@observes("composer.reply")
|
||||
|
|
|
@ -9,8 +9,10 @@ import CustomWizard, {
|
|||
} from "discourse/plugins/discourse-custom-wizard/discourse/models/custom-wizard";
|
||||
import { alias, not } from "@ember/object/computed";
|
||||
import discourseLater from "discourse-common/lib/later";
|
||||
import { inject as service } from "@ember/service";
|
||||
|
||||
export default Component.extend({
|
||||
composer: service(),
|
||||
classNameBindings: [":wizard-step", "step.id"],
|
||||
saving: null,
|
||||
|
||||
|
@ -182,7 +184,7 @@ export default Component.extend({
|
|||
},
|
||||
|
||||
backStep() {
|
||||
if (this.saving) {
|
||||
if (this.saving || this.composer.isProcessingUpload) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -190,7 +192,10 @@ export default Component.extend({
|
|||
},
|
||||
|
||||
nextStep() {
|
||||
if (this.saving) {
|
||||
console.log(this.composer.isProcessingUpload);
|
||||
debugger;
|
||||
|
||||
if (this.saving || this.composer.isProcessingUpload) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Laden …
In neuem Issue referenzieren