feat(qbzd): remote mode indicator in NowPlayingBar

Accent-colored banner shows 'Controlling: {device_name}' with a
disconnect button when the app is targeting a remote qbzd daemon.
Hidden in local mode.

i18n: player.controllingRemote in all 5 locales.

cc
This commit is contained in:
vicrodh committed 2026-04-09 04:22:00 -06:00
1 parent e3c1e471c6
commit 8dac185261
6 files changed
+43

No files matched your search

+38
View File
@@ -13,6 +13,7 @@
Volume2,
VolumeX,
Volume1,
Monitor,
Cast,
MicVocal,
Maximize2,
@@ -20,6 +21,8 @@
TriangleAlert
} from 'lucide-svelte';
import { t } from 'svelte-i18n';
import { isRemoteMode, playbackTarget } from '$lib/stores/playbackTargetStore';
import { disconnectFromRemote } from '$lib/stores/playbackTargetStore';
import QualityBadge from './QualityBadge.svelte';
import AudioOutputBadges from './AudioOutputBadges.svelte';
import QconnectBadge from './QconnectBadge.svelte';
@@ -263,6 +266,13 @@
</script>
<div class="now-playing-bar">
{#if $isRemoteMode}
<div class="remote-indicator">
<Monitor size={14} />
<span>{$t('player.controllingRemote', { values: { name: $playbackTarget.name || 'Remote' } })}</span>
<button class="remote-disconnect" onclick={disconnectFromRemote}>{$t('actions.disconnect')}</button>
</div>
{/if}
<!-- Top: Full-width Seekbar -->
<div class="seekbar-container">
<span class="time current">{formatTime(currentTime)}</span>
@@ -633,6 +643,34 @@
flex-direction: column;
}
.remote-indicator {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 4px 12px;
background: var(--accent-primary);
color: white;
font-size: 12px;
font-weight: 500;
letter-spacing: 0.02em;
}
.remote-disconnect {
background: rgba(255, 255, 255, 0.2);
border: none;
color: white;
font-size: 11px;
padding: 2px 8px;
border-radius: 4px;
cursor: pointer;
margin-left: 4px;
}
.remote-disconnect:hover {
background: rgba(255, 255, 255, 0.35);
}
/* ===== Seekbar ===== */
.seekbar-container {
display: flex;
+1
View File
@@ -562,6 +562,7 @@
},
"player": {
"nowPlaying": "Aktuell abgespielt",
"controllingRemote": "Steuert: {name}",
"queue": "Warteschlange",
"upNext": "Als Nächstes",
"ofTotal": "von",
+1
View File
@@ -562,6 +562,7 @@
},
"player": {
"nowPlaying": "Now Playing",
"controllingRemote": "Controlling: {name}",
"queue": "Queue",
"upNext": "Up Next",
"ofTotal": "of",
+1
View File
@@ -562,6 +562,7 @@
},
"player": {
"nowPlaying": "Reproduciendo",
"controllingRemote": "Controlando: {name}",
"queue": "Cola",
"upNext": "Siguiente",
"ofTotal": "de",
+1
View File
@@ -562,6 +562,7 @@
},
"player": {
"nowPlaying": "Lecture en cours",
"controllingRemote": "Controle : {name}",
"queue": "File d'attente",
"upNext": "À suivre",
"ofTotal": "de",
+1
View File
@@ -562,6 +562,7 @@
},
"player": {
"nowPlaying": "Tocando Agora",
"controllingRemote": "Controlando: {name}",
"queue": "Fila",
"upNext": "A Seguir",
"ofTotal": "de",