diff --git a/src/lib/features/database/characters/sections/CharacterImagesSection.svelte b/src/lib/features/database/characters/sections/CharacterImagesSection.svelte new file mode 100644 index 00000000..366f1ec2 --- /dev/null +++ b/src/lib/features/database/characters/sections/CharacterImagesSection.svelte @@ -0,0 +1,209 @@ + + + + +{#if canEdit} + +
+

+ Download character images from the game server to your storage. +

+ +
+ + + {#if isComplete} + + {/if} +
+ + {#if downloadStatus} +
+ {#if isInProgress} +
+
+
+ + {downloadStatus.progress ?? 0}% - {downloadStatus.imagesDownloaded ?? 0}/{downloadStatus.imagesTotal ?? '?'} images + + {:else if isComplete} + Download complete - {downloadStatus.imagesDownloaded} images downloaded + {:else if isFailed} + Download failed: {downloadStatus.error} + {/if} +
+ {/if} + + {#if downloadError} +
{downloadError}
+ {/if} +
+
+{/if} + + diff --git a/src/routes/(app)/database/characters/[id]/+page.svelte b/src/routes/(app)/database/characters/[id]/+page.svelte index 1c31176b..1b862d7c 100644 --- a/src/routes/(app)/database/characters/[id]/+page.svelte +++ b/src/routes/(app)/database/characters/[id]/+page.svelte @@ -16,6 +16,7 @@ import CharacterUncapSection from '$lib/features/database/characters/sections/CharacterUncapSection.svelte' import CharacterTaxonomySection from '$lib/features/database/characters/sections/CharacterTaxonomySection.svelte' import CharacterStatsSection from '$lib/features/database/characters/sections/CharacterStatsSection.svelte' + import CharacterImagesSection from '$lib/features/database/characters/sections/CharacterImagesSection.svelte' import DetailsContainer from '$lib/components/ui/DetailsContainer.svelte' import { getCharacterImage } from '$lib/utils/images' @@ -222,6 +223,14 @@ + {#if character?.id && character?.granblueId} + + {/if} + {#if !editMode && relatedQuery.data?.length}