feat: add MiscellaneousPanel - need to implement UI

This commit is contained in:
2026-09-13 19:09:47 +02:00
parent 4f2bce1f5f
commit 00b6721c42
5 changed files with 366 additions and 58 deletions
+44
View File
@@ -844,5 +844,49 @@ export function forDSP408(dsp: DSP408, setDsps: SetDsps, notify: NotifyFn) {
}
});
},
async unlockDevice(password: string): Promise<boolean> {
return withPollingPaused(dsp, setDsps, async () => {
try {
const success = await invoke<boolean>('unlock_device', {
id: dsp.id,
password,
});
if (!success) {
return false;
}
await updateDSPState();
return true;
} catch (err) {
notify(`Unlock failed: ${String(err)}`, 'error', dsp.name);
return false;
}
});
},
async lockDevice(password: string): Promise<boolean> {
return withPollingPaused(dsp, setDsps, async () => {
try {
const success = await invoke<boolean>('lock_device', {
id: dsp.id,
password,
});
if (!success) {
return false;
}
await updateDSPState();
return true;
} catch (err) {
notify(`Lock failed: ${String(err)}`, 'error', dsp.name);
return false;
}
});
},
};
}