feat(ui): show volume value while dragging

cx
This commit is contained in:
vicrodh committed 2026-01-18 05:38:32 -06:00
1 parent 5a42df35a4
commit ed45fa4156
2 files changed
+46

No files matched your search

+23
View File
@@ -318,6 +318,7 @@
<!-- Volume Control -->
<div class="volume-container">
<div class="volume-value" class:visible={isDraggingVolume}>{volume}</div>
<div
class="volume-bar"
bind:this={volumeRef}
@@ -686,6 +687,7 @@
width: 100%;
max-width: 180px;
margin-bottom: 24px;
position: relative;
}
.volume-bar {
@@ -718,6 +720,27 @@
opacity: 1;
}
.volume-value {
position: absolute;
right: 0;
top: -26px;
padding: 4px 8px;
border-radius: 6px;
background: rgba(0, 0, 0, 0.6);
color: rgba(255, 255, 255, 0.9);
font-size: 12px;
font-weight: 600;
opacity: 0;
transform: translateY(4px);
transition: opacity 120ms ease, transform 120ms ease;
pointer-events: none;
}
.volume-value.visible {
opacity: 1;
transform: translateY(0);
}
/* Bottom Actions */
.bottom-actions {
display: flex;
+23
View File
@@ -378,6 +378,7 @@
<!-- Volume Control -->
<div class="volume-control">
<div class="volume-value" class:visible={isDraggingVolume}>{volume}</div>
<button
class="control-btn volume-btn"
onclick={() => onVolumeChange?.(volume === 0 ? 70 : 0)}
@@ -765,6 +766,7 @@
display: flex;
align-items: center;
gap: 8px;
position: relative;
}
.volume-slider {
@@ -810,4 +812,25 @@
.volume-slider:hover .volume-thumb {
opacity: 1;
}
.volume-value {
position: absolute;
right: 0;
bottom: calc(100% + 6px);
padding: 4px 6px;
border-radius: 6px;
background: var(--bg-tertiary);
color: var(--text-primary);
font-size: 11px;
font-weight: 600;
opacity: 0;
transform: translateY(4px);
transition: opacity 120ms ease, transform 120ms ease;
pointer-events: none;
}
.volume-value.visible {
opacity: 1;
transform: translateY(0);
}
</style>