From 3cadee1d488f1d3028f3fa0f4411a87c2f21de20 Mon Sep 17 00:00:00 2001 From: Alain Nussbaumer Date: Wed, 21 Feb 2024 12:29:16 +0100 Subject: [PATCH] [web] Remove useless getters of the store --- web-src/src/components/LyricsPane.vue | 2 +- web-src/src/components/PlayerButtonLyrics.vue | 2 +- web-src/src/pages/PageNowPlaying.vue | 2 +- web-src/src/store/index.js | 4 ---- 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/web-src/src/components/LyricsPane.vue b/web-src/src/components/LyricsPane.vue index fc2582d8..579f870c 100644 --- a/web-src/src/components/LyricsPane.vue +++ b/web-src/src/components/LyricsPane.vue @@ -100,7 +100,7 @@ export default { } }, lyrics() { - const raw = this.$store.getters.lyrics + const raw = this.$store.state.lyrics.content const parsed = [] if (raw) { // Parse the lyrics diff --git a/web-src/src/components/PlayerButtonLyrics.vue b/web-src/src/components/PlayerButtonLyrics.vue index d501ad82..163fa64a 100644 --- a/web-src/src/components/PlayerButtonLyrics.vue +++ b/web-src/src/components/PlayerButtonLyrics.vue @@ -22,7 +22,7 @@ export default { computed: { is_active() { - return this.$store.getters.lyrics_pane + return this.$store.state.lyrics.pane }, icon_name() { return this.is_active ? 'script-text-play' : 'script-text-outline' diff --git a/web-src/src/pages/PageNowPlaying.vue b/web-src/src/pages/PageNowPlaying.vue index ccd2cfae..0b896dc4 100644 --- a/web-src/src/pages/PageNowPlaying.vue +++ b/web-src/src/pages/PageNowPlaying.vue @@ -91,7 +91,7 @@ export default { }, lyrics_visible() { - return this.$store.getters.lyrics_pane + return this.$store.state.lyrics.pane }, player() { diff --git a/web-src/src/store/index.js b/web-src/src/store/index.js index 1d5cbe12..5a7532d6 100644 --- a/web-src/src/store/index.js +++ b/web-src/src/store/index.js @@ -70,10 +70,6 @@ export default createStore({ }, getters: { - lyrics: (state) => state.lyrics.content, - - lyrics_pane: (state) => state.lyrics.pane, - now_playing: (state) => { const item = state.queue.items.find((e) => e.id === state.player.item_id) return item === undefined ? {} : item