Loading app/src/controller.manager.js +7 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ export class Controller { new Step("device-detection", "connect adb", true), ]; this.currentIndex = 0; this.downloadChoiceEnabled = false; } async init(view) { Loading @@ -26,6 +27,10 @@ export class Controller { this.view = view; } setDownloadChoiceEnabled(enabled) { this.downloadChoiceEnabled = enabled; } async next() { let current = this.steps[this.currentIndex]; let next = this.steps[this.currentIndex + 1]; Loading Loading @@ -413,7 +418,8 @@ export class Controller { setResources(resources) { this.resources = resources; if (this.resources.steps) { this.steps.push(new Step("downloading", "download", true)); const needsUserGesture = this.downloadChoiceEnabled; this.steps.push(new Step("downloading", "download", needsUserGesture)); this.steps.push( ...this.resources.steps.map((step) => { return new Step( Loading app/src/viewManager.js +21 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,9 @@ export default class ViewManager { this.WDebug = WDebug; this.ErrorManager = ErrorManager; this.controller = new Controller(); this.downloadChoiceEnabled = new URLSearchParams(window.location.search).get("download") === "0"; this.controller.setDownloadChoiceEnabled(this.downloadChoiceEnabled); await this.controller.init(this); this.translationManager = new TranslationManager(); await this.translationManager.init(); Loading @@ -32,8 +35,25 @@ export default class ViewManager { $copyStep.id = step.id; $copyStep.classList.add("active"); $copyStep.classList.remove("inactive"); $copyStep.style.position = "relative"; if (step.name === "downloading") { const progressArea = $copyStep.querySelector( ".download-progress-area", ); const actions = $copyStep.querySelector(".download-actions"); if (this.downloadChoiceEnabled) { if (progressArea) { progressArea.style.display = "none"; } this.bindDownloadChoice($copyStep, step); } else { if (actions) { actions.style.display = "none"; } if (progressArea) { progressArea.style.display = "block"; } } } else { const $button = $copyStep.querySelector("button"); if ($button) { Loading Loading
app/src/controller.manager.js +7 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ export class Controller { new Step("device-detection", "connect adb", true), ]; this.currentIndex = 0; this.downloadChoiceEnabled = false; } async init(view) { Loading @@ -26,6 +27,10 @@ export class Controller { this.view = view; } setDownloadChoiceEnabled(enabled) { this.downloadChoiceEnabled = enabled; } async next() { let current = this.steps[this.currentIndex]; let next = this.steps[this.currentIndex + 1]; Loading Loading @@ -413,7 +418,8 @@ export class Controller { setResources(resources) { this.resources = resources; if (this.resources.steps) { this.steps.push(new Step("downloading", "download", true)); const needsUserGesture = this.downloadChoiceEnabled; this.steps.push(new Step("downloading", "download", needsUserGesture)); this.steps.push( ...this.resources.steps.map((step) => { return new Step( Loading
app/src/viewManager.js +21 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,9 @@ export default class ViewManager { this.WDebug = WDebug; this.ErrorManager = ErrorManager; this.controller = new Controller(); this.downloadChoiceEnabled = new URLSearchParams(window.location.search).get("download") === "0"; this.controller.setDownloadChoiceEnabled(this.downloadChoiceEnabled); await this.controller.init(this); this.translationManager = new TranslationManager(); await this.translationManager.init(); Loading @@ -32,8 +35,25 @@ export default class ViewManager { $copyStep.id = step.id; $copyStep.classList.add("active"); $copyStep.classList.remove("inactive"); $copyStep.style.position = "relative"; if (step.name === "downloading") { const progressArea = $copyStep.querySelector( ".download-progress-area", ); const actions = $copyStep.querySelector(".download-actions"); if (this.downloadChoiceEnabled) { if (progressArea) { progressArea.style.display = "none"; } this.bindDownloadChoice($copyStep, step); } else { if (actions) { actions.style.display = "none"; } if (progressArea) { progressArea.style.display = "block"; } } } else { const $button = $copyStep.querySelector("button"); if ($button) { Loading