@glassly/engine 0.4.0-beta.1076 → 0.4.0-beta.1086
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/facades/display.d.ts +1 -1
- package/build/facades/display.d.ts.map +1 -1
- package/build/facades/display.js +1 -1
- package/build/facades/display.js.map +1 -1
- package/build/facades/settings.js +1 -1
- package/build/facades/settings.js.map +1 -1
- package/build/generated/releaseMetadata.js +3 -3
- package/build/generated/releaseMetadata.js.map +1 -1
- package/build/services/LocalMiniappRuntime.d.ts +1 -1
- package/build/services/LocalMiniappRuntime.d.ts.map +1 -1
- package/build/services/LocalMiniappRuntime.js +15 -3
- package/build/services/LocalMiniappRuntime.js.map +1 -1
- package/build/services/settingsBridge.d.ts.map +1 -1
- package/build/services/settingsBridge.js +0 -2
- package/build/services/settingsBridge.js.map +1 -1
- package/build/stores/settings.d.ts.map +1 -1
- package/build/stores/settings.js +8 -18
- package/build/stores/settings.js.map +1 -1
- package/package.json +7 -7
- package/src/facades/display.ts +1 -1
- package/src/facades/settings.ts +1 -1
- package/src/generated/releaseMetadata.ts +3 -3
- package/src/services/LocalMiniappRuntime.ts +18 -12
- package/src/services/settingsBridge.ts +0 -2
- package/src/stores/settings.ts +8 -18
|
@@ -14,6 +14,7 @@ import {AppState, Linking} from "react-native"
|
|
|
14
14
|
import {logBuffer} from "../utils/devLogging"
|
|
15
15
|
import {collectDisplayDiagnostics} from "./DisplayDiagnostics"
|
|
16
16
|
import Share from "react-native-share"
|
|
17
|
+
import {uses24HourClock} from "react-native-localize"
|
|
17
18
|
import * as Battery from "expo-battery"
|
|
18
19
|
import * as Clipboard from "expo-clipboard"
|
|
19
20
|
import {File, Paths} from "expo-file-system"
|
|
@@ -5813,28 +5814,33 @@ class LocalMiniappRuntime {
|
|
|
5813
5814
|
}
|
|
5814
5815
|
}
|
|
5815
5816
|
|
|
5816
|
-
/** Host user preferences miniapps follow by default
|
|
5817
|
+
/** Host user preferences miniapps follow by default: the metric toggle and the phone's own clock format. */
|
|
5817
5818
|
private currentPreferences(): MiniappPreferences {
|
|
5818
5819
|
const settings = useSettingsStore.getState()
|
|
5819
5820
|
return {
|
|
5820
5821
|
unitSystem: settings.getSetting(SETTINGS.metric_system.key) === true ? "metric" : "imperial",
|
|
5821
|
-
twelveHourTime:
|
|
5822
|
+
twelveHourTime: !uses24HourClock(),
|
|
5822
5823
|
}
|
|
5823
5824
|
}
|
|
5824
5825
|
|
|
5825
5826
|
private ensurePreferencesWired(): void {
|
|
5826
5827
|
if (this.preferencesWired) return
|
|
5827
5828
|
this.preferencesWired = true
|
|
5828
|
-
|
|
5829
|
-
|
|
5830
|
-
|
|
5831
|
-
()
|
|
5832
|
-
|
|
5833
|
-
|
|
5834
|
-
|
|
5835
|
-
}
|
|
5836
|
-
}
|
|
5837
|
-
|
|
5829
|
+
let sent = JSON.stringify(this.currentPreferences())
|
|
5830
|
+
const pushIfChanged = () => {
|
|
5831
|
+
const preferences = this.currentPreferences()
|
|
5832
|
+
const key = JSON.stringify(preferences)
|
|
5833
|
+
if (key === sent) return
|
|
5834
|
+
sent = key
|
|
5835
|
+
for (const packageName of this.handshookApps) {
|
|
5836
|
+
this.sendToMiniapp(packageName, {type: MiniappResponseType.PREFERENCES_UPDATE, preferences})
|
|
5837
|
+
}
|
|
5838
|
+
}
|
|
5839
|
+
useSettingsStore.subscribe((s) => s.getSetting(SETTINGS.metric_system.key) === true, pushIfChanged)
|
|
5840
|
+
// The clock format is an OS setting, so it can only have changed while the app was in the background.
|
|
5841
|
+
AppState.addEventListener("change", (state) => {
|
|
5842
|
+
if (state === "active") pushIfChanged()
|
|
5843
|
+
})
|
|
5838
5844
|
}
|
|
5839
5845
|
|
|
5840
5846
|
private currentCloudStatus(): MiniappCloudStatus {
|
|
@@ -23,7 +23,6 @@ export type SettingsBridgeAccess = "read" | "write"
|
|
|
23
23
|
export const SETTINGS_BRIDGE_KEYS: Readonly<Record<string, SettingsBridgeAccess>> = {
|
|
24
24
|
// The dashboard's master switch is a phone-side debug knob.
|
|
25
25
|
custom_dashboard_enabled: "read",
|
|
26
|
-
contextual_dashboard: "write",
|
|
27
26
|
head_up_angle: "write",
|
|
28
27
|
// Where the glasses draw; each model's steps are its display.positionRange.
|
|
29
28
|
dashboard_depth: "write",
|
|
@@ -33,7 +32,6 @@ export const SETTINGS_BRIDGE_KEYS: Readonly<Record<string, SettingsBridgeAccess>
|
|
|
33
32
|
auto_brightness: "write",
|
|
34
33
|
// Per paired model: the store resolves the indexed key.
|
|
35
34
|
preferred_mic: "write",
|
|
36
|
-
twelve_hour_time: "write",
|
|
37
35
|
menu_apps: "write",
|
|
38
36
|
notifications_enabled: "write",
|
|
39
37
|
notifications_popups: "write",
|
package/src/stores/settings.ts
CHANGED
|
@@ -708,13 +708,6 @@ export const SETTINGS: Record<string, Setting> = {
|
|
|
708
708
|
saveOnServer: true,
|
|
709
709
|
persist: true,
|
|
710
710
|
},
|
|
711
|
-
twelve_hour_time: {
|
|
712
|
-
key: "twelve_hour_time",
|
|
713
|
-
defaultValue: () => true,
|
|
714
|
-
writable: true,
|
|
715
|
-
saveOnServer: true,
|
|
716
|
-
persist: true,
|
|
717
|
-
},
|
|
718
711
|
enforce_local_transcription: {
|
|
719
712
|
key: "enforce_local_transcription",
|
|
720
713
|
defaultValue: () => false,
|
|
@@ -764,14 +757,6 @@ export const SETTINGS: Record<string, Setting> = {
|
|
|
764
757
|
saveOnServer: false,
|
|
765
758
|
persist: false,
|
|
766
759
|
},
|
|
767
|
-
// glasses settings:
|
|
768
|
-
contextual_dashboard: {
|
|
769
|
-
key: "contextual_dashboard",
|
|
770
|
-
defaultValue: () => false,
|
|
771
|
-
writable: true,
|
|
772
|
-
saveOnServer: true,
|
|
773
|
-
persist: true,
|
|
774
|
-
},
|
|
775
760
|
// Debug escape hatch: G2 scene rendering through the Glassly CFW
|
|
776
761
|
// direct-framebuffer path (rasterized mode-3 frames into the carrier).
|
|
777
762
|
// ON by default — the working production path on CFW glasses; OFF falls
|
|
@@ -957,6 +942,13 @@ export const SETTINGS: Record<string, Setting> = {
|
|
|
957
942
|
saveOnServer: false,
|
|
958
943
|
persist: true,
|
|
959
944
|
},
|
|
945
|
+
home_tips_seen: {
|
|
946
|
+
key: "home_tips_seen",
|
|
947
|
+
defaultValue: (): string[] => [],
|
|
948
|
+
writable: true,
|
|
949
|
+
saveOnServer: false,
|
|
950
|
+
persist: true,
|
|
951
|
+
},
|
|
960
952
|
// Gesture-dots debug indicator: flash a glyph on the glasses when a touch
|
|
961
953
|
// gesture is received while the display is empty. Works on any
|
|
962
954
|
// scene-capable device, not only CFW. Device-local debug knob, default off.
|
|
@@ -1261,8 +1253,7 @@ export const BLUETOOTH_SETTING_KEYS: string[] = [
|
|
|
1261
1253
|
SETTINGS.screen_disabled.key,
|
|
1262
1254
|
SETTINGS.auth_email.key,
|
|
1263
1255
|
SETTINGS.core_token.key,
|
|
1264
|
-
// glasses settings
|
|
1265
|
-
// no longer reads it):
|
|
1256
|
+
// glasses settings:
|
|
1266
1257
|
SETTINGS.head_up_angle.key,
|
|
1267
1258
|
SETTINGS.brightness.key,
|
|
1268
1259
|
SETTINGS.auto_brightness.key,
|
|
@@ -1276,7 +1267,6 @@ export const BLUETOOTH_SETTING_KEYS: string[] = [
|
|
|
1276
1267
|
SETTINGS.perf_logs.key,
|
|
1277
1268
|
SETTINGS.ring_via_glasses.key,
|
|
1278
1269
|
SETTINGS.display_max_fps.key,
|
|
1279
|
-
SETTINGS.twelve_hour_time.key,
|
|
1280
1270
|
SETTINGS.metric_system.key,
|
|
1281
1271
|
// button:
|
|
1282
1272
|
SETTINGS.button_photo_size.key,
|