2023-08-27 22:20:34 +02:00
|
|
|
<template>
|
2023-08-28 21:25:12 +02:00
|
|
|
<div class="controls">
|
2024-04-30 00:48:47 +02:00
|
|
|
<PauseIcon
|
|
|
|
v-if="!player.paused"
|
2024-01-09 22:36:36 +01:00
|
|
|
class="pointer"
|
2023-08-27 22:20:34 +02:00
|
|
|
:size="50"
|
2023-08-29 00:47:22 +02:00
|
|
|
@click="$store.dispatch('player/pause')" />
|
2024-04-30 00:48:47 +02:00
|
|
|
<PlayIcon
|
|
|
|
v-if="player.paused"
|
2024-01-09 22:36:36 +01:00
|
|
|
class="pointer"
|
2023-08-27 22:20:34 +02:00
|
|
|
:size="50"
|
2023-08-29 00:47:22 +02:00
|
|
|
@click="$store.dispatch('player/play')" />
|
2023-08-28 21:18:14 +02:00
|
|
|
</div>
|
2023-08-27 22:20:34 +02:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2024-03-16 18:35:31 +01:00
|
|
|
import PauseIcon from 'vue-material-design-icons/Pause.vue'
|
|
|
|
import PlayIcon from 'vue-material-design-icons/Play.vue'
|
2023-08-27 22:20:34 +02:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'Controls',
|
|
|
|
components: {
|
2024-03-16 18:35:31 +01:00
|
|
|
PauseIcon,
|
|
|
|
PlayIcon,
|
2023-08-27 22:20:34 +02:00
|
|
|
},
|
|
|
|
computed: {
|
2023-08-29 00:47:22 +02:00
|
|
|
player() {
|
|
|
|
return this.$store.state.player
|
2023-08-27 22:20:34 +02:00
|
|
|
},
|
2023-08-28 17:44:17 +02:00
|
|
|
},
|
2023-08-27 22:20:34 +02:00
|
|
|
}
|
|
|
|
</script>
|
2023-08-28 00:02:07 +02:00
|
|
|
|
|
|
|
<style scoped>
|
2024-04-30 00:48:47 +02:00
|
|
|
.controls {
|
|
|
|
display: flex;
|
|
|
|
}
|
2023-08-28 21:25:12 +02:00
|
|
|
|
2024-04-30 00:48:47 +02:00
|
|
|
.pointer {
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
2023-08-28 00:02:07 +02:00
|
|
|
</style>
|