fix(UX): activate next step automatically
This commit is contained in:
parent
c643d4a33c
commit
253b9bb1f5
1 changed files with 11 additions and 0 deletions
|
|
@ -438,6 +438,7 @@ export default class OnboardingWidget extends Widget {
|
|||
};
|
||||
|
||||
this.update_step_status(step, "is_complete", 1, callback);
|
||||
this.activate_next_step(step);
|
||||
}
|
||||
|
||||
skip_step(step) {
|
||||
|
|
@ -451,6 +452,16 @@ export default class OnboardingWidget extends Widget {
|
|||
};
|
||||
|
||||
this.update_step_status(step, "is_skipped", 1, callback);
|
||||
this.activate_next_step(step);
|
||||
}
|
||||
|
||||
activate_next_step(step) {
|
||||
let current_step_index = this.steps.findIndex((s) => s == step);
|
||||
let next_step = this.steps[current_step_index + 1];
|
||||
|
||||
if (!next_step) return;
|
||||
|
||||
this.show_step(next_step);
|
||||
}
|
||||
|
||||
update_step_status(step, status, value, callback) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue