Fix LibrarySelect

This commit is contained in:
2025-10-16 19:11:43 +02:00
parent 20c9824ce1
commit 732e1a7b1f
2 changed files with 7 additions and 2 deletions

View File

@@ -33,7 +33,7 @@ export interface LibrarySelectProps {
const props = defineProps<LibrarySelectProps>();
const library = computed(() => props.libraryId);
const library = ref(props.libraryId);
const { data: libraries } = await useApi('/v2/FileLibrary', { key: FetchKeys.FileLibraries });
const loading = ref(false);
@@ -46,5 +46,10 @@ const onLibrarySelectChange = async () => {
});
await refreshNuxtData(FetchKeys.Manga.Id(props.mangaId));
loading.value = false;
emit('libraryChanged', library.value);
};
const emit = defineEmits<{
(e: 'libraryChanged', id?: string): void;
}>();
</script>

View File

@@ -7,7 +7,7 @@
<template #header>
<h1 class="font-semibold">Download</h1>
</template>
<LibrarySelect :manga-id="mangaId" :library-id="manga?.fileLibraryId" class="w-full" />
<LibrarySelect :manga-id="mangaId" :library-id="manga?.fileLibraryId" class="w-full" @library-changed="refreshNuxtData(FetchKeys.Manga.Id(mangaId))" />
<div v-if="manga" class="flex flex-row gap-2 w-full flex-wrap my-2 justify-between">
<div
v-for="mangaconnectorId in manga.mangaConnectorIds.sort((a, b) =>