Add list of Mangaconnectors that Manga is available from

This commit is contained in:
2025-10-13 19:48:09 +02:00
parent b8e5696d36
commit b8563fdeb6
4 changed files with 46 additions and 12 deletions

View File

@@ -4,8 +4,7 @@
v-for="chapter in chapters" v-for="chapter in chapters"
:key="chapter.key" :key="chapter.key"
orientation="horizontal" orientation="horizontal"
:ui="{ container: 'p-2 sm:p-2' }" :ui="{ container: 'p-2 sm:p-2' }">
>
<template #title> <template #title>
<p class="text-primary">{{ chapter.title }}</p> <p class="text-primary">{{ chapter.title }}</p>
<p class="text-secondary"> <p class="text-secondary">
@@ -30,14 +29,25 @@
a.mangaConnectorName < b.mangaConnectorName ? -1 : 1 a.mangaConnectorName < b.mangaConnectorName ? -1 : 1
)" )"
:key="mangaconnectorId.key" :key="mangaconnectorId.key"
class="bg-elevated p-1 rounded-lg w-fit flex items-center justify-center gap-2" class="bg-elevated p-1 rounded-lg w-fit flex items-center justify-center gap-2">
>
<MangaconnectorIcon v-bind="mangaconnectorId" /> <MangaconnectorIcon v-bind="mangaconnectorId" />
<UTooltip :text="mangaconnectorId.useForDownload ? 'Stop downloading from this website' : 'Download from this website'"> <UTooltip
<UButton :icon="mangaconnectorId.useForDownload ? 'i-lucide-cloud-off' : 'i-lucide-cloud-download'" variant="ghost" disabled /> <!-- Not implemented yet --> :text="
mangaconnectorId.useForDownload
? 'Stop downloading from this website'
: 'Download from this website'
">
<UButton
:icon="
mangaconnectorId.useForDownload ? 'i-lucide-cloud-off' : 'i-lucide-cloud-download'
"
variant="ghost"
disabled />
<!-- Not implemented yet -->
</UTooltip> </UTooltip>
</div> </div>
<UButton variant="outline" color="secondary" class="ml-auto" disabled>Force (re)download</UButton> <!-- Not implemented yet --> <UButton variant="outline" color="secondary" class="ml-auto" disabled>Force (re)download</UButton>
<!-- Not implemented yet -->
</div> </div>
</template> </template>
</UPageCard> </UPageCard>

View File

@@ -9,7 +9,9 @@
backdrop-filter: blur(2px) brightness(70%); backdrop-filter: blur(2px) brightness(70%);
-webkit-backdrop-filter: blur(2px) brightness(70%); -webkit-backdrop-filter: blur(2px) brightness(70%);
"> ">
<p class="p-3 text-xl font-semibold max-h-full overflow-clip text-shadow-lg text-white">{{ manga?.name }}</p> <p class="p-3 text-xl font-semibold max-h-full overflow-clip text-shadow-lg text-white">
{{ manga?.name }}
</p>
</div> </div>
<LazyNuxtImg <LazyNuxtImg
:src="`${$config.public.openFetch.api.baseURL}v2/Manga/${manga.key}/Cover/Medium`" :src="`${$config.public.openFetch.api.baseURL}v2/Manga/${manga.key}/Cover/Medium`"

View File

@@ -32,9 +32,6 @@
<p v-if="title" class="text-3xl">{{ title }}</p> <p v-if="title" class="text-3xl">{{ title }}</p>
</div> </div>
<div v-if="manga" class="flex flex-row gap-2"> <div v-if="manga" class="flex flex-row gap-2">
<UButton trailing-icon="i-lucide-merge" :to="`${manga.key}/merge/`" color="secondary"
>Merge</UButton
>
<slot name="actions" /> <slot name="actions" />
</div> </div>
</div> </div>

View File

@@ -6,10 +6,35 @@
<template #header> <template #header>
<h1>Download</h1> <h1>Download</h1>
</template> </template>
<LibrarySelect :manga-id="mangaId" :library-id="libraryId" /> <LibrarySelect :manga-id="mangaId" :library-id="libraryId" class="w-full" />
<div v-if="manga" class="flex flex-row gap-2 w-full flex-wrap my-2">
<div
v-for="mangaconnectorId in manga.mangaConnectorIds.sort((a, b) =>
a.mangaConnectorName < b.mangaConnectorName ? -1 : 1
)"
:key="mangaconnectorId.key"
class="bg-elevated p-1 rounded-lg w-fit flex items-center justify-center gap-2">
<MangaconnectorIcon v-bind="mangaconnectorId" />
<UTooltip
:text="
mangaconnectorId.useForDownload
? 'Stop downloading from this website'
: 'Download from this website'
">
<UButton
:icon="
mangaconnectorId.useForDownload ? 'i-lucide-cloud-off' : 'i-lucide-cloud-download'
"
variant="ghost"
disabled />
<!-- Not implemented yet -->
</UTooltip>
</div>
</div>
</UCard> </UCard>
</div> </div>
<template #actions> <template #actions>
<UButton trailing-icon="i-lucide-merge" :to="`${manga.key}/merge/`" color="secondary">Merge</UButton>
<UButton variant="soft" color="warning" icon="i-lucide-trash" /> <UButton variant="soft" color="warning" icon="i-lucide-trash" />
</template> </template>
</MangaDetailPage> </MangaDetailPage>