From c6868ed2a220bf726c2a46ae69298322d17c415d Mon Sep 17 00:00:00 2001 From: Astrian Zheng Date: Tue, 27 May 2025 17:03:55 +1000 Subject: [PATCH] feat: add vue-toast-notification for user feedback and implement queue management in TrackItem component --- package-lock.json | 13 +++++++++ package.json | 1 + src/assets/icons/queueadd.vue | 11 ++++++++ src/components/AlbumDetailDialog.vue | 1 + src/components/Player.vue | 1 - src/components/TrackItem.vue | 42 ++++++++++++++++++++++++++-- src/main.ts | 4 ++- src/stores/usePlayQueueStore.ts | 10 ++----- 8 files changed, 71 insertions(+), 12 deletions(-) create mode 100644 src/assets/icons/queueadd.vue diff --git a/package-lock.json b/package-lock.json index eb5a86a..5db5feb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,7 @@ "tailwindcss": "^4.1.7", "vue": "^3.5.13", "vue-router": "^4.5.1", + "vue-toast-notification": "^3.1.3", "webextension-polyfill": "^0.12.0" }, "devDependencies": { @@ -2675,6 +2676,18 @@ "vue": "^3.2.0" } }, + "node_modules/vue-toast-notification": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/vue-toast-notification/-/vue-toast-notification-3.1.3.tgz", + "integrity": "sha512-XNyWqwLIGBFfX5G9sK+clq3N3IPlhDjzNdbZaXkEElcotPlWs0wWZailk1vqhdtLYT/93Y4FHAVuzyatLmPZRA==", + "license": "MIT", + "engines": { + "node": ">=12.15.0" + }, + "peerDependencies": { + "vue": "^3.0" + } + }, "node_modules/vue-tsc": { "version": "2.2.10", "resolved": "https://registry.npmjs.org/vue-tsc/-/vue-tsc-2.2.10.tgz", diff --git a/package.json b/package.json index f14ab95..b2b72e7 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "tailwindcss": "^4.1.7", "vue": "^3.5.13", "vue-router": "^4.5.1", + "vue-toast-notification": "^3.1.3", "webextension-polyfill": "^0.12.0" }, "devDependencies": { diff --git a/src/assets/icons/queueadd.vue b/src/assets/icons/queueadd.vue new file mode 100644 index 0000000..0b60dc9 --- /dev/null +++ b/src/assets/icons/queueadd.vue @@ -0,0 +1,11 @@ + + + \ No newline at end of file diff --git a/src/components/AlbumDetailDialog.vue b/src/components/AlbumDetailDialog.vue index 0b8491e..e66cf36 100644 --- a/src/components/AlbumDetailDialog.vue +++ b/src/components/AlbumDetailDialog.vue @@ -131,6 +131,7 @@ function playTheAlbum(from: number = 0) { playQueue.isPlaying = true playQueue.isBuffering = true } +