|
@@ -3,6 +3,7 @@ import {
|
|
defineAsyncComponent,
|
|
defineAsyncComponent,
|
|
ref,
|
|
ref,
|
|
computed,
|
|
computed,
|
|
|
|
+ watch,
|
|
onMounted,
|
|
onMounted,
|
|
onBeforeUnmount
|
|
onBeforeUnmount
|
|
} from "vue";
|
|
} from "vue";
|
|
@@ -12,6 +13,7 @@ import { DraggableList } from "vue-draggable-list";
|
|
import { useWebsocketsStore } from "@/stores/websockets";
|
|
import { useWebsocketsStore } from "@/stores/websockets";
|
|
import { useModalsStore } from "@/stores/modals";
|
|
import { useModalsStore } from "@/stores/modals";
|
|
import { useImportAlbumStore } from "@/stores/importAlbum";
|
|
import { useImportAlbumStore } from "@/stores/importAlbum";
|
|
|
|
+import { useUserAuthStore } from "@/stores/userAuth";
|
|
|
|
|
|
const Modal = defineAsyncComponent(() => import("@/components/Modal.vue"));
|
|
const Modal = defineAsyncComponent(() => import("@/components/Modal.vue"));
|
|
const MediaItem = defineAsyncComponent(
|
|
const MediaItem = defineAsyncComponent(
|
|
@@ -37,7 +39,9 @@ const {
|
|
updatePlaylistSong
|
|
updatePlaylistSong
|
|
} = importAlbumStore;
|
|
} = importAlbumStore;
|
|
|
|
|
|
-const { openModal, preventCloseCbs } = useModalsStore();
|
|
|
|
|
|
+const { openModal, closeCurrentModal, preventCloseCbs } = useModalsStore();
|
|
|
|
+
|
|
|
|
+const { hasPermission } = useUserAuthStore();
|
|
|
|
|
|
const isImportingPlaylist = ref(false);
|
|
const isImportingPlaylist = ref(false);
|
|
const trackSongs = ref([]);
|
|
const trackSongs = ref([]);
|
|
@@ -333,6 +337,13 @@ const updateTrackSong = updatedSong => {
|
|
});
|
|
});
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+watch(
|
|
|
|
+ () => hasPermission("apis.searchDiscogs"),
|
|
|
|
+ value => {
|
|
|
|
+ if (!value) closeCurrentModal(true);
|
|
|
|
+ }
|
|
|
|
+);
|
|
|
|
+
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
setPlaylistSongs(props.songs);
|
|
setPlaylistSongs(props.songs);
|
|
|
|
|