diff --git a/frontend/src/app.js b/frontend/src/app.js index a90f22f..f92a999 100644 --- a/frontend/src/app.js +++ b/frontend/src/app.js @@ -114,8 +114,8 @@ app.get( '/clientStatusUpdate/:status', ( req, res ) => { } ); app.get( '/openSongs', ( req, res ) => { - // res.send( '{ "data": [ "/home/janis/Music/KB2022" ] }' ); - res.send( '{ "data": [ "/mnt/storage/SORTED/Music/audio/KB2022" ] }' ); + res.send( '{ "data": [ "/home/janis/Music/KB2022" ] }' ); + // res.send( '{ "data": [ "/mnt/storage/SORTED/Music/audio/KB2022" ] }' ); // res.send( { 'data': dialog.showOpenDialogSync( { properties: [ 'openDirectory' ], title: 'Open music library folder' } ) } ); } ); diff --git a/frontend/src/client/showcase.css b/frontend/src/client/showcase.css index b077f1b..d2a0090 100644 --- a/frontend/src/client/showcase.css +++ b/frontend/src/client/showcase.css @@ -133,7 +133,7 @@ body { height: 55vh; width: 100%; margin-bottom: 0.5%; - margin-top: 0.5%; + margin-top: 0.25%; } .current-song { @@ -141,7 +141,7 @@ body { justify-content: center; align-items: center; flex-direction: column; - margin-top: 2vh; + margin-top: 1vh; padding: 1vh; text-align: center; background-color: rgba( 0, 0, 0, 0.4 ); @@ -152,7 +152,7 @@ body { width: 30vh; object-fit: cover; object-position: center; - margin-bottom: 20px; + margin-bottom: 10px; font-size: 30vh !important; } @@ -181,4 +181,20 @@ body { .mode-selector-wrapper:hover { opacity: 1; +} + +.dancing-style { + font-size: 250%; + margin: 0; + font-weight: bolder; +} + +.info { + position: fixed; + font-size: 12px; + transform: rotate(270deg); + left: -150px; + margin: 0; + padding: 0; + top: 50%; } \ No newline at end of file diff --git a/frontend/src/client/showcase.html b/frontend/src/client/showcase.html index 0982614..4fb3b99 100644 --- a/frontend/src/client/showcase.html +++ b/frontend/src/client/showcase.html @@ -12,6 +12,7 @@ +
Designed and developed by Janis Hutz https://janishutz.com
@@ -21,6 +22,7 @@

{{ playingSong.title }}

+

{{ playingSong.dancingStyle }}

{{ playingSong.artist }}

diff --git a/frontend/src/client/showcase.js b/frontend/src/client/showcase.js index d4a4848..0fc1c40 100644 --- a/frontend/src/client/showcase.js +++ b/frontend/src/client/showcase.js @@ -32,7 +32,7 @@ createApp( { } return ret; }, - getTimeUntil( ) { + getTimeUntil() { return ( song ) => { let timeRemaining = 0; for ( let i = this.queuePos; i < this.songs.length; i++ ) { @@ -41,10 +41,18 @@ createApp( { } timeRemaining += parseInt( this.songs[ i ].duration ); } - if ( timeRemaining === 0 ) { - return 'Currently playing'; + if ( this.isPlaying ) { + if ( timeRemaining === 0 ) { + return 'Currently playing'; + } else { + return 'Playing in less than ' + Math.ceil( timeRemaining / 60 - this.pos / 60 ) + 'min'; + } } else { - return 'Playing in less than ' + Math.ceil( timeRemaining / 60 - this.pos / 60 ) + 'min'; + if ( timeRemaining === 0 ) { + return 'Plays next'; + } else { + return 'Playing less than ' + Math.ceil( timeRemaining / 60 - this.pos / 60 ) + 'min after starting to play'; + } } } } diff --git a/frontend/src/components/fancyView.vue b/frontend/src/components/fancyView.vue index 773e041..6256c6d 100644 --- a/frontend/src/components/fancyView.vue +++ b/frontend/src/components/fancyView.vue @@ -1,6 +1,7 @@