This commit is contained in:
2025-09-28 19:34:15 +02:00
parent 93c9b0b365
commit 1bce60af7d
15 changed files with 67 additions and 47 deletions

View File

@@ -31,11 +31,13 @@
</template>
<script setup lang="ts">
export interface ChaptersListProps {
mangaId: string;
}
const props = defineProps<ChaptersListProps>();
const { data: chapters } = await useApiData('/v2/Manga/{MangaId}/Chapters', { path: { MangaId: props.mangaId }, key: FetchKeys.Chapters.All });
const { data: chapters } = await useApiData('/v2/Manga/{MangaId}/Chapters', {
path: { MangaId: props.mangaId },
key: FetchKeys.Chapters.All,
});
</script>

View File

@@ -13,8 +13,8 @@
</template>
<script setup lang="ts">
import type { ApiModel } from '#nuxt-api-party'
type FileLibrary = ApiModel<"FileLibrary">;
import type { ApiModel } from '#nuxt-api-party';
type FileLibrary = ApiModel<'FileLibrary'>;
const { data: fileLibraries } = await useApiData('/v2/FileLibrary', { key: FetchKeys.FileLibraries });
const busy = ref(false);
@@ -22,6 +22,6 @@ const deleteLibrary = async (l: FileLibrary) => {
busy.value = true;
await $api('/v2/FileLibrary/{FileLibraryId}', { path: { FileLibraryId: l.key }, method: 'DELETE' })
.then(() => refreshNuxtData(FetchKeys.FileLibraries))
.finally(() => busy.value = false)
.finally(() => (busy.value = false));
};
</script>

View File

@@ -33,7 +33,7 @@
</template>
<script setup lang="ts">
import type { ApiModel } from '#nuxt-api-party'
import type { ApiModel } from '#nuxt-api-party';
import type { PageCardProps } from '#ui/components/PageCard.vue';
type Manga = ApiModel<'Manga'>;
type MinimalManga = ApiModel<'MinimalManga'>;

View File

@@ -18,7 +18,7 @@
</template>
<script setup lang="ts">
import type { ApiModel } from '#nuxt-api-party'
import type { ApiModel } from '#nuxt-api-party';
type MinimalManga = ApiModel<'MinimalManga'>;
type Manga = ApiModel<'Manga'>;
defineProps<{ manga: Manga | MinimalManga; blur?: boolean }>();

View File

@@ -40,7 +40,7 @@
</template>
<script setup lang="ts">
import type { ApiModel } from '#nuxt-api-party'
import type { ApiModel } from '#nuxt-api-party';
type Manga = ApiModel<'Manga'>;
export interface MangaDetailPageProps {

View File

@@ -14,12 +14,13 @@
</template>
<script setup lang="ts">
import type { ApiModel } from '#nuxt-api-party'
import type { ApiModel } from '#nuxt-api-party';
type MangaConnectorId = /* @vue-ignore */ ApiModel<'MangaConnectorId'>;
const props = defineProps<MangaConnectorId>();
const { data: mangaConnector } = await useApiData('/v2/MangaConnector/{MangaConnectorName}', {
path: { MangaConnectorName: props.mangaConnectorName }, key: FetchKeys.MangaConnector.Id(props.mangaConnectorName),
path: { MangaConnectorName: props.mangaConnectorName },
key: FetchKeys.MangaConnector.Id(props.mangaConnectorName),
});
</script>