forked from Blendman974/faceclaw
Firmware check: add Install and Skip escape hatches to the error state
When the check itself fails, the only option was Retry. Add two more: Install proceeds as if stock flashable firmware had been detected (straight to the flash page), and Skip proceeds as if compatible custom firmware had been detected — routed through the same classification path, so the phone-side G2 font extraction still runs when the fonts are missing. Both appear only in the error phase; Back and Retry keep their places. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016ZqzwmRQ3HQxasBz5rYyZV
This commit is contained in:
1 parent
b952cc2269
commit
9adff011b4
2 files changed
+30
-4
No files matched your search
@@ -8,9 +8,16 @@
|
||||
</StackLayout>
|
||||
</ScrollView>
|
||||
|
||||
<GridLayout row="1" columns="*,*" class="m-t-20">
|
||||
<Button col="0" text="{{ secondaryLabel }}" tap="{{ onSecondaryTap }}" visibility="{{ secondaryVisibility }}" />
|
||||
<Button col="1" text="{{ primaryLabel }}" tap="{{ onPrimaryTap }}" visibility="{{ primaryVisibility }}" class="-primary" />
|
||||
</GridLayout>
|
||||
<StackLayout row="1" class="m-t-20">
|
||||
<!-- Error-only escape hatches: flash anyway, or trust that the custom firmware is present. -->
|
||||
<GridLayout columns="*,*" visibility="{{ errorActionsVisibility }}">
|
||||
<Button col="0" text="Install" tap="{{ onInstallTap }}" />
|
||||
<Button col="1" text="Skip" tap="{{ onSkipTap }}" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="*,*">
|
||||
<Button col="0" text="{{ secondaryLabel }}" tap="{{ onSecondaryTap }}" visibility="{{ secondaryVisibility }}" />
|
||||
<Button col="1" text="{{ primaryLabel }}" tap="{{ onPrimaryTap }}" visibility="{{ primaryVisibility }}" class="-primary" />
|
||||
</GridLayout>
|
||||
</StackLayout>
|
||||
</GridLayout>
|
||||
</Page>
|
||||
@@ -95,6 +95,10 @@ export class OnboardingFirmwareCheckViewModel extends Observable {
|
||||
return this._phase === "custom" || this._phase === "fonts" ? "collapse" : "visible";
|
||||
}
|
||||
|
||||
get errorActionsVisibility(): "visible" | "collapse" {
|
||||
return this._phase === "error" ? "visible" : "collapse";
|
||||
}
|
||||
|
||||
// --- button handlers -------------------------------------------------------
|
||||
|
||||
onPrimaryTap(): void {
|
||||
@@ -124,6 +128,20 @@ export class OnboardingFirmwareCheckViewModel extends Observable {
|
||||
frame?.navigate({ moduleName: "phone-ui/onboarding-unpair-page", clearHistory: true });
|
||||
}
|
||||
|
||||
/** Escape hatch when the check itself fails: flash as if stock firmware had been detected. */
|
||||
onInstallTap(): void {
|
||||
if (this._phase !== "error") return;
|
||||
this.goToFlashing();
|
||||
}
|
||||
|
||||
/** Escape hatch when the check itself fails: continue as if compatible custom firmware had been detected. */
|
||||
onSkipTap(): void {
|
||||
if (this._phase !== "error") return;
|
||||
// Same path as a real "custom" classification, so the phone-side G2 fonts
|
||||
// still get extracted when they're missing.
|
||||
this.applyClassification("custom", "", "");
|
||||
}
|
||||
|
||||
// --- probe flow ------------------------------------------------------------
|
||||
|
||||
private async check(): Promise<void> {
|
||||
@@ -289,6 +307,7 @@ export class OnboardingFirmwareCheckViewModel extends Observable {
|
||||
this.notifyPropertyChange("secondaryLabel", this.secondaryLabel);
|
||||
this.notifyPropertyChange("primaryVisibility", this.primaryVisibility);
|
||||
this.notifyPropertyChange("secondaryVisibility", this.secondaryVisibility);
|
||||
this.notifyPropertyChange("errorActionsVisibility", this.errorActionsVisibility);
|
||||
}
|
||||
|
||||
private disposeProbe(): void {
|
||||
|
||||
Reference in new issue
Block a user