fix(Playroom): remove unnecessary animations from shuffle and repeat button toggles for cleaner functionality

This commit is contained in:
Astrian Zheng 2025-05-26 20:45:35 +10:00
parent ff51653326
commit 9f4c5fc0f6
Signed by: Astrian
SSH Key Fingerprint: SHA256:rVnhx3DAKjujCwWE13aDl7uV6+9U1MvydLkNRXJrBiA

View File

@ -148,27 +148,9 @@ function handlePlayPause() {
function toggleShuffle() { function toggleShuffle() {
playQueueStore.playMode.shuffle = !playQueueStore.playMode.shuffle playQueueStore.playMode.shuffle = !playQueueStore.playMode.shuffle
playQueueStore.shuffleCurrent = false playQueueStore.shuffleCurrent = false
nextTick(() => {
const shuffleBtn = playQueueDialog.value?.querySelector('.flex-1:first-child') as HTMLElement
if (shuffleBtn) {
gsap.to(shuffleBtn, {
scale: 0.95, duration: 0.1, yoyo: true, repeat: 1, ease: "power2.inOut"
})
}
})
} }
function toggleRepeat() { function toggleRepeat() {
nextTick(() => {
const repeatBtn = playQueueDialog.value?.querySelector('.flex-1:last-child') as HTMLElement
if (repeatBtn) {
gsap.to(repeatBtn, {
rotateZ: 360, scale: 0.95, duration: 0.3, ease: "back.out(1.7)"
})
}
})
switch (playQueueStore.playMode.repeat) { switch (playQueueStore.playMode.repeat) {
case 'off': playQueueStore.playMode.repeat = 'all'; break case 'off': playQueueStore.playMode.repeat = 'all'; break
case 'all': playQueueStore.playMode.repeat = 'single'; break case 'all': playQueueStore.playMode.repeat = 'single'; break