Added convertToMins function and time in app-chrome
This commit is contained in:
parent
042229ea90
commit
6143266965
3 changed files with 18 additions and 1 deletions
|
@ -429,6 +429,11 @@ const app = new Vue({
|
|||
return this.playerLCD.playbackDuration
|
||||
}
|
||||
},
|
||||
convertToMins(time) {
|
||||
let mins = Math.floor(time/60)
|
||||
let seconds = (Math.floor(time%60) / 100).toFixed(2)
|
||||
return `${mins}:${seconds.replace("0.","")}`
|
||||
},
|
||||
hashCode(str) {
|
||||
var hash = 0, i, chr;
|
||||
if (str.length === 0) return hash;
|
||||
|
|
|
@ -684,6 +684,15 @@ input[type=range].web-slider::-webkit-slider-runnable-track {
|
|||
overflow: hidden;
|
||||
}
|
||||
|
||||
.app-chrome .app-chrome-item>.app-playback-controls .song-duration p {
|
||||
font-weight: 400;
|
||||
font-size: 10px;
|
||||
height: 1.2em;
|
||||
line-height: 1.3em;
|
||||
overflow: hidden;
|
||||
margin: 0 0 0.5em;
|
||||
}
|
||||
|
||||
.app-chrome .app-chrome-item>.app-playback-controls .song-artist {
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
|
|
|
@ -77,7 +77,10 @@
|
|||
{{ (mk.nowPlayingItem["attributes"]["albumName"]) ? (" - " + mk.nowPlayingItem["attributes"]["albumName"]) : "" }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="song-duration" style="display: flex; justify-content: space-between;;">
|
||||
<p style="width: auto">{{ convertToMins(getSongProgress()) }}</p>
|
||||
<p style="width: auto">{{ convertToMins(mk.currentPlaybackDuration) }}</p>
|
||||
</div>
|
||||
<div class="song-progress">
|
||||
<input type="range" step="0.01" min="0" :style="progressBarStyle()"
|
||||
@input="playerLCD.desiredDuration = $event.target.value;playerLCD.userInteraction = true"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue