diff --git a/resources/cider-ui-tests/index.js b/resources/cider-ui-tests/index.js index 70c64bb1..dbb70026 100644 --- a/resources/cider-ui-tests/index.js +++ b/resources/cider-ui-tests/index.js @@ -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; diff --git a/resources/cider-ui-tests/style.less b/resources/cider-ui-tests/style.less index a6ff5f1f..da2d0db7 100644 --- a/resources/cider-ui-tests/style.less +++ b/resources/cider-ui-tests/style.less @@ -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; diff --git a/resources/cider-ui-tests/views/main.ejs b/resources/cider-ui-tests/views/main.ejs index 1408c5b2..22b116c9 100644 --- a/resources/cider-ui-tests/views/main.ejs +++ b/resources/cider-ui-tests/views/main.ejs @@ -77,7 +77,10 @@ {{ (mk.nowPlayingItem["attributes"]["albumName"]) ? (" - " + mk.nowPlayingItem["attributes"]["albumName"]) : "" }} - +
+

{{ convertToMins(getSongProgress()) }}

+

{{ convertToMins(mk.currentPlaybackDuration) }}

+