Terminal feature; raw screenshots.

This commit is contained in:
James Babcock committed 2026-07-04 17:38:53 -07:00
1 parent d2a942f5a3
commit fab6f6689e
19 files changed
+1075 -10

No files matched your search

+10 -6
View File
@@ -25,6 +25,7 @@
<Button row="1" col="2" text="Click" tap="{{ onSyntheticRightTap }}" />
<Button row="2" col="1" text="Swipe down" tap="{{ onSyntheticDownTap }}" />
</GridLayout>
<Button text="Save raw screenshot" tap="{{ onScreenshotTap }}" visibility="{{ screenshotButtonVisibility }}" />
</StackLayout>
<Label row="2" text="{{ status }}" class="m-t-16" textWrap="true" />
<ScrollView id="logScrollView" row="3" class="m-t-16" visibility="{{ showLogVisibility }}">
@@ -49,12 +50,15 @@
width="{{ landscapeDisplayPreviewWidth }}"
height="{{ landscapeDisplayPreviewHeight }}" />
</StackLayout>
<GridLayout row="0" col="1" rows="auto,auto,auto" columns="*,*,*" class="m-l-16">
<Button row="0" col="1" text="Swipe up" tap="{{ onSyntheticUpTap }}" />
<Button row="1" col="0" text="Double-click" tap="{{ onSyntheticLeftTap }}" />
<Button row="1" col="2" text="Click" tap="{{ onSyntheticRightTap }}" />
<Button row="2" col="1" text="Swipe down" tap="{{ onSyntheticDownTap }}" />
</GridLayout>
<StackLayout row="0" col="1" class="m-l-16">
<GridLayout rows="auto,auto,auto" columns="*,*,*">
<Button row="0" col="1" text="Swipe up" tap="{{ onSyntheticUpTap }}" />
<Button row="1" col="0" text="Double-click" tap="{{ onSyntheticLeftTap }}" />
<Button row="1" col="2" text="Click" tap="{{ onSyntheticRightTap }}" />
<Button row="2" col="1" text="Swipe down" tap="{{ onSyntheticDownTap }}" />
</GridLayout>
<Button text="Save raw screenshot" tap="{{ onScreenshotTap }}" visibility="{{ screenshotButtonVisibility }}" />
</StackLayout>
<Label row="1" col="0" colSpan="2" text="{{ status }}" class="m-t-16" textWrap="true" />
<ScrollView id="logScrollViewLandscape" row="2" col="0" colSpan="2" class="m-t-16" visibility="{{ showLogVisibility }}">
<Label text="{{ log }}" textWrap="true" verticalAlignment="top" />
+26
View File
@@ -15,6 +15,7 @@ export class MainViewModel extends Observable {
private _evenAppConflictWarningVisible = false;
private _firmwareWarningMessage = "";
private _firmwareWarningVisible = false;
private _rawScreenshotsEnabled = false;
private _showLog = false;
private _phase: "disconnected" | "connecting" | "connected" | "disconnecting" = "disconnected";
@@ -32,6 +33,7 @@ export class MainViewModel extends Observable {
this.evenAppConflictWarningVisible = snapshot.evenAppConflictWarningVisible;
this.firmwareWarningMessage = snapshot.firmwareWarningMessage;
this.firmwareWarningVisible = snapshot.firmwareWarningVisible;
this.rawScreenshotsEnabled = snapshot.rawScreenshotsEnabled;
});
}
@@ -230,6 +232,30 @@ export class MainViewModel extends Observable {
return this._firmwareWarningVisible ? "visible" : "collapse";
}
get rawScreenshotsEnabled(): boolean {
return this._rawScreenshotsEnabled;
}
set rawScreenshotsEnabled(value: boolean) {
if (this._rawScreenshotsEnabled !== value) {
this._rawScreenshotsEnabled = value;
this.notifyPropertyChange("rawScreenshotsEnabled", value);
this.notifyPropertyChange("screenshotButtonVisibility", this.screenshotButtonVisibility);
}
}
get screenshotButtonVisibility(): "visible" | "collapse" {
return this._rawScreenshotsEnabled ? "visible" : "collapse";
}
onScreenshotTap(): void {
try {
dashboardController.saveRawDashboardScreenshot();
} catch (error) {
console.error("raw screenshot failed", error);
}
}
get phase(): "disconnected" | "connecting" | "connected" | "disconnecting" {
return this._phase;
}