From 361f506cd3677f61d2203ff91fab70ba3a1c5851 Mon Sep 17 00:00:00 2001
From: Wolfgang Müller
Date: Thu, 20 Feb 2025 19:33:55 +0100
Subject: frontend: Introduce ComicCard and ArchiveCard

Instead of repeatedly supplying Card content in all the places it is
required, it makes more sense to create dedicated ComicCard and
ArchiveCard components. These wrap around Card itself and can be used in
a more straightforward and consistent fashion.

Whilst we are here, simplify and streamline the display of Comic and
Archive metadata by introducing a Card footer. The footer is used for
information on page count, release date, and archive size.
---
 frontend/src/lib/tabs/ArchiveEdit.svelte | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

(limited to 'frontend/src/lib/tabs/ArchiveEdit.svelte')

diff --git a/frontend/src/lib/tabs/ArchiveEdit.svelte b/frontend/src/lib/tabs/ArchiveEdit.svelte
index 83a492b..2ed0523 100644
--- a/frontend/src/lib/tabs/ArchiveEdit.svelte
+++ b/frontend/src/lib/tabs/ArchiveEdit.svelte
@@ -3,9 +3,8 @@
 	import { type FullArchiveFragment } from '$gql/graphql';
 	import { toastFinally } from '$lib/Toasts';
 	import AddButton from '$lib/components/AddButton.svelte';
-	import Card, { comicCard } from '$lib/components/Card.svelte';
+	import ComicCard from '$lib/components/ComicCard.svelte';
 	import OrganizedButton from '$lib/components/OrganizedButton.svelte';
-	import ComicPills from '$lib/pills/ComicPills.svelte';
 	import { getSelectionContext } from '$lib/selection/Selection.svelte';
 	import SelectionControls from '$lib/toolbar/SelectionControls.svelte';
 	import { getContextClient } from '@urql/svelte';
@@ -57,12 +56,11 @@
 			<h2 class="text-base font-medium">Comics</h2>
 			<div class="flex shrink-0 flex-col gap-4">
 				{#each archive.comics as comic}
-					<Card compact {...comicCard(comic)}>
+					<ComicCard compact {comic}>
 						{#snippet overlay()}
 							<AddOverlay id={comic.id} />
 						{/snippet}
-						<ComicPills {comic} />
-					</Card>
+					</ComicCard>
 				{/each}
 			</div>
 		</div>
-- 
cgit v1.2.3-2-gb3c3

