repod/src/components/Player/Bar.vue
Michel Roux 785414f33f
All checks were successful
repod / xml (push) Successful in 32s
repod / php (push) Successful in 1m2s
repod / nodejs (push) Successful in 2m1s
refacto: simplify EpisodeActionExtraData API
2024-01-11 00:14:15 +01:00

77 lines
1.2 KiB
Vue

<template>
<div v-if="player.episode" class="footer">
<Loading v-if="!player.loaded" />
<ProgressBar v-if="player.loaded" />
<div v-if="player.loaded" class="player">
<img :src="player.episode.image">
<Infos class="infos" />
<Controls class="controls" />
<Timer class="timer" />
<Volume class="volume" />
</div>
</div>
</template>
<script>
import Controls from './Controls.vue'
import Infos from './Infos.vue'
import Loading from '../Atoms/Loading.vue'
import ProgressBar from './ProgressBar.vue'
import Timer from './Timer.vue'
import Volume from './Volume.vue'
export default {
name: 'Bar',
components: {
Controls,
Infos,
Loading,
ProgressBar,
Timer,
Volume,
},
computed: {
player() {
return this.$store.state.player
},
},
}
</script>
<style scoped>
.footer {
background-color: rgba(66, 66, 66, .9);
bottom: 0;
height: 6rem;
right: 0;
position: absolute;
width: 100%;
z-index: 2000;
}
.player {
display: flex;
gap: 1rem;
height: calc(6rem - 6px);
justify-content: space-between;
}
.timer {
width: 30%;
}
.volume {
width: 10%;
}
@media only screen and (max-width: 768px) {
.infos {
flex: 2;
}
.timer, .volume {
display: none;
}
}
</style>