fullscreen improvements
This commit is contained in:
parent
a419f38024
commit
d9af027def
4 changed files with 16 additions and 4 deletions
|
|
@ -1153,7 +1153,7 @@
|
||||||
</div>
|
</div>
|
||||||
<select id="now-playing-mode">
|
<select id="now-playing-mode">
|
||||||
<option value="album">Show Album</option>
|
<option value="album">Show Album</option>
|
||||||
<option value="cover">Enlarged Cover</option>
|
<option value="cover">Fullscreen Mode</option>
|
||||||
<option value="lyrics">Lyrics Panel</option>
|
<option value="lyrics">Lyrics Panel</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -326,7 +326,7 @@ document.addEventListener('DOMContentLoaded', async () => {
|
||||||
openLyricsPanel(player.currentTrack, audioPlayer, lyricsManager);
|
openLyricsPanel(player.currentTrack, audioPlayer, lyricsManager);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update Fullscreen/Enlarged Cover if it's open
|
// Update Fullscreen if it's open
|
||||||
const fullscreenOverlay = document.getElementById('fullscreen-cover-overlay');
|
const fullscreenOverlay = document.getElementById('fullscreen-cover-overlay');
|
||||||
if (fullscreenOverlay && getComputedStyle(fullscreenOverlay).display !== 'none') {
|
if (fullscreenOverlay && getComputedStyle(fullscreenOverlay).display !== 'none') {
|
||||||
const nextTrack = player.getNextTrack();
|
const nextTrack = player.getNextTrack();
|
||||||
|
|
|
||||||
12
js/ui.js
12
js/ui.js
|
|
@ -645,11 +645,23 @@ export class UIRenderer {
|
||||||
}
|
}
|
||||||
|
|
||||||
overlay.style.display = 'flex';
|
overlay.style.display = 'flex';
|
||||||
|
|
||||||
|
// hide player when in fullscreen
|
||||||
|
const nowPlayingBar = document.querySelector('.now-playing-bar');
|
||||||
|
if (nowPlayingBar) {
|
||||||
|
nowPlayingBar.style.display = 'none';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
closeFullscreenCover() {
|
closeFullscreenCover() {
|
||||||
const overlay = document.getElementById('fullscreen-cover-overlay');
|
const overlay = document.getElementById('fullscreen-cover-overlay');
|
||||||
overlay.style.display = 'none';
|
overlay.style.display = 'none';
|
||||||
|
|
||||||
|
// show player whrn not in fullscreen
|
||||||
|
const nowPlayingBar = document.querySelector('.now-playing-bar');
|
||||||
|
if (nowPlayingBar) {
|
||||||
|
nowPlayingBar.style.display = '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
showPage(pageId) {
|
showPage(pageId) {
|
||||||
|
|
|
||||||
|
|
@ -1757,8 +1757,8 @@ input:checked + .slider::before {
|
||||||
}
|
}
|
||||||
|
|
||||||
#fullscreen-cover-image {
|
#fullscreen-cover-image {
|
||||||
max-width: 80vw;
|
max-width: 55vw;
|
||||||
max-height: 60vh;
|
max-height: 55vh;
|
||||||
border-radius: var(--radius);
|
border-radius: var(--radius);
|
||||||
box-shadow: 0 20px 50px rgb(0, 0, 0, 0.5);
|
box-shadow: 0 20px 50px rgb(0, 0, 0, 0.5);
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue