2023-09-21 18:53:20 +02:00
|
|
|
<template>
|
2023-11-24 16:28:35 +01:00
|
|
|
<a :class="{ 'is-info': is_active }" @click="toggle_lyrics">
|
2023-09-21 18:53:20 +02:00
|
|
|
<mdicon
|
|
|
|
class="icon"
|
2023-11-24 16:28:35 +01:00
|
|
|
:name="icon_name"
|
2023-09-21 18:53:20 +02:00
|
|
|
:size="icon_size"
|
|
|
|
:title="$t('player.button.toggle-lyrics')"
|
|
|
|
/>
|
|
|
|
</a>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
name: 'PlayerButtonLyrics',
|
|
|
|
props: {
|
2024-02-28 15:25:36 +01:00
|
|
|
icon_size: { default: 16, type: Number }
|
2023-09-21 18:53:20 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
computed: {
|
2023-11-24 16:28:35 +01:00
|
|
|
icon_name() {
|
|
|
|
return this.is_active ? 'script-text-play' : 'script-text-outline'
|
2024-03-26 15:00:17 +01:00
|
|
|
},
|
|
|
|
is_active() {
|
|
|
|
return this.$store.state.lyrics.pane
|
2023-09-21 18:53:20 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
toggle_lyrics() {
|
2023-11-24 13:58:30 +01:00
|
|
|
this.$store.state.lyrics.pane = !this.$store.state.lyrics.pane
|
2023-09-21 18:53:20 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style></style>
|