diff --git a/MusicPlayerV2-GUI/src/components/playerView.vue b/MusicPlayerV2-GUI/src/components/playerView.vue index bf059d4..875196c 100644 --- a/MusicPlayerV2-GUI/src/components/playerView.vue +++ b/MusicPlayerV2-GUI/src/components/playerView.vue @@ -1,22 +1,25 @@ @@ -31,6 +34,11 @@ const repeatMode = ref( '' ); const shuffleMode = ref( '' ); const currentlyPlayingSongName = ref( 'Not playing' ); + const clickCountForward = ref( 0 ); + const clickCountBack = ref( 0 ); + const isShowingFullScreenPlayer = ref( false ); + + const emits = defineEmits( [ 'playerStateChange' ] ); const playPause = () => { isPlaying.value = !isPlaying.value; @@ -52,16 +60,26 @@ } else { shuffleMode.value = ''; } + } else if ( action === 'forward' ) { + clickCountForward.value += 1; + } else if ( action === 'back' ) { + clickCountBack.value += 1; } } - const props = defineProps( { - 'isShowingFullScreenPlayer': { - 'default': false, - 'required': true, - 'type': Boolean + const controlUI = ( action: string ) => { + if ( action === 'show' ) { + isShowingFullScreenPlayer.value = true; + emits( 'playerStateChange', 'show' ); + } else if ( action === 'hide' ) { + isShowingFullScreenPlayer.value = false; + emits( 'playerStateChange', 'hide' ); } + } + + defineExpose( { + controlUI, } ); @@ -76,13 +94,20 @@ } .song-name { + cursor: pointer; margin-left: 10px; - margin-right: auto; + width: 100%; + height: 100%; + text-align: justify; font-weight: bold; font-size: 1.25rem; + display: flex; + align-items: center; + flex-direction: row; } .logo-player { + cursor: pointer; height: 80%; margin-left: 30px; } @@ -103,6 +128,8 @@ .controls { cursor: pointer; font-size: 1.75rem; + user-select: none; + transition: all 0.5s ease-in-out; } .controls-wrapper { @@ -116,4 +143,42 @@ #play-pause { font-size: 2.5rem; } + + .controls:hover { + transform: scale(1.25); + } + + .forward-back { + transition: all 0.4s ease-in-out; + } + + .next-previous { + transform: translateX(0px); + transition: all 0s; + } + + .next-previous:hover { + transform: scale(1); + } + + #previous:active { + transform: translateX(-10px); + } + + #next:active { + transform: translateX(10px); + } + + .close-fullscreen { + position: absolute; + top: 10px; + right: 10px; + font-size: 2.5rem; + color: var( --primary-color ); + cursor: pointer; + } + + .hidden .close-fullscreen { + display: none; + } \ No newline at end of file diff --git a/MusicPlayerV2-GUI/src/components/playlistsView.vue b/MusicPlayerV2-GUI/src/components/playlistsView.vue index db22bd6..f89cc1f 100644 --- a/MusicPlayerV2-GUI/src/components/playlistsView.vue +++ b/MusicPlayerV2-GUI/src/components/playlistsView.vue @@ -1,5 +1,5 @@ \ No newline at end of file diff --git a/MusicPlayerV2-GUI/src/views/AppView.vue b/MusicPlayerV2-GUI/src/views/AppView.vue index 7ac29e4..5c94a77 100644 --- a/MusicPlayerV2-GUI/src/views/AppView.vue +++ b/MusicPlayerV2-GUI/src/views/AppView.vue @@ -1,10 +1,10 @@