Fix vinyl angle persistence on toggle, group player toggle buttons
- Save vinyl rotation angle before flipping vinylMode flag off - Wrap vinyl + visualizer buttons in .player-toggles container - Move margin-left:auto from individual buttons to group Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -903,6 +903,13 @@ button:disabled {
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.player-toggles {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.375rem;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.vinyl-toggle-btn {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
@@ -916,7 +923,6 @@ button:disabled {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.2s;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.vinyl-toggle-btn:hover {
|
||||
|
||||
@@ -187,6 +187,7 @@
|
||||
|
||||
<div class="source-info">
|
||||
<span data-i18n="player.source">Source:</span> <span id="source" data-i18n="player.unknown_source">Unknown</span>
|
||||
<div class="player-toggles">
|
||||
<button class="vinyl-toggle-btn" onclick="toggleVinylMode()" id="vinylToggle" data-i18n-title="player.vinyl" title="Vinyl mode">
|
||||
<svg viewBox="0 0 24 24" width="16" height="16"><circle cx="12" cy="12" r="10" fill="none" stroke="currentColor" stroke-width="1.5"/><circle cx="12" cy="12" r="3" fill="currentColor"/><circle cx="12" cy="12" r="6.5" fill="none" stroke="currentColor" stroke-width="0.5" opacity="0.5"/></svg>
|
||||
</button>
|
||||
@@ -197,6 +198,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Media Browser Section -->
|
||||
<div class="browser-container" data-tab-content="browser" role="tabpanel" id="panel-browser">
|
||||
|
||||
@@ -286,6 +286,8 @@
|
||||
window.addEventListener('beforeunload', saveVinylAngle);
|
||||
|
||||
function toggleVinylMode() {
|
||||
// Save current angle before turning off (must happen while still in vinyl mode)
|
||||
if (vinylMode) saveVinylAngle();
|
||||
vinylMode = !vinylMode;
|
||||
localStorage.setItem('vinylMode', vinylMode);
|
||||
applyVinylMode();
|
||||
|
||||
Reference in New Issue
Block a user