diff options
| author | JustZvan <justzvan@justzvan.xyz> | 2026-04-06 15:32:51 +0200 |
|---|---|---|
| committer | JustZvan <justzvan@justzvan.xyz> | 2026-04-06 15:32:51 +0200 |
| commit | 3273e7a0fbbce82f4ce6cacbcdb7b6d6848f6c1b (patch) | |
| tree | 7662ab528c950e5b3605d3f134dc89f399417c8d /api/controls.ts | |
| parent | 7eb8ccae48b0cc18a9dcaa9c3626a02df8e6d919 (diff) | |
feat: gallery scanning preferences
Diffstat (limited to 'api/controls.ts')
| -rw-r--r-- | api/controls.ts | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/api/controls.ts b/api/controls.ts index 53db7a1..e8c3b02 100644 --- a/api/controls.ts +++ b/api/controls.ts @@ -1,5 +1,5 @@ import { apiClient } from "./client"; -import { ControlsData, SafetyControl } from "./types"; +import { ControlsData, SafetyControl, SafetyControlValue } from "./types"; export async function getControlsData(): Promise<ControlsData> { const deviceId = apiClient.getSelectedDeviceId(); @@ -30,7 +30,7 @@ export async function getControlsData(): Promise<ControlsData> { export async function updateSafetyControl( key: string, - value: boolean + value: SafetyControlValue, ): Promise<void> { const deviceId = apiClient.getSelectedDeviceId(); @@ -97,5 +97,11 @@ function getDefaultControls(): SafetyControl[] { description: "Notify when a new contact is added.", defaultValue: true, }, + { + key: "gallery_scanning_mode", + title: "Gallery scanning", + description: "Scan gallery for inappropriate images", + defaultValue: "none", + }, ]; } |