summaryrefslogtreecommitdiff
path: root/api/controls.ts
diff options
context:
space:
mode:
authorJustZvan <justzvan@justzvan.xyz>2026-04-06 15:32:51 +0200
committerJustZvan <justzvan@justzvan.xyz>2026-04-06 15:32:51 +0200
commit3273e7a0fbbce82f4ce6cacbcdb7b6d6848f6c1b (patch)
tree7662ab528c950e5b3605d3f134dc89f399417c8d /api/controls.ts
parent7eb8ccae48b0cc18a9dcaa9c3626a02df8e6d919 (diff)
feat: gallery scanning preferences
Diffstat (limited to 'api/controls.ts')
-rw-r--r--api/controls.ts10
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",
+ },
];
}