Use nuxtopenfetch

This commit is contained in:
2025-10-10 20:13:29 +02:00
parent 1bce60af7d
commit 48d355d657
19 changed files with 2039 additions and 1660 deletions

View File

@@ -2,7 +2,7 @@
<UPageSection title="Settings" />
<UPageSection title="Libraries" orientation="horizontal">
<template #footer>
<UButton icon="i-lucide-plus" class="w-fit" @click="() => addLibraryModal.open()">Add</UButton>
<UButton icon="i-lucide-plus" class="w-fit" @click="addLibraryModal.open()">Add</UButton>
</template>
<FileLibraries />
</UPageSection>
@@ -17,19 +17,17 @@
<script setup lang="ts">
import { LazyAddLibraryModal } from '#components';
import FileLibraries from '~/components/FileLibraries.vue';
import { refreshNuxtData } from '#app';
const overlay = useOverlay();
const config = useRuntimeConfig();
const addLibraryModal = overlay.create(LazyAddLibraryModal);
const cleanUpDatabaseBusy = ref(false);
const cleanUpDatabase = async () => {
cleanUpDatabaseBusy.value = true;
await $api('/v2/Maintenance/CleanupNoDownloadManga', { method: 'POST' })
.then(() => refreshNuxtData(Keys.Manga.All))
await useApi('/v2/Maintenance/CleanupNoDownloadManga', { method: 'POST' })
.then(() => refreshNuxtData(FetchKeys.Manga.All))
.finally(() => (cleanUpDatabaseBusy.value = false));
};
</script>