mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-24 08:15:45 +00:00
0b1ed8cc5a
Themes: - Add Poison (phosphor green on charcoal), Nucleo (warm brass light), Classic Winamp (LCD glow, Winamp yellow/orange) themes - Overhaul Psychowave — refined deep violet, no longer WIP - Reorganise ThemePicker into groups: Catppuccin, Nord, Retro, Tokyo Night, Psysonic Themes - Add --volume-accent CSS var for per-theme volume slider colour override Queue: - Full toolbar redesign with centred round buttons (Shuffle/Save/Load/Clear/Gapless/Crossfade) - Crossfade popover with 1–10 s range slider, right-aligned to avoid viewport overflow - Queue header: title + count + duration inline in accent colour, close button removed - Tech info (codec/bitrate) as frosted-glass overlay badge on cover art UI: - CoverLightbox shared component for album cover (AlbumHeader) and artist avatar (ArtistDetail) - NowPlayingDropdown: separate spinning/loading state — button always clickable, icon spins 600 ms min - Settings: "Experimental" badge on Crossfade and Gapless toggles - Help page: 2-column grid layout, new Crossfade & Gapless Q&A entry, updated theme/language entries i18n: - Full French (fr) and Dutch (nl) translations across all namespaces - Language selector sorted alphabetically (nl, en, fr, de) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
39 lines
1.2 KiB
TypeScript
39 lines
1.2 KiB
TypeScript
import { useTranslation } from 'react-i18next';
|
|
import { useNavigate } from 'react-router-dom';
|
|
import { ConnectionStatus } from '../hooks/useConnectionStatus';
|
|
|
|
interface Props {
|
|
status: ConnectionStatus;
|
|
isLan: boolean;
|
|
serverName: string;
|
|
}
|
|
|
|
export default function ConnectionIndicator({ status, isLan, serverName }: Props) {
|
|
const { t } = useTranslation();
|
|
const navigate = useNavigate();
|
|
|
|
const label = isLan ? 'LAN' : t('connection.extern');
|
|
const tooltip =
|
|
status === 'connected'
|
|
? t('connection.connectedTo', { server: serverName })
|
|
: status === 'disconnected'
|
|
? t('connection.disconnectedFrom', { server: serverName })
|
|
: t('connection.checking');
|
|
|
|
return (
|
|
<div
|
|
className="connection-indicator"
|
|
style={{ cursor: 'pointer' }}
|
|
onClick={() => navigate('/settings', { state: { tab: 'server' } })}
|
|
data-tooltip={tooltip}
|
|
data-tooltip-pos="bottom"
|
|
>
|
|
<div className={`connection-led connection-led--${status}`} />
|
|
<div className="connection-meta">
|
|
<span className="connection-type">{label}</span>
|
|
<span className="connection-server">{serverName}</span>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|