feat(storage): functional Storage dashboard (§A6)
Replace the "coming soon" stub with a real dashboard wired to `GET /storage`. modern-sk visuals: a layered disk-capacity gauge (library share vs other-used vs free), stat tiles (tracks/artists/albums/playtime/ footprint/avg size), per-format size bars, metadata-health badges, source breakdown, a popularity-weighted top-genres cloud, and playful fun facts. - types: full `StorageStats` shape + `toStorageStats` snake→camel mapper - endpoint: re-point `getStorageStats` to `GET /storage` with transform - lib: `formatLongDuration` for big playtime spans - i18n: `storage.*` keys (en + ru) - three list states (loading / error / empty) per the UI invariant Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -212,6 +212,42 @@ const ru: Translations = {
|
||||
comingSoon: 'Скоро',
|
||||
back: 'Назад',
|
||||
},
|
||||
storage: {
|
||||
subtitle: 'Всё, что хранит этот инстанс',
|
||||
emptyTitle: 'Пока ничего не сохранено',
|
||||
emptyDesc:
|
||||
'Загрузите немного музыки — и здесь появится статистика вашей библиотеки.',
|
||||
disk: 'Диск',
|
||||
diskUsage: 'Занято {{used}} из {{total}}',
|
||||
diskFree: 'Свободно {{free}}',
|
||||
diskLibraryShare: 'Библиотека занимает {{percent}}% всего диска',
|
||||
diskUnknown: 'Объектное хранилище — фиксированного диска нет',
|
||||
footprint: 'Объём библиотеки',
|
||||
tracks: 'Треки',
|
||||
artists: 'Исполнители',
|
||||
albums: 'Альбомы',
|
||||
playtime: 'Общая длительность',
|
||||
avgTrackSize: 'Средний размер трека',
|
||||
largestTrack: 'Самый большой трек',
|
||||
formats: 'Форматы',
|
||||
sources: 'Откуда взято',
|
||||
metadataHealth: 'Состояние метаданных',
|
||||
topGenres: 'Топ жанров',
|
||||
noGenres: 'Жанры пока не указаны',
|
||||
funFacts: 'Интересные факты',
|
||||
factPlaytime:
|
||||
'Нажмите play и уходите — библиотека играет {{duration}} без остановки.',
|
||||
factFootprint: '{{size}} музыки в {{tracks}} треках.',
|
||||
factGenre: 'Чаще всего встречается жанр {{genre}} ({{count}} треков).',
|
||||
factAvg: 'Средний трек весит {{size}}.',
|
||||
factSince: 'Коллекция собирается с {{date}}.',
|
||||
status: {
|
||||
enriched: 'Обогащено',
|
||||
manual: 'Вручную',
|
||||
pending: 'В ожидании',
|
||||
failed: 'Ошибка',
|
||||
},
|
||||
},
|
||||
pages: {
|
||||
admin: 'Администрирование',
|
||||
settings: 'Настройки',
|
||||
|
||||
Reference in New Issue
Block a user