diff --git a/src/assets/icons/cycletwoarrowswithnumone.vue b/src/assets/icons/cycletwoarrowswithnumone.vue new file mode 100644 index 0000000..e112847 --- /dev/null +++ b/src/assets/icons/cycletwoarrowswithnumone.vue @@ -0,0 +1,13 @@ + + + + + \ No newline at end of file diff --git a/src/components/Player.vue b/src/components/Player.vue index c1fd923..eed6099 100644 --- a/src/components/Player.vue +++ b/src/components/Player.vue @@ -69,8 +69,13 @@ function playNext() { if (playQueueStore.currentIndex === playQueueStore.list.length - 1) { console.log("at the bottom, pause") playQueueStore.currentIndex = 0 - player.value?.pause() - playQueueStore.isPlaying = false + if(playQueueStore.playMode.repeat === 'all') { + playQueueStore.currentIndex = 0 + playQueueStore.isPlaying = true + } else { + player.value?.pause() + playQueueStore.isPlaying = false + } } else { playQueueStore.currentIndex++ playQueueStore.isPlaying = true @@ -204,7 +209,10 @@ function getCurrentTrack() { ref="playerRef" :autoplay="playQueueStore.isPlaying" v-if="playQueueStore.list.length !== 0" - @ended="playNext" + @ended="() => { + if (playQueueStore.playMode.repeat === 'single') { playQueueStore.isPlaying = true } + else { playNext() } + }" @pause="playQueueStore.isPlaying = false" @play="playQueueStore.isPlaying = true" @playing="() => { diff --git a/src/pages/Playroom.vue b/src/pages/Playroom.vue index 9f2d0b3..999436d 100644 --- a/src/pages/Playroom.vue +++ b/src/pages/Playroom.vue @@ -19,6 +19,7 @@ import EllipsisHorizontalIcon from '../assets/icons/ellipsishorizontal.vue' import XIcon from '../assets/icons/x.vue' import ShuffleIcon from '../assets/icons/shuffle.vue' import CycleTwoArrowsIcon from '../assets/icons/cycletwoarrows.vue' +import CycleTwoArrowsWithNumOneIcon from '../assets/icons/cycletwoarrowswithnumone.vue' import SpeakerIcon from '../assets/icons/speaker.vue' const playQueueStore = usePlayQueueStore() @@ -301,7 +302,7 @@ function getCurrentTrack() { -