fix(ui): typLabel in DeviceDiscovery definiert (Laufwerks-Details-Button gefixt) & Settings Tab-Wechsel robuster gemacht
Ampel / ampel (push) Successful in 28s

This commit is contained in:
Hitonabi
2026-07-24 17:04:18 +02:00
parent 67a4a76afa
commit fe1387b1ec
3 changed files with 16 additions and 6 deletions
@@ -43,6 +43,16 @@ function posterUrl(disc?: DiscInfo): string | null {
return p.startsWith('http') ? p : `https://image.tmdb.org/t/p/w342${p}`
}
function typLabel(type: string): string {
switch (type) {
case 'cd': return 'Audio CD'
case 'dvd': return 'DVD'
case 'bluray': return 'Blu-ray'
case 'uhd': return '4K UHD'
default: return 'Unbekannt'
}
}
export default function DeviceDiscovery() {
const [devices, setDevices] = useState<Device[]>([])
const [loading, setLoading] = useState(true)
+3 -3
View File
@@ -70,12 +70,12 @@ export default function StorageMounts() {
const laden = async (manuell = false) => {
try {
const [m, t] = await Promise.all([
const [m, t] = await Promise.allSettled([
api.get('/storage-mounts'),
api.get('/storage-targets'),
])
setMounts(m.data)
setTargets(t.data)
if (m.status === 'fulfilled') setMounts(m.value.data || [])
if (t.status === 'fulfilled') setTargets(t.value.data || [])
if (manuell) toast('success', 'Speicherziele aktualisiert')
} catch {
if (manuell) toast('error', 'Speicherziele konnten nicht geladen werden')