feat: add notification for all dsp query

This commit is contained in:
Lucas
2026-09-21 14:16:04 +02:00
parent b0d4e372cb
commit f965779373
+16
View File
@@ -720,6 +720,8 @@ export function forDSP408(dsp: DSP408, setDsps: SetDsps, notify: NotifyFn) {
await updateDSPState(); await updateDSPState();
notify(`Preset stored in ${dsp.state.presets.names[presetIndex]}`, 'success', dsp.name);
return true; return true;
} catch (err) { } catch (err) {
notify(`Store configuration failed: ${String(err)}`, 'error', dsp.name); notify(`Store configuration failed: ${String(err)}`, 'error', dsp.name);
@@ -746,6 +748,8 @@ export function forDSP408(dsp: DSP408, setDsps: SetDsps, notify: NotifyFn) {
await updateDSPState(); await updateDSPState();
notify('Factory reset completed', 'success', dsp.name);
return true; return true;
} catch (err) { } catch (err) {
notify(`Factory reset failed: ${String(err)}`, 'error', dsp.name); notify(`Factory reset failed: ${String(err)}`, 'error', dsp.name);
@@ -769,6 +773,8 @@ export function forDSP408(dsp: DSP408, setDsps: SetDsps, notify: NotifyFn) {
await updateDSPState(); await updateDSPState();
notify('Channels copied successfully', 'success', dsp.name)
return true; return true;
} catch (err) { } catch (err) {
notify(`Channel copy failed: ${String(err)}`, 'error', dsp.name); notify(`Channel copy failed: ${String(err)}`, 'error', dsp.name);
@@ -791,6 +797,8 @@ export function forDSP408(dsp: DSP408, setDsps: SetDsps, notify: NotifyFn) {
await updateDSPState(); await updateDSPState();
notify('Input source updated', 'success', dsp.name);
return true; return true;
} catch (err) { } catch (err) {
notify(`Input source update failed: ${String(err)}`, 'error', dsp.name); notify(`Input source update failed: ${String(err)}`, 'error', dsp.name);
@@ -814,6 +822,8 @@ export function forDSP408(dsp: DSP408, setDsps: SetDsps, notify: NotifyFn) {
await updateDSPState(); await updateDSPState();
notify('Channels linked successfully', 'success', dsp.name);
return true; return true;
} catch (err) { } catch (err) {
notify(`Channel linking failed: ${String(err)}`, 'error', dsp.name); notify(`Channel linking failed: ${String(err)}`, 'error', dsp.name);
@@ -837,6 +847,8 @@ export function forDSP408(dsp: DSP408, setDsps: SetDsps, notify: NotifyFn) {
await updateDSPState(); await updateDSPState();
notify('Channel name updated', 'success', dsp.name);
return true; return true;
} catch (err) { } catch (err) {
notify(`Channel name update failed: ${String(err)}`, 'error', dsp.name); notify(`Channel name update failed: ${String(err)}`, 'error', dsp.name);
@@ -859,6 +871,8 @@ export function forDSP408(dsp: DSP408, setDsps: SetDsps, notify: NotifyFn) {
await updateDSPState(); await updateDSPState();
notify('Device unlocked', 'success', dsp.name);
return true; return true;
} catch (err) { } catch (err) {
notify(`Unlock failed: ${String(err)}`, 'error', dsp.name); notify(`Unlock failed: ${String(err)}`, 'error', dsp.name);
@@ -881,6 +895,8 @@ export function forDSP408(dsp: DSP408, setDsps: SetDsps, notify: NotifyFn) {
await updateDSPState(); await updateDSPState();
notify('Device locked', 'success', dsp.name);
return true; return true;
} catch (err) { } catch (err) {
notify(`Lock failed: ${String(err)}`, 'error', dsp.name); notify(`Lock failed: ${String(err)}`, 'error', dsp.name);