feat: sidebar allows recall, rename and display custom names

This commit is contained in:
2026-07-28 12:39:13 +02:00
parent da322c9df1
commit 54fda168cc
9 changed files with 632 additions and 253 deletions
+8 -4
View File
@@ -10,18 +10,22 @@ function AddDSPForm({
onAdd,
}: {
onCancel: () => void;
onAdd: (d: Omit<DSP, 'status' | 'id' | 'state' | 'meters'>) => void;
onAdd: (d: Omit<DSP, 'status' | 'id' | 'state' | 'meters' | 'pollingPaused'>) => void;
}) {
const [form, setForm] = useState({
name: '',
type: DSP_TYPES[0].name,
ip: '192.168.1.100',
port: DSP_TYPES[0].defaultPort,
deviceId: '1',
deviceId: 1,
});
const canSubmit =
form.name.trim().length > 0 && form.ip.trim().length > 0 && form.deviceId.length > 0;
form.name.trim().length > 0 &&
form.ip.trim().length > 0 &&
Number.isInteger(form.deviceId) &&
form.deviceId >= 1 &&
form.deviceId <= 255;
function submit() {
if (!canSubmit) return;
@@ -82,7 +86,7 @@ function AddDSPForm({
step={1}
placeholder="1"
value={form.deviceId}
onChange={(e) => setForm({ ...form, deviceId: e.target.value })}
onChange={(e) => setForm({ ...form, deviceId: Number(e.target.value) })}
/>
</div>
</div>