2023-09-21 18:53:20 +02:00
|
|
|
<template>
|
2025-01-23 09:31:51 +01:00
|
|
|
<a :class="{ 'is-info': is_active }" @click="toggle_lyrics">
|
2023-09-21 18:53:20 +02:00
|
|
|
<mdicon
|
|
|
|
class="icon"
|
2025-01-23 09:31:51 +01:00
|
|
|
:name="icon_name"
|
|
|
|
:size="icon_size"
|
2023-09-21 18:53:20 +02:00
|
|
|
:title="$t('player.button.toggle-lyrics')"
|
|
|
|
/>
|
|
|
|
</a>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2024-08-22 21:31:59 +02:00
|
|
|
import { useLyricsStore } from '@/stores/lyrics'
|
|
|
|
|
2023-09-21 18:53:20 +02:00
|
|
|
export default {
|
2025-01-23 09:31:51 +01:00
|
|
|
name: 'PlayerButtonLyrics',
|
|
|
|
props: {
|
|
|
|
icon_size: { default: 16, type: Number }
|
|
|
|
},
|
2023-09-21 18:53:20 +02:00
|
|
|
|
2024-08-22 21:31:59 +02:00
|
|
|
setup() {
|
|
|
|
return {
|
|
|
|
lyricsStore: useLyricsStore()
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2023-09-21 18:53:20 +02:00
|
|
|
computed: {
|
2025-01-23 09:31:51 +01:00
|
|
|
icon_name() {
|
2023-11-24 16:28:35 +01:00
|
|
|
return this.is_active ? 'script-text-play' : 'script-text-outline'
|
2024-03-26 15:00:17 +01:00
|
|
|
},
|
|
|
|
is_active() {
|
2024-08-22 21:31:59 +02:00
|
|
|
return this.lyricsStore.pane
|
2023-09-21 18:53:20 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
2025-01-23 09:31:51 +01:00
|
|
|
toggle_lyrics() {
|
2024-08-22 21:31:59 +02:00
|
|
|
this.lyricsStore.pane = !this.lyricsStore.pane
|
2023-09-21 18:53:20 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
2025-01-23 09:31:51 +01:00
|
|
|
|
|
|
|
<style></style>
|