fix(ui): banner layout uses CSS variable, fix i18n key, responsive height

Banner inside now-playing-bar grows it to 128px. CSS variable
--player-bar-height drives content-area/main-content calc() so
layout adjusts automatically. No more overlap.

Fix disconnect button text: actions.disconnect -> settings.integrations.disconnect

cc
This commit is contained in:
vicrodh committed 2026-04-09 13:26:15 -06:00
1 parent 72254ac44e
commit 3a01330b02
2 files changed
+21 -16

No files matched your search

+18 -13
View File
@@ -263,16 +263,22 @@
};
}
});
// Set CSS variable for player bar height so page layout adjusts
$effect(() => {
const barHeight = $isRemoteMode ? 128 : 104;
document.documentElement.style.setProperty('--player-bar-height', `${barHeight}px`);
});
</script>
{#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}
<div class="now-playing-bar">
<div class="now-playing-bar" class:has-remote-banner={$isRemoteMode}>
{#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('settings.integrations.disconnect')}</button>
</div>
{/if}
<!-- Top: Full-width Seekbar -->
<div class="seekbar-container">
<span class="time current">{formatTime(currentTime)}</span>
@@ -643,11 +649,11 @@
flex-direction: column;
}
.now-playing-bar.has-remote-banner {
height: 128px;
}
.remote-indicator {
position: fixed;
bottom: 104px;
left: 0;
right: 0;
display: flex;
align-items: center;
justify-content: center;
@@ -658,7 +664,6 @@
font-size: 12px;
font-weight: 500;
letter-spacing: 0.02em;
z-index: 2001;
}
.remote-disconnect {
+3 -3
View File
@@ -6009,7 +6009,7 @@
display: flex;
flex: 1;
min-width: 0;
height: calc(100vh - 148px); /* 104px NowPlayingBar + 44px TitleBar */
height: calc(100vh - var(--player-bar-height, 104px) - 44px);
overflow: hidden;
position: relative;
}
@@ -6017,7 +6017,7 @@
.main-content {
flex: 1;
min-width: 0;
height: calc(100vh - 148px); /* 104px NowPlayingBar + 44px TitleBar */
height: calc(100vh - var(--player-bar-height, 104px) - 44px);
overflow: hidden; /* Views handle their own scrolling */
padding-right: 8px; /* Gap between scrollbar and window edge */
background-color: var(--bg-primary, #0f0f0f);
@@ -6026,7 +6026,7 @@
/* Adjust heights when title bar is hidden */
.app.no-titlebar .content-area,
.app.no-titlebar .main-content {
height: calc(100vh - 104px); /* Only 104px NowPlayingBar, no title bar */
height: calc(100vh - var(--player-bar-height, 104px));
}
/* macOS: pad main content to clear native overlay title bar */