mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-21 23:05:46 +00:00
2a496c600b
* refactor(settings): regroup tabs thematically + accordion sub-sections (progress on #257) New tab structure: Servers (first) · Library · Audio · Lyrics · Appearance · Personalisation · Integrations · Input · Storage · System · Users. Reusable SettingsSubSection (native <details>) wraps related settings per tab, with an optional action slot for per-section reset buttons. Moved: - Lyrics sources + sidebar lyrics style → Lyrics - Sidebar / artist layout / home customisers → Personalisation - Last.fm / Discord / Bandsintown / Now-playing share → Integrations (with an opt-in privacy banner at the top) - Tray / minimize / Linux smooth-scroll → System (new App-Verhalten group) - Preload mini-player / custom titlebar / show artist images → Appearance visual options - Language picker → System Audio, Appearance and System tabs are now fully accordion-grouped. Library tab reduced to Random Mix + Ratings accordions. Servers tab is its own home (server cards + AudioMuse + logout) and the default landing tab. Indicators in the titlebar and offline banner route to the right tab. EN + DE translations added for the new tab labels and privacy banner; other locales fall back to English until the full i18n pass lands. * refactor(settings): audio/input/storage/system accordions, in-page search, Navidrome focus Settings refactor progress — every tab is now accordion-grouped: - Audio: Output · Hi-Res · EQ · Playback · Next-track buffer - Input: Keybindings · Global shortcuts (reset in accordion action slot) - Storage: Offline · Downloads - System: Language (default open) · Behavior · Backup · Logging · About · Contributors - Contributors: own card grid with per-contributor expand, sorted by contribution count. Changelog accordion removed (release-notes link and "show changelog on update" toggle now live inside About). - About: Navidrome focus; AI credit and Special Thanks removed; new Maintainers row (Psychotoxical + cucadmuh). In-page search: magnifier icon next to the Settings title. Click opens a 240px search field. Filters the active tab's sub-sections by title match (data-settings-search). Cross-tab search is tracked as a follow-up. serverCompatible updated in all 8 locales from "Compatible with: Navidrome Gonic Airsonic Subsonic" to a Navidrome-first wording that warns other Subsonic-compatible servers may have reduced functionality. Full i18n pass (tabLyrics/tabPersonalisation/tabIntegrations, aboutDesc, privacy banner, etc. in fr/nl/zh/nb/ru/es) follows in a separate commit after visual review. * i18n(settings): complete localisation pass for refactored tabs Added in all 8 locales (fr, nl, zh, nb, ru, es — en+de already in place): - Tab labels: tabLibrary, tabServers, tabLyrics, tabPersonalisation, tabIntegrations - inputKeybindingsTitle, searchPlaceholder, searchNoResults, aboutMaintainersLabel - integrationsPrivacyTitle, integrationsPrivacyBody - aboutContributorsCount_one/_other (ru also _few/_many for proper plural forms) - aboutDesc rewritten to describe a Navidrome-focused player instead of a generic Subsonic-compatible one. Removed dead keys in all 8 locales: - aboutAiCredit, aboutSpecialThanksLabel — no longer rendered - changelog — inline changelog accordion removed - tabServer, tabGeneral — superseded by new tab structure --------- Co-authored-by: Psychotoxical <dev@psysonic.app>
40 lines
1.3 KiB
TypeScript
40 lines
1.3 KiB
TypeScript
import { useNavigate } from 'react-router-dom';
|
|
import { useTranslation } from 'react-i18next';
|
|
import { useAuthStore } from '../store/authStore';
|
|
import LastfmIcon from './LastfmIcon';
|
|
|
|
export default function LastfmIndicator() {
|
|
const { t } = useTranslation();
|
|
const navigate = useNavigate();
|
|
const { lastfmSessionKey, lastfmUsername, lastfmSessionError } = useAuthStore();
|
|
|
|
if (!lastfmSessionKey) return null;
|
|
|
|
const tooltip = lastfmSessionError
|
|
? t('connection.lastfmSessionInvalid')
|
|
: t('connection.lastfmConnected', { user: lastfmUsername });
|
|
|
|
return (
|
|
<div
|
|
className="connection-indicator"
|
|
style={{ cursor: 'pointer' }}
|
|
onClick={() => navigate('/settings', { state: { tab: 'integrations' } })}
|
|
data-tooltip={tooltip}
|
|
data-tooltip-pos="bottom"
|
|
>
|
|
<div
|
|
className={`connection-led connection-led--${lastfmSessionError ? 'disconnected' : 'connected'}`}
|
|
/>
|
|
<div className="connection-meta">
|
|
<span className="connection-type" style={{ display: 'flex', alignItems: 'center', gap: '4px' }}>
|
|
<LastfmIcon size={11} />
|
|
Last.fm
|
|
</span>
|
|
<span className="connection-server">
|
|
{lastfmSessionError ? t('connection.lastfmSessionInvalid').split(' —')[0] : `@${lastfmUsername}`}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|