feat(storage): show device-local storage alongside the server
The Storage dashboard only showed the remote server library. Split it into
two sections so both storages live there:
- "On this device": the Tier-3 service-worker audio cache (downloaded
audio — usage gauge vs max, cached-track count) plus the offline library
metadata (tracks/albums/artists browsable without the server, from the
selectLocal* selectors). Always rendered, even with no backend.
- "On the server": the existing remote dashboard, now offline-aware — a
quiet "server unreachable" notice instead of a blocking error when off.
- hook: useAudioCacheStats (reads getAudioCacheStats from the SW)
- i18n: storage.{device,server,audioCache,...} (en + ru)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -244,6 +244,17 @@ const ru: Translations = {
|
||||
},
|
||||
storage: {
|
||||
subtitle: 'Всё, что хранит этот инстанс',
|
||||
device: 'На этом устройстве',
|
||||
server: 'На сервере',
|
||||
audioCache: 'Кэш аудио',
|
||||
audioCacheUsage: 'Занято {{used}} из {{max}}',
|
||||
cachedTracks: '{{n}} треков сохранено офлайн',
|
||||
audioCacheUnavailable:
|
||||
'Офлайн-кэш аудио недоступен (service worker не активен).',
|
||||
offlineLibrary: 'Офлайн-библиотека',
|
||||
offlineLibraryMeta:
|
||||
'{{tracks}} треков · {{albums}} альбомов · {{artists}} исполнителей доступно офлайн',
|
||||
serverUnreachable: 'Сервер недоступен — показано только это устройство.',
|
||||
emptyTitle: 'Пока ничего не сохранено',
|
||||
emptyDesc:
|
||||
'Загрузите немного музыки — и здесь появится статистика вашей библиотеки.',
|
||||
|
||||
Reference in New Issue
Block a user