owntone-server/web-src/src/components/PlayerButtonLyrics.vue
X-Ryl669 5e370e479a [web] Add lyrics player to the webinterface
Update icons.js
Add icons in alphabetical order.
Change comment to remove reference to external website
Remove extra line feeds

Co-Authored-by: Alain Nussbaumer <alain.nussbaumer@alleluia.ch>
2023-11-13 16:37:02 +01:00

47 lines
817 B
Vue

<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() {
this.$store.state.lyrics.lyrics_pane =
!this.$store.state.lyrics.lyrics_pane
}
}
}
</script>
<style></style>