forked from Blendman974/faceclaw
Detect custom firmware during onboarding; add uninstall option
This commit is contained in:
1 parent
cb78841a9d
commit
ea80d05607
20 files changed
+917
-46
No files matched your search
@@ -332,6 +332,29 @@ export class MainViewModel extends Observable {
|
||||
Frame.topmost()?.navigate("phone-ui/config-page");
|
||||
}
|
||||
|
||||
async onInstallFirmwareTap(): Promise<void> {
|
||||
await this.openFlashPage("install");
|
||||
}
|
||||
|
||||
async onUninstallFirmwareTap(): Promise<void> {
|
||||
await this.openFlashPage("uninstall");
|
||||
}
|
||||
|
||||
private async openFlashPage(mode: "install" | "uninstall"): Promise<void> {
|
||||
// The flasher needs the glasses to itself, so drop the main connection first.
|
||||
if (this.phase === "connected" || this.phase === "charging") {
|
||||
try {
|
||||
await dashboardController.disconnect();
|
||||
} catch {
|
||||
// proceed anyway; the flash page surfaces any connection trouble
|
||||
}
|
||||
}
|
||||
Frame.topmost()?.navigate({
|
||||
moduleName: "phone-ui/onboarding-flash-page",
|
||||
context: { mode, fromOnboarding: false },
|
||||
});
|
||||
}
|
||||
|
||||
onToggleLogTap(): void {
|
||||
this.showLog = !this.showLog;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user