diff --git a/resources/assets/.eslintrc b/resources/assets/.eslintrc
index 43cad881..9ac9e100 100644
--- a/resources/assets/.eslintrc
+++ b/resources/assets/.eslintrc
@@ -38,6 +38,7 @@
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-non-null-assertion": 0,
"@typescript-eslint/ban-ts-comment": 0,
+ "@typescript-eslint/no-empty-function": 0,
"vue/no-side-effects-in-computed-properties": 0,
"@typescript-eslint/explicit-module-boundary-types": 0,
"standard/no-callback-literal": 0,
diff --git a/resources/assets/js/app.vue b/resources/assets/js/app.vue
index ff9224a1..ea229c85 100644
--- a/resources/assets/js/app.vue
+++ b/resources/assets/js/app.vue
@@ -31,7 +31,7 @@ import LoginForm from '@/components/auth/login-form.vue'
import MainWrapper from '@/components/layout/main-wrapper/index.vue'
import Overlay from '@/components/ui/overlay.vue'
-import { $, eventBus, hideOverlay, showOverlay } from '@/utils'
+import { $, eventBus, hideOverlay, showOverlay, arrayify } from '@/utils'
import { favoriteStore, preferenceStore as preferences, queueStore, sharedStore } from '@/stores'
import { auth, playback, socket } from '@/services'
@@ -84,8 +84,8 @@ onMounted(async () => {
$.addClass(document.documentElement, navigator.userAgent.includes('Mac') ? 'mac' : 'non-mac')
})
-eventBus.on('SONG_CONTEXT_MENU_REQUESTED', async (e: MouseEvent, songs: Song[]) => {
- contextMenuSongs.value = ([] as Song[]).concat(songs)
+eventBus.on('SONG_CONTEXT_MENU_REQUESTED', async (e: MouseEvent, songs: Song | Song[]) => {
+ contextMenuSongs.value = arrayify(songs)
await nextTick()
songContextMenu.value?.open(e.pageY, e.pageX)
})
diff --git a/resources/assets/js/components/screens/queue.vue b/resources/assets/js/components/screens/queue.vue
index d30142a5..053769c8 100644
--- a/resources/assets/js/components/screens/queue.vue
+++ b/resources/assets/js/components/screens/queue.vue
@@ -1,8 +1,8 @@
-
+
Current Queue
-
+
@@ -11,27 +11,27 @@
-
-
+
-
-
+
@@ -41,7 +41,7 @@
How about
shuffling all songs?
-
+
@@ -50,7 +50,7 @@ import { pluralize } from '@/utils'
import { queueStore, songStore } from '@/stores'
import { playback } from '@/services'
import { useSongList } from '@/composables'
-import { computed, defineAsyncComponent, reactive } from 'vue'
+import { computed, defineAsyncComponent, reactive, toRef } from 'vue'
const ScreenHeader = defineAsyncComponent(() => import('@/components/ui/screen-header.vue'))
const ScreenPlaceholder = defineAsyncComponent(() => import('@/components/ui/screen-placeholder.vue'))
@@ -71,14 +71,13 @@ const {
clearQueue: true
})
-const state = reactive(queueStore.state)
+const songs = toRef(queueStore.state, 'songs')
const songState = reactive(songStore.state)
const shouldShowShufflingAllLink = computed(() => songState.songs.length > 0)
const playAll = () => {
- // @ts-ignore
- playback.queueAndPlay(state.songs.length ? songList.value?.getAllSongsWithSort() : songStore.all)
+ playback.queueAndPlay(songs.value.length ? songList.value.getAllSongsWithSort() : songStore.all)
}
const shuffleAll = async () => await playback.queueAndPlay(songStore.all, true)
diff --git a/resources/assets/js/components/song/card.vue b/resources/assets/js/components/song/card.vue
index 92e50555..788d1520 100644
--- a/resources/assets/js/components/song/card.vue
+++ b/resources/assets/js/components/song/card.vue
@@ -31,23 +31,14 @@