some fixes to the fs

This commit is contained in:
vapormusic 2022-01-08 20:10:49 +07:00
parent b41a8a88b3
commit 98847ee92c
5 changed files with 70 additions and 5 deletions

View file

@ -222,6 +222,10 @@ const CiderBase = {
win.minimize(); win.minimize();
}) })
ipcMain.on('setFullScreen',(event, flag) => {
win.setFullScreen(flag)
})
if (process.platform === "win32") { if (process.platform === "win32") {
let WND_STATE = { let WND_STATE = {
MINIMIZED: 0, MINIMIZED: 0,

View file

@ -3048,6 +3048,11 @@ const app = new Vue({
gain: gain, gain: gain,
peak: peak peak: peak
} }
},
fullscreen(flag){
if (flag){
ipcRenderer.send('setFullScreen', true); app.appMode = 'fullscreen';}
else { ipcRenderer.send('setFullScreen', false); app.appMode = 'player';}
} }
} }

View file

@ -3583,6 +3583,52 @@ input[type="range"].web-slider.display--small::-webkit-slider-thumb {
height: 50vh; height: 50vh;
} }
@media only screen and (max-width: 1023px) {
.display--large {
display: flex !important;
}
}
.display--large {
display: flex;
.slider {
width: 100%;
z-index: 1;
}
.input-container {
display: flex;
justify-content: center;
align-items: center;
width: 100%
}
input[type=range] {
appearance: none;
width: 100%;
height: 4px;
background-color: rgb(200 200 200 / 50%);
border-radius: 2px;
&::-webkit-slider-thumb {
opacity: 1;
transform: scale(0.5);
-webkit-appearance: none;
appearance: none;
width: 12px;
height: 12px;
border-radius: 100%;
background: rgba(77, 75, 75, 0.9);
cursor: default;
transition: opacity .10s var(--appleEase), transform .10s var(--appleEase);
}
}
}
.background{ .background{
position: absolute; position: absolute;
background-size: cover; background-size: cover;
@ -3723,8 +3769,12 @@ input[type="range"].web-slider.display--small::-webkit-slider-thumb {
font-size: 0.875em; font-size: 0.875em;
} }
.song-name { .song-name {
width: unset !important;
margin-top: 0.15vh; margin-top: 0.15vh;
display: contents; display: -webkit-box;
line-height: 1.2;
text-overflow: ellipsis;
text-align: center;
} }
} }
@ -3775,7 +3825,7 @@ input[type="range"].web-slider.display--small::-webkit-slider-thumb {
} }
} }
> input[type=range] { input[type=range] {
appearance: none; appearance: none;
width: 100%; width: 100%;
height: 4px; height: 4px;

View file

@ -11,7 +11,7 @@
</div> </div>
<div class="row fs-row"> <div class="row fs-row">
<div class="col artwork-col"> <div class="col artwork-col">
<div class="artwork" @click="app.appMode = 'player'"> <div class="artwork" @click="app.fullscreen(false)">
<mediaitem-artwork <mediaitem-artwork
:size="600" :size="600"
:url="image ?? ''" :url="image ?? ''"
@ -77,7 +77,13 @@
v-else-if="app.mk.repeatMode == 2"></button> v-else-if="app.mk.repeatMode == 2"></button>
</div> </div>
</div> </div>
<div class="app-chrome-item volume display--large">
<div class="app-chrome-item volume-icon"></div>
<div class="input-container">
<input type="range" class="slider" @wheel="app.volumeWheel" step="0.01" min="0" max="1" v-model="app.mk.volume"
v-if="typeof app.mk.volume != 'undefined'">
</div>
</div>
</div> </div>
</template> </template>
</div> </div>

View file

@ -69,7 +69,7 @@
<template v-if="mkReady()"> <template v-if="mkReady()">
<div class="app-playback-controls" @mouseover="chrome.progresshover = true" <div class="app-playback-controls" @mouseover="chrome.progresshover = true"
@mouseleave="chrome.progresshover = false" @contextmenu="nowPlayingContextMenu"> @mouseleave="chrome.progresshover = false" @contextmenu="nowPlayingContextMenu">
<div class="artwork" @click="drawer.open = false; appMode = 'fullscreen'"> <div class="artwork" @click="drawer.open = false; fullscreen(true)">
<mediaitem-artwork :url="currentArtUrl"></mediaitem-artwork> <mediaitem-artwork :url="currentArtUrl"></mediaitem-artwork>
</div> </div>
<div class="playback-info"> <div class="playback-info">