@glassly/engine 0.3.5 → 0.3.6-beta.851
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/engine.d.ts +11 -1
- package/build/engine.d.ts.map +1 -1
- package/build/engine.js +13 -1
- package/build/engine.js.map +1 -1
- package/build/facades/ai.d.ts +3 -3
- package/build/facades/ai.d.ts.map +1 -1
- package/build/facades/ai.js +3 -3
- package/build/facades/ai.js.map +1 -1
- package/build/facades/glasses.d.ts +5 -1
- package/build/facades/glasses.d.ts.map +1 -1
- package/build/facades/glasses.js +39 -30
- package/build/facades/glasses.js.map +1 -1
- package/build/facades/memory.d.ts +10 -2
- package/build/facades/memory.d.ts.map +1 -1
- package/build/facades/memory.js +10 -0
- package/build/facades/memory.js.map +1 -1
- package/build/facades/miniapps.d.ts +2 -0
- package/build/facades/miniapps.d.ts.map +1 -1
- package/build/facades/miniapps.js +2 -0
- package/build/facades/miniapps.js.map +1 -1
- package/build/facades/pairing.d.ts.map +1 -1
- package/build/facades/pairing.js +3 -2
- package/build/facades/pairing.js.map +1 -1
- package/build/facades/providerKeys.d.ts +6 -2
- package/build/facades/providerKeys.d.ts.map +1 -1
- package/build/facades/providerKeys.js +6 -2
- package/build/facades/providerKeys.js.map +1 -1
- package/build/generated/releaseMetadata.js +4 -4
- package/build/generated/releaseMetadata.js.map +1 -1
- package/build/services/AiTierResolution.d.ts +3 -2
- package/build/services/AiTierResolution.d.ts.map +1 -1
- package/build/services/AiTierResolution.js +7 -2
- package/build/services/AiTierResolution.js.map +1 -1
- package/build/services/AppRegistry.d.ts +4 -1
- package/build/services/AppRegistry.d.ts.map +1 -1
- package/build/services/AppRegistry.js +16 -2
- package/build/services/AppRegistry.js.map +1 -1
- package/build/services/BlobStore.js +3 -3
- package/build/services/BlobStore.js.map +1 -1
- package/build/services/BluetoothRestoreLaunch.d.ts +8 -0
- package/build/services/BluetoothRestoreLaunch.d.ts.map +1 -0
- package/build/services/BluetoothRestoreLaunch.js +34 -0
- package/build/services/BluetoothRestoreLaunch.js.map +1 -0
- package/build/services/CloudClientService.d.ts +4 -4
- package/build/services/ForegroundLocationPermission.d.ts +1 -1
- package/build/services/ForegroundLocationPermission.d.ts.map +1 -1
- package/build/services/ForegroundLocationPermission.js.map +1 -1
- package/build/services/GestureDotsService.d.ts.map +1 -1
- package/build/services/GestureDotsService.js +2 -1
- package/build/services/GestureDotsService.js.map +1 -1
- package/build/services/GlassesTouchInput.d.ts +6 -4
- package/build/services/GlassesTouchInput.d.ts.map +1 -1
- package/build/services/GlassesTouchInput.js +81 -41
- package/build/services/GlassesTouchInput.js.map +1 -1
- package/build/services/LocalDisplayManager.d.ts +12 -4
- package/build/services/LocalDisplayManager.d.ts.map +1 -1
- package/build/services/LocalDisplayManager.js +21 -7
- package/build/services/LocalDisplayManager.js.map +1 -1
- package/build/services/LocalLlmModelManager.d.ts +3 -1
- package/build/services/LocalLlmModelManager.d.ts.map +1 -1
- package/build/services/LocalLlmModelManager.js +13 -5
- package/build/services/LocalLlmModelManager.js.map +1 -1
- package/build/services/LocalLlmPrompt.d.ts +10 -9
- package/build/services/LocalLlmPrompt.d.ts.map +1 -1
- package/build/services/LocalLlmPrompt.js +43 -32
- package/build/services/LocalLlmPrompt.js.map +1 -1
- package/build/services/LocalLlmProvider.d.ts +1 -0
- package/build/services/LocalLlmProvider.d.ts.map +1 -1
- package/build/services/LocalLlmProvider.js +62 -22
- package/build/services/LocalLlmProvider.js.map +1 -1
- package/build/services/LocalMiniappRuntime.d.ts +28 -6
- package/build/services/LocalMiniappRuntime.d.ts.map +1 -1
- package/build/services/LocalMiniappRuntime.js +190 -148
- package/build/services/LocalMiniappRuntime.js.map +1 -1
- package/build/services/MemoryStore.d.ts +13 -1
- package/build/services/MemoryStore.d.ts.map +1 -1
- package/build/services/MemoryStore.js +98 -1
- package/build/services/MemoryStore.js.map +1 -1
- package/build/services/MiniappExitGesture.d.ts +6 -3
- package/build/services/MiniappExitGesture.d.ts.map +1 -1
- package/build/services/MiniappExitGesture.js +4 -4
- package/build/services/MiniappExitGesture.js.map +1 -1
- package/build/services/MiniappWidgetMode.d.ts +6 -4
- package/build/services/MiniappWidgetMode.d.ts.map +1 -1
- package/build/services/MiniappWidgetMode.js +7 -6
- package/build/services/MiniappWidgetMode.js.map +1 -1
- package/build/services/ProviderKeyValidation.d.ts +2 -0
- package/build/services/ProviderKeyValidation.d.ts.map +1 -1
- package/build/services/ProviderKeyValidation.js +4 -0
- package/build/services/ProviderKeyValidation.js.map +1 -1
- package/build/services/SceneRenderer.d.ts.map +1 -1
- package/build/services/SceneRenderer.js +3 -1
- package/build/services/SceneRenderer.js.map +1 -1
- package/build/services/ScreenshotFixture.d.ts +56 -0
- package/build/services/ScreenshotFixture.d.ts.map +1 -0
- package/build/services/ScreenshotFixture.js +72 -0
- package/build/services/ScreenshotFixture.js.map +1 -0
- package/build/services/actionInvoke.d.ts +37 -0
- package/build/services/actionInvoke.d.ts.map +1 -0
- package/build/services/actionInvoke.js +89 -0
- package/build/services/actionInvoke.js.map +1 -0
- package/build/services/appleWatch/AppleWatchLink.d.ts +42 -0
- package/build/services/appleWatch/AppleWatchLink.d.ts.map +1 -0
- package/build/services/appleWatch/AppleWatchLink.js +259 -0
- package/build/services/appleWatch/AppleWatchLink.js.map +1 -0
- package/build/services/controllers.d.ts.map +1 -1
- package/build/services/controllers.js +16 -0
- package/build/services/controllers.js.map +1 -1
- package/build/services/manifestActions.d.ts +4 -2
- package/build/services/manifestActions.d.ts.map +1 -1
- package/build/services/manifestActions.js +9 -3
- package/build/services/manifestActions.js.map +1 -1
- package/build/services/memoryBackupFile.d.ts +9 -0
- package/build/services/memoryBackupFile.d.ts.map +1 -0
- package/build/services/memoryBackupFile.js +47 -0
- package/build/services/memoryBackupFile.js.map +1 -0
- package/build/services/settingsBridge.d.ts +4 -4
- package/build/services/settingsBridge.d.ts.map +1 -1
- package/build/services/settingsBridge.js +9 -4
- package/build/services/settingsBridge.js.map +1 -1
- package/build/services/widgetPlacements.d.ts +8 -7
- package/build/services/widgetPlacements.d.ts.map +1 -1
- package/build/services/widgetPlacements.js +7 -6
- package/build/services/widgetPlacements.js.map +1 -1
- package/build/stores/apps.d.ts +6 -0
- package/build/stores/apps.d.ts.map +1 -1
- package/build/stores/apps.js +29 -12
- package/build/stores/apps.js.map +1 -1
- package/build/stores/bluetoothSettingKeys.d.ts +2 -0
- package/build/stores/bluetoothSettingKeys.d.ts.map +1 -1
- package/build/stores/bluetoothSettingKeys.js +17 -0
- package/build/stores/bluetoothSettingKeys.js.map +1 -1
- package/build/stores/settings.d.ts.map +1 -1
- package/build/stores/settings.js +42 -2
- package/build/stores/settings.js.map +1 -1
- package/build/types/applet.d.ts +5 -1
- package/build/types/applet.d.ts.map +1 -1
- package/build/types/applet.js.map +1 -1
- package/build/types/capabilities/rayneo-io.d.ts.map +1 -1
- package/build/types/capabilities/rayneo-io.js +2 -0
- package/build/types/capabilities/rayneo-io.js.map +1 -1
- package/build/types/enums.d.ts +2 -1
- package/build/types/enums.d.ts.map +1 -1
- package/build/types/enums.js +1 -0
- package/build/types/enums.js.map +1 -1
- package/build/utils/cloudClient/RnUdpAdapter.d.ts.map +1 -1
- package/build/utils/cloudClient/RnUdpAdapter.js +13 -2
- package/build/utils/cloudClient/RnUdpAdapter.js.map +1 -1
- package/build/utils/display/scene/index.d.ts +1 -1
- package/build/utils/display/scene/index.d.ts.map +1 -1
- package/build/utils/display/scene/index.js.map +1 -1
- package/build/utils/display/scene/process.d.ts.map +1 -1
- package/build/utils/display/scene/process.js +20 -1
- package/build/utils/display/scene/process.js.map +1 -1
- package/build/utils/display/scene/types.d.ts +1 -1
- package/build/utils/display/scene/types.d.ts.map +1 -1
- package/build/utils/display/scene/types.js.map +1 -1
- package/build/utils/miniappGlobals.d.ts +6 -0
- package/build/utils/miniappGlobals.d.ts.map +1 -1
- package/build/utils/miniappGlobals.js +28 -4
- package/build/utils/miniappGlobals.js.map +1 -1
- package/package.json +9 -9
- package/src/engine.ts +13 -1
- package/src/facades/ai.ts +3 -3
- package/src/facades/glasses.ts +65 -42
- package/src/facades/memory.ts +11 -2
- package/src/facades/miniapps.ts +3 -0
- package/src/facades/pairing.ts +4 -2
- package/src/facades/providerKeys.ts +6 -1
- package/src/generated/releaseMetadata.ts +4 -4
- package/src/services/AiTierResolution.ts +9 -3
- package/src/services/AppRegistry.ts +18 -3
- package/src/services/BlobStore.ts +3 -3
- package/src/services/BluetoothRestoreLaunch.ts +37 -0
- package/src/services/ForegroundLocationPermission.ts +1 -1
- package/src/services/GestureDotsService.ts +2 -1
- package/src/services/GlassesTouchInput.ts +86 -38
- package/src/services/LocalDisplayManager.ts +22 -8
- package/src/services/LocalLlmModelManager.ts +16 -6
- package/src/services/LocalLlmPrompt.ts +56 -37
- package/src/services/LocalLlmProvider.ts +74 -24
- package/src/services/LocalMiniappRuntime.ts +228 -147
- package/src/services/MemoryStore.ts +111 -2
- package/src/services/MiniappExitGesture.ts +8 -5
- package/src/services/MiniappWidgetMode.ts +9 -7
- package/src/services/ProviderKeyValidation.ts +5 -0
- package/src/services/SceneRenderer.ts +3 -1
- package/src/services/ScreenshotFixture.ts +113 -0
- package/src/services/actionInvoke.ts +105 -0
- package/src/services/appleWatch/AppleWatchLink.ts +297 -0
- package/src/services/controllers.ts +17 -0
- package/src/services/manifestActions.ts +16 -4
- package/src/services/memoryBackupFile.ts +50 -0
- package/src/services/settingsBridge.ts +9 -4
- package/src/services/widgetPlacements.ts +23 -9
- package/src/stores/apps.ts +35 -11
- package/src/stores/bluetoothSettingKeys.ts +20 -0
- package/src/stores/settings.ts +44 -2
- package/src/types/applet.ts +5 -1
- package/src/types/capabilities/rayneo-io.ts +2 -0
- package/src/types/enums.ts +1 -0
- package/src/utils/cloudClient/RnUdpAdapter.ts +13 -1
- package/src/utils/display/scene/index.ts +1 -0
- package/src/utils/display/scene/process.ts +17 -1
- package/src/utils/display/scene/types.ts +1 -0
- package/src/utils/miniappGlobals.ts +30 -4
|
@@ -32,4 +32,21 @@ function isMentraLiveDevice(model) {
|
|
|
32
32
|
export function getBluetoothSettingKeysForDevice(deviceModel, fullKeys) {
|
|
33
33
|
return isMentraLiveDevice(deviceModel) ? MENTRA_LIVE_SETTING_KEYS : fullKeys;
|
|
34
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* Glasses Menu entries the firmware's own menu cannot open: Settings is the
|
|
37
|
+
* dashboard's glasses page, which only the dashboard's Apps menu shows.
|
|
38
|
+
*/
|
|
39
|
+
const NATIVE_MENU_EXCLUDED_PACKAGES = new Set(["com.glassly.settings"]);
|
|
40
|
+
const nativeMenuAppsCache = new WeakMap();
|
|
41
|
+
/** `menu_apps` as the glasses get it; the same array in gives the same array out, so the change-push stays quiet. */
|
|
42
|
+
export function nativeMenuApps(value) {
|
|
43
|
+
if (!Array.isArray(value))
|
|
44
|
+
return value;
|
|
45
|
+
let filtered = nativeMenuAppsCache.get(value);
|
|
46
|
+
if (!filtered) {
|
|
47
|
+
filtered = value.filter((item) => !NATIVE_MENU_EXCLUDED_PACKAGES.has(item?.packageName ?? ""));
|
|
48
|
+
nativeMenuAppsCache.set(value, filtered);
|
|
49
|
+
}
|
|
50
|
+
return filtered;
|
|
51
|
+
}
|
|
35
52
|
//# sourceMappingURL=bluetoothSettingKeys.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bluetoothSettingKeys.js","sourceRoot":"","sources":["../../src/stores/bluetoothSettingKeys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,UAAU,CAAA;AAEpC,iFAAiF;AACjF,MAAM,CAAC,MAAM,wBAAwB,GAAa;IAChD,iBAAiB;IACjB,gBAAgB;IAChB,eAAe;IACf,kCAAkC;IAClC,uBAAuB;IACvB,YAAY;IACZ,YAAY;IACZ,mBAAmB;IACnB,uBAAuB;IACvB,2BAA2B;IAC3B,YAAY;IACZ,cAAc;IACd,2BAA2B;IAC3B,cAAc;IACd,kBAAkB;IAClB,kBAAkB;IAClB,aAAa;IACb,gBAAgB;IAChB,aAAa;IACb,oBAAoB;IACpB,yDAAyD;IACzD,oBAAoB;IACpB,wBAAwB;IACxB,oBAAoB;CACrB,CAAA;AAED,SAAS,kBAAkB,CAAC,KAAyB;IACnD,OAAO,KAAK,KAAK,WAAW,CAAC,IAAI,CAAA;AACnC,CAAC;AAED,MAAM,UAAU,gCAAgC,CAAC,WAA+B,EAAE,QAAkB;IAClG,OAAO,kBAAkB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,QAAQ,CAAA;AAC9E,CAAC","sourcesContent":["import {DeviceTypes} from \"../types\"\n\n/** Mentra Live has no display — omit dashboard/brightness keys from BLE sync. */\nexport const MENTRA_LIVE_SETTING_KEYS: string[] = [\n \"sensing_enabled\",\n \"lc3_frame_size\",\n \"preferred_mic\",\n \"voice_activity_detection_enabled\",\n \"loudness_gate_enabled\",\n \"core_token\",\n \"auth_email\",\n \"button_photo_size\",\n \"button_video_settings\",\n \"button_max_recording_time\",\n \"camera_fov\",\n \"offline_mode\",\n \"local_stt_fallback_active\",\n \"gallery_mode\",\n \"default_wearable\",\n \"pending_wearable\",\n \"device_name\",\n \"device_address\",\n \"controllers\",\n \"pending_controller\",\n // Deprecated, kept so native can migrate and clear them:\n \"default_controller\",\n \"controller_device_name\",\n \"controller_address\",\n]\n\nfunction isMentraLiveDevice(model: string | undefined): boolean {\n return model === DeviceTypes.LIVE\n}\n\nexport function getBluetoothSettingKeysForDevice(deviceModel: string | undefined, fullKeys: string[]): string[] {\n return isMentraLiveDevice(deviceModel) ? MENTRA_LIVE_SETTING_KEYS : fullKeys\n}\n"]}
|
|
1
|
+
{"version":3,"file":"bluetoothSettingKeys.js","sourceRoot":"","sources":["../../src/stores/bluetoothSettingKeys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,UAAU,CAAA;AAEpC,iFAAiF;AACjF,MAAM,CAAC,MAAM,wBAAwB,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jB,CAAC","sourcesContent":["import {DeviceTypes} from \"../types\"\n\n/** Mentra Live has no display — omit dashboard/brightness keys from BLE sync. */\nexport const MENTRA_LIVE_SETTING_KEYS: string[] = [\n \"sensing_enabled\",\n \"lc3_frame_size\",\n \"preferred_mic\",\n \"voice_activity_detection_enabled\",\n \"loudness_gate_enabled\",\n \"core_token\",\n \"auth_email\",\n \"button_photo_size\",\n \"button_video_settings\",\n \"button_max_recording_time\",\n \"camera_fov\",\n \"offline_mode\",\n \"local_stt_fallback_active\",\n \"gallery_mode\",\n \"default_wearable\",\n \"pending_wearable\",\n \"device_name\",\n \"device_address\",\n \"controllers\",\n \"pending_controller\",\n // Deprecated, kept so native can migrate and clear them:\n \"default_controller\",\n \"controller_device_name\",\n \"controller_address\",\n]\n\nfunction isMentraLiveDevice(model: string | undefined): boolean {\n return model === DeviceTypes.LIVE\n}\n\nexport function getBluetoothSettingKeysForDevice(deviceModel: string | undefined, fullKeys: string[]): string[] {\n return isMentraLiveDevice(deviceModel) ? MENTRA_LIVE_SETTING_KEYS : fullKeys\n}\n\n/**\n * Glasses Menu entries the firmware's own menu cannot open: Settings is the\n * dashboard's glasses page, which only the dashboard's Apps menu shows.\n */\nconst NATIVE_MENU_EXCLUDED_PACKAGES = new Set([\"com.glassly.settings\"])\nconst nativeMenuAppsCache = new WeakMap<object, unknown[]>()\n\n/** `menu_apps` as the glasses get it; the same array in gives the same array out, so the change-push stays quiet. */\nexport function nativeMenuApps(value: unknown): unknown {\n if (!Array.isArray(value)) return value\n let filtered = nativeMenuAppsCache.get(value)\n if (!filtered) {\n filtered = value.filter(\n (item) => !NATIVE_MENU_EXCLUDED_PACKAGES.has((item as {packageName?: string} | null)?.packageName ?? \"\"),\n )\n nativeMenuAppsCache.set(value, filtered)\n }\n return filtered\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/stores/settings.ts"],"names":[],"mappings":"AACA,OAAO,EAAC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E,GAAG,CAAC,KAAK,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;IAC3E,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,GAAG,CAAA;IAEhC,eAAe,EAAE,MAAM,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;IAE/C,oBAAoB,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC/C,uBAAuB,EAAE,MAAM,IAAI,CAAA;CACpC;AAoBD,eAAO,MAAM,gBAAgB;;;;;;;;EAsW5B,CAAA;AAED,eAAO,MAAM,UAAU,GAAI,CAAC,GAAG,GAAG,EAAE,KAAK,MAAM,KAAG,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAI3F,CAAA"}
|
package/build/stores/settings.js
CHANGED
|
@@ -2,8 +2,9 @@ import { getTimeZone } from "react-native-localize";
|
|
|
2
2
|
import { result as Res } from "typesafe-ts";
|
|
3
3
|
import { create } from "zustand";
|
|
4
4
|
import { subscribeWithSelector } from "zustand/middleware";
|
|
5
|
+
import { isScreenshotMode } from "../services/ScreenshotFixture";
|
|
5
6
|
import { storage } from "../utils/storage";
|
|
6
|
-
import { getBluetoothSettingKeysForDevice } from "./bluetoothSettingKeys";
|
|
7
|
+
import { getBluetoothSettingKeysForDevice, nativeMenuApps } from "./bluetoothSettingKeys";
|
|
7
8
|
import { useGlassesStore } from "./glasses";
|
|
8
9
|
export { MENTRA_LIVE_SETTING_KEYS, getBluetoothSettingKeysForDevice } from "./bluetoothSettingKeys";
|
|
9
10
|
// The provider list the data-consent screen currently shows. Stored per
|
|
@@ -101,6 +102,8 @@ export const SETTINGS = {
|
|
|
101
102
|
home_mirror: {
|
|
102
103
|
key: "home_mirror",
|
|
103
104
|
defaultValue: () => true,
|
|
105
|
+
// The store-screenshot build always shows the mirror under its fixture G2.
|
|
106
|
+
override: () => (isScreenshotMode() ? true : undefined),
|
|
104
107
|
writable: true,
|
|
105
108
|
saveOnServer: true,
|
|
106
109
|
persist: true,
|
|
@@ -309,6 +312,13 @@ export const SETTINGS = {
|
|
|
309
312
|
saveOnServer: false,
|
|
310
313
|
persist: true,
|
|
311
314
|
},
|
|
315
|
+
deepseek_api_key: {
|
|
316
|
+
key: "deepseek_api_key",
|
|
317
|
+
defaultValue: () => "",
|
|
318
|
+
writable: true,
|
|
319
|
+
saveOnServer: false,
|
|
320
|
+
persist: true,
|
|
321
|
+
},
|
|
312
322
|
elevenlabs_api_key: {
|
|
313
323
|
key: "elevenlabs_api_key",
|
|
314
324
|
defaultValue: () => "",
|
|
@@ -787,6 +797,15 @@ export const SETTINGS = {
|
|
|
787
797
|
saveOnServer: false,
|
|
788
798
|
persist: true,
|
|
789
799
|
},
|
|
800
|
+
// Apple Watch: draw the glasses' current frame behind the watch trackpad. Frames
|
|
801
|
+
// cross WatchConnectivity while the watch app is up, so it stays off unless asked for.
|
|
802
|
+
apple_watch_mirror: {
|
|
803
|
+
key: "apple_watch_mirror",
|
|
804
|
+
defaultValue: () => false,
|
|
805
|
+
writable: true,
|
|
806
|
+
saveOnServer: false,
|
|
807
|
+
persist: true,
|
|
808
|
+
},
|
|
790
809
|
// Maximum rate at which display updates leave the phone for the glasses.
|
|
791
810
|
// The Bluetooth SDK paces every scene frame and legacy layout to this,
|
|
792
811
|
// coalescing faster updates last-wins; clears bypass it. No effect on G2
|
|
@@ -1481,6 +1500,27 @@ export const useSettingsStore = create()(subscribeWithSelector((set, get) => ({
|
|
|
1481
1500
|
if (migrationSucceeded)
|
|
1482
1501
|
storage.save(CAMERA_FOV_MIGRATION_KEY, true);
|
|
1483
1502
|
}
|
|
1503
|
+
// Settings joined the Glasses Menu (the dashboard's glasses Settings
|
|
1504
|
+
// page): add it once, last, to a menu the wearer already saved. An
|
|
1505
|
+
// unsaved menu gets it from the default; a full one (10) is left alone.
|
|
1506
|
+
const MENU_SETTINGS_MIGRATION_KEY = "migration:menu_apps_settings_v1";
|
|
1507
|
+
const menuSettingsMigrationDone = storage.load(MENU_SETTINGS_MIGRATION_KEY);
|
|
1508
|
+
if (menuSettingsMigrationDone.is_error() || !menuSettingsMigrationDone.value) {
|
|
1509
|
+
const menu = get().getSetting(SETTINGS.menu_apps.key);
|
|
1510
|
+
let menuMigrated = true;
|
|
1511
|
+
if (Array.isArray(menu) &&
|
|
1512
|
+
menu.length < 10 &&
|
|
1513
|
+
!menu.some((item) => item?.packageName === "com.glassly.settings")) {
|
|
1514
|
+
const next = [...menu, { packageName: "com.glassly.settings", name: "Settings" }];
|
|
1515
|
+
const result = await get().setSetting(SETTINGS.menu_apps.key, next, true);
|
|
1516
|
+
if (result.is_error()) {
|
|
1517
|
+
console.log("SETTINGS: menu_apps Settings migration failed:", result.error);
|
|
1518
|
+
menuMigrated = false;
|
|
1519
|
+
}
|
|
1520
|
+
}
|
|
1521
|
+
if (menuMigrated)
|
|
1522
|
+
storage.save(MENU_SETTINGS_MIGRATION_KEY, true);
|
|
1523
|
+
}
|
|
1484
1524
|
});
|
|
1485
1525
|
loadAllSettingsInFlight = inFlight;
|
|
1486
1526
|
void Promise.resolve(inFlight).then((result) => {
|
|
@@ -1502,7 +1542,7 @@ export const useSettingsStore = create()(subscribeWithSelector((set, get) => ({
|
|
|
1502
1542
|
if (key === SETTINGS.core_token.key && (typeof value !== "string" || value.trim().length === 0)) {
|
|
1503
1543
|
continue;
|
|
1504
1544
|
}
|
|
1505
|
-
bluetoothSettings[key] = value;
|
|
1545
|
+
bluetoothSettings[key] = key === SETTINGS.menu_apps.key ? nativeMenuApps(value) : value;
|
|
1506
1546
|
}
|
|
1507
1547
|
return bluetoothSettings;
|
|
1508
1548
|
},
|