From 0118fe0c63e4682d1a6898185f7a0c3b135aecba Mon Sep 17 00:00:00 2001 From: wvffle Date: Fri, 28 Oct 2022 13:24:25 +0000 Subject: [PATCH] Resolve TODOs --- front/src/components/Queue.vue | 23 ++++++++++++++----- front/src/components/audio/Player.vue | 23 ++++++++++++++----- .../favorites/TrackFavoriteIcon.vue | 3 ++- .../playlists/TrackPlaylistIcon.vue | 5 ++-- front/src/composables/audio/queue.ts | 10 +++++--- front/src/composables/audio/tracks.ts | 6 +---- front/src/composables/audio/usePlayOptions.ts | 4 ++-- front/src/store/moderation.ts | 2 +- 8 files changed, 50 insertions(+), 26 deletions(-) diff --git a/front/src/components/Queue.vue b/front/src/components/Queue.vue index 7472d4f7a..6b6032ae0 100644 --- a/front/src/components/Queue.vue +++ b/front/src/components/Queue.vue @@ -13,8 +13,8 @@ import { useQueue } from '~/composables/audio/queue' import time from '~/utils/time' -// import TrackFavoriteIcon from '~/components/favorites/TrackFavoriteIcon.vue' -// import TrackPlaylistIcon from '~/components/playlists/TrackPlaylistIcon.vue' +import TrackFavoriteIcon from '~/components/favorites/TrackFavoriteIcon.vue' +import TrackPlaylistIcon from '~/components/playlists/TrackPlaylistIcon.vue' import PlayerControls from '~/components/audio/PlayerControls.vue' import VirtualList from '~/components/vui/list/VirtualList.vue' import QueueItem from '~/components/QueueItem.vue' @@ -131,6 +131,18 @@ const reorderTracks = async (from: number, to: number) => { scrollToCurrent() } } + +const hideArtist = () => { + if (currentTrack.value.artistId !== -1) { + return store.dispatch('moderation/hide', { + type: 'artist', + target: { + id: currentTrack.value.artistId, + name: currentTrack.value.artistName + } + }) + } +}