2022-10-13 15:18:47 +00:00
|
|
|
<template>
|
2024-04-19 18:10:55 +00:00
|
|
|
<div class="playback-controls flex flex-1 flex-col justify-center">
|
|
|
|
<div class="flex items-center justify-between md:justify-center gap-5 md:gap-12 px-4 md:px-0">
|
2024-06-02 17:15:31 +00:00
|
|
|
<LikeButton v-if="playable" :playable="playable" class="text-base" />
|
2024-04-04 22:20:42 +00:00
|
|
|
<button v-else type="button" /> <!-- a placeholder to maintain the asymmetric layout -->
|
2022-10-13 15:18:47 +00:00
|
|
|
|
2024-06-02 17:15:31 +00:00
|
|
|
<FooterBtn class="text-2xl" title="Play previous in queue" @click.prevent="playPrev">
|
2023-11-10 13:16:06 +00:00
|
|
|
<Icon :icon="faStepBackward" />
|
2024-04-04 22:20:42 +00:00
|
|
|
</FooterBtn>
|
2022-10-13 15:18:47 +00:00
|
|
|
|
2022-12-02 16:17:37 +00:00
|
|
|
<PlayButton />
|
2022-10-13 15:18:47 +00:00
|
|
|
|
2024-06-02 17:15:31 +00:00
|
|
|
<FooterBtn class="text-2xl" title="Play next in queue" @click.prevent="playNext">
|
2023-11-10 13:16:06 +00:00
|
|
|
<Icon :icon="faStepForward" />
|
2024-04-04 22:20:42 +00:00
|
|
|
</FooterBtn>
|
2022-10-13 15:18:47 +00:00
|
|
|
|
2024-04-04 22:20:42 +00:00
|
|
|
<RepeatModeSwitch class="text-base" />
|
2022-10-13 15:18:47 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
import { faStepBackward, faStepForward } from '@fortawesome/free-solid-svg-icons'
|
2022-12-23 15:44:34 +00:00
|
|
|
import { ref } from 'vue'
|
2022-10-13 15:18:47 +00:00
|
|
|
import { playbackService } from '@/services'
|
2022-12-23 15:44:34 +00:00
|
|
|
import { requireInjection } from '@/utils'
|
2024-05-19 05:49:42 +00:00
|
|
|
import { CurrentPlayableKey } from '@/symbols'
|
2022-10-13 15:18:47 +00:00
|
|
|
|
|
|
|
import RepeatModeSwitch from '@/components/ui/RepeatModeSwitch.vue'
|
|
|
|
import LikeButton from '@/components/song/SongLikeButton.vue'
|
|
|
|
import PlayButton from '@/components/ui/FooterPlayButton.vue'
|
2024-04-04 22:20:42 +00:00
|
|
|
import FooterBtn from '@/components/layout/app-footer/FooterButton.vue'
|
2022-10-13 15:18:47 +00:00
|
|
|
|
2024-06-02 17:15:31 +00:00
|
|
|
const playable = requireInjection(CurrentPlayableKey, ref())
|
2022-10-13 15:18:47 +00:00
|
|
|
|
|
|
|
const playPrev = async () => await playbackService.playPrev()
|
|
|
|
const playNext = async () => await playbackService.playNext()
|
|
|
|
</script>
|
|
|
|
|
2024-04-04 20:13:35 +00:00
|
|
|
<style lang="postcss" scoped>
|
2024-04-04 22:20:42 +00:00
|
|
|
:fullscreen .playback-controls {
|
|
|
|
@apply scale-125;
|
2022-10-13 15:18:47 +00:00
|
|
|
}
|
|
|
|
</style>
|