Loading app/src/static/js/controller.manager.js +7 −3 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ export class Controller { } } async executeStep(stepName) { async executeStep(stepName, loader) { const current = this.steps[this.currentIndex]; let this_command; WDebug.log("ControllerManager Execute step", current) Loading @@ -64,8 +64,9 @@ export class Controller { try { for (i= 0; i < current.commands.length && res; i++) { this_command = current.commands[i]; res = await this.runCommand(this_command); res = await this.runCommand(this_command, loader); WDebug.log("run command > ", this_command , "returns ", res); } const next = this.steps[this.currentIndex + 1]; let previous = this.steps[this.currentIndex - 1]; Loading Loading @@ -104,7 +105,7 @@ export class Controller { this throw new error if something went wwrong. error should contain a proposal to solve the issue. */ async runCommand(cmd) { async runCommand(cmd, loader) { WDebug.log("ControllerManager run command:", cmd); switch (cmd.type) { case Command.CMD_TYPE.download: Loading Loading @@ -137,6 +138,9 @@ export class Controller { const res = await this.deviceManager.connect(cmd.mode); if (res) { await this.onDeviceConnected(); if(loader) { loader.style.display = 'none'; } return true; } } catch (e) { Loading app/src/static/js/viewManager.js +18 −2 Original line number Diff line number Diff line Loading @@ -39,7 +39,23 @@ class ViewManager { if($processCtn){ $processCtn.appendChild($copyStep); setTimeout(() => { $copyStep.scrollIntoView({ behavior: "smooth", block: "end"}); $copyStep.scrollIntoView({ behavior: "smooth", block: "start"}); const headerHeight = document.getElementById('banner').clientHeight; if($copyStep.clientHeight > (window.innerHeight - headerHeight)) { let isScrolling; window.addEventListener('scroll', function onScroll() { clearTimeout(isScrolling); isScrolling = setTimeout(function() { window.scrollBy({ top: -headerHeight, behavior: 'smooth' }); window.removeEventListener('scroll', onScroll); }, 100); }); } }, 100); } } Loading Loading @@ -69,7 +85,7 @@ class ViewManager { } try { await this.controller.executeStep(stepName); await this.controller.executeStep(stepName, loader); } catch (e) { this.ErrorManager.displayError_state(`Error on step: ${stepName}`, `${e.message || e}`); $button.disabled = false; Loading Loading
app/src/static/js/controller.manager.js +7 −3 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ export class Controller { } } async executeStep(stepName) { async executeStep(stepName, loader) { const current = this.steps[this.currentIndex]; let this_command; WDebug.log("ControllerManager Execute step", current) Loading @@ -64,8 +64,9 @@ export class Controller { try { for (i= 0; i < current.commands.length && res; i++) { this_command = current.commands[i]; res = await this.runCommand(this_command); res = await this.runCommand(this_command, loader); WDebug.log("run command > ", this_command , "returns ", res); } const next = this.steps[this.currentIndex + 1]; let previous = this.steps[this.currentIndex - 1]; Loading Loading @@ -104,7 +105,7 @@ export class Controller { this throw new error if something went wwrong. error should contain a proposal to solve the issue. */ async runCommand(cmd) { async runCommand(cmd, loader) { WDebug.log("ControllerManager run command:", cmd); switch (cmd.type) { case Command.CMD_TYPE.download: Loading Loading @@ -137,6 +138,9 @@ export class Controller { const res = await this.deviceManager.connect(cmd.mode); if (res) { await this.onDeviceConnected(); if(loader) { loader.style.display = 'none'; } return true; } } catch (e) { Loading
app/src/static/js/viewManager.js +18 −2 Original line number Diff line number Diff line Loading @@ -39,7 +39,23 @@ class ViewManager { if($processCtn){ $processCtn.appendChild($copyStep); setTimeout(() => { $copyStep.scrollIntoView({ behavior: "smooth", block: "end"}); $copyStep.scrollIntoView({ behavior: "smooth", block: "start"}); const headerHeight = document.getElementById('banner').clientHeight; if($copyStep.clientHeight > (window.innerHeight - headerHeight)) { let isScrolling; window.addEventListener('scroll', function onScroll() { clearTimeout(isScrolling); isScrolling = setTimeout(function() { window.scrollBy({ top: -headerHeight, behavior: 'smooth' }); window.removeEventListener('scroll', onScroll); }, 100); }); } }, 100); } } Loading Loading @@ -69,7 +85,7 @@ class ViewManager { } try { await this.controller.executeStep(stepName); await this.controller.executeStep(stepName, loader); } catch (e) { this.ErrorManager.displayError_state(`Error on step: ${stepName}`, `${e.message || e}`); $button.disabled = false; Loading