2022-10-13 15:18:47 +00:00
|
|
|
<template>
|
2024-04-04 22:20:42 +00:00
|
|
|
<div class="playback-controls flex flex-1 flex-col place-content-center place-items-center">
|
|
|
|
<div class="flex items-center justify-center gap-5 md:gap-12">
|
|
|
|
<LikeButton v-if="song" :song="song" class="text-base" />
|
|
|
|
<button v-else type="button" /> <!-- a placeholder to maintain the asymmetric layout -->
|
2022-10-13 15:18:47 +00:00
|
|
|
|
2024-04-04 22:20:42 +00:00
|
|
|
<FooterBtn class="text-2xl" title="Play previous song" @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-04-04 22:20:42 +00:00
|
|
|
<FooterBtn class="text-2xl" title="Play next song" @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'
|
2022-10-13 15:18:47 +00:00
|
|
|
import { CurrentSongKey } from '@/symbols'
|
|
|
|
|
|
|
|
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
|
|
|
|
2022-12-23 15:44:34 +00:00
|
|
|
const song = requireInjection(CurrentSongKey, 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>
|