fix(ui): typLabel in DeviceDiscovery definiert (Laufwerks-Details-Button gefixt) & Settings Tab-Wechsel robuster gemacht
Ampel / ampel (push) Successful in 28s
Ampel / ampel (push) Successful in 28s
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user