Add long-press and mic buttons to preview form; fix canula-age display in Nightscout when outside 4-day window

This commit is contained in:
James Babcock committed 2026-07-26 17:31:55 -07:00
1 parent 93d98965de
commit 57d8d2fc79
4 files changed
+70 -11

No files matched your search

+4
View File
@@ -37,7 +37,9 @@
<GridLayout rows="auto,auto,auto" columns="*,*,*" class="m-t-8">
<Button row="0" col="1" text="Swipe up" tap="{{ onSyntheticUpTap }}" />
<Button row="1" col="0" text="Double-click" tap="{{ onSyntheticLeftTap }}" />
<Button row="1" col="1" text="Long press" tap="{{ onSyntheticLongPressTap }}" />
<Button row="1" col="2" text="Click" tap="{{ onSyntheticRightTap }}" />
<Button row="0" col="2" text="Microphone" tap="{{ onSyntheticMicTap }}" />
<Button row="2" col="1" text="Swipe down" tap="{{ onSyntheticDownTap }}" />
</GridLayout>
<Button text="Save raw screenshot" tap="{{ onScreenshotTap }}" visibility="{{ screenshotButtonVisibility }}" />
@@ -83,7 +85,9 @@
<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="1" text="Long press" tap="{{ onSyntheticLongPressTap }}" />
<Button row="1" col="2" text="Click" tap="{{ onSyntheticRightTap }}" />
<Button row="0" col="2" text="Microphone" tap="{{ onSyntheticMicTap }}" />
<Button row="2" col="1" text="Swipe down" tap="{{ onSyntheticDownTap }}" />
</GridLayout>
<Button text="Save raw screenshot" tap="{{ onScreenshotTap }}" visibility="{{ screenshotButtonVisibility }}" />
+8
View File
@@ -437,6 +437,14 @@ export class MainViewModel extends Observable {
await dashboardController.injectSyntheticRingInput("click");
}
async onSyntheticLongPressTap(): Promise<void> {
await dashboardController.injectSyntheticRingInput("long-press");
}
async onSyntheticMicTap(): Promise<void> {
await dashboardController.injectSyntheticRingInput("wakeword");
}
private appendLog(line: string): void {
const stamp = new Date().toISOString().slice(11, 19);
this.log = this.log ? `${this.log}\n[${stamp}] ${line}` : `[${stamp}] ${line}`;