diff --git a/src/components/Header/SnackbarComponent.vue b/src/components/Header/SnackbarComponent.vue index ed7476a..324a66a 100644 --- a/src/components/Header/SnackbarComponent.vue +++ b/src/components/Header/SnackbarComponent.vue @@ -40,7 +40,9 @@ eventQueuStore.$subscribe((mutation, state) => { let event = eventQueuStore.shift(); if (event?.uuid) { if ( - snacks.value.filter((value) => value.text == event?.text).length == 0 + snacks.value.filter( + (value) => event?.type == "error" && value.text == event?.text + ).length == 0 ) { snacks.value.push({ snack: true, diff --git a/src/components/guild/home/AudioPreviewComponent.vue b/src/components/guild/home/AudioPreviewComponent.vue index 2786d30..4949bf8 100644 --- a/src/components/guild/home/AudioPreviewComponent.vue +++ b/src/components/guild/home/AudioPreviewComponent.vue @@ -145,7 +145,7 @@ - + - + - - - + + + + + @@ -287,6 +289,7 @@ import type { Guild } from "@/data/guild/Guild"; import type { Status } from "@/data/music/Status"; import * as audioService from "@/services/audioService"; import { getVoiceChannels } from "@/services/guildService"; +import { useEventQueuStore } from "@/stores/eventQueu"; import { computed } from "@vue/reactivity"; import { ref, watch } from "vue"; import { onBeforeRouteLeave, onBeforeRouteUpdate } from "vue-router"; @@ -470,6 +473,12 @@ function add() { urlLoading.value = false; urlPopup.value = false; url.value = ""; + const eventQueuStore = useEventQueuStore(); + eventQueuStore.push({ + uuid: undefined, + type: "success", + text: "Track added to playlist !", + }); }) .catch(() => { urlLoading.value = false;