2023-09-21 18:53:20 +02:00
|
|
|
<template>
|
|
|
|
<a :class="{ 'is-active': is_active }" @click="toggle_lyrics">
|
|
|
|
<mdicon
|
|
|
|
v-if="!is_active"
|
|
|
|
class="icon"
|
|
|
|
name="script-text-outline"
|
|
|
|
:size="icon_size"
|
|
|
|
:title="$t('player.button.toggle-lyrics')"
|
|
|
|
/>
|
|
|
|
<mdicon
|
|
|
|
v-if="is_active"
|
|
|
|
class="icon"
|
|
|
|
name="script-text-play"
|
|
|
|
:size="icon_size"
|
|
|
|
:title="$t('player.button.toggle-lyrics')"
|
|
|
|
/>
|
|
|
|
</a>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
name: 'PlayerButtonLyrics',
|
|
|
|
|
|
|
|
props: {
|
|
|
|
icon_size: {
|
|
|
|
type: Number,
|
|
|
|
default: 16
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
computed: {
|
|
|
|
is_active() {
|
|
|
|
return this.$store.getters.lyrics_pane
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
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>
|