From d1d654ebac2d51e3841675faeb56480e440f622f Mon Sep 17 00:00:00 2001 From: Wolfgang Müller Date: Tue, 5 Mar 2024 18:08:09 +0100 Subject: Initial commit --- frontend/src/lib/tabs/AddOverlay.svelte | 36 +++++++++ frontend/src/lib/tabs/ArchiveDelete.svelte | 42 ++++++++++ frontend/src/lib/tabs/ArchiveDetails.svelte | 50 ++++++++++++ frontend/src/lib/tabs/ArchiveEdit.svelte | 68 ++++++++++++++++ frontend/src/lib/tabs/ComicDelete.svelte | 34 ++++++++ frontend/src/lib/tabs/ComicDetails.svelte | 121 ++++++++++++++++++++++++++++ frontend/src/lib/tabs/DetailsHeader.svelte | 11 +++ frontend/src/lib/tabs/DetailsSection.svelte | 10 +++ frontend/src/lib/tabs/Tab.svelte | 14 ++++ frontend/src/lib/tabs/Tabs.svelte | 40 +++++++++ 10 files changed, 426 insertions(+) create mode 100644 frontend/src/lib/tabs/AddOverlay.svelte create mode 100644 frontend/src/lib/tabs/ArchiveDelete.svelte create mode 100644 frontend/src/lib/tabs/ArchiveDetails.svelte create mode 100644 frontend/src/lib/tabs/ArchiveEdit.svelte create mode 100644 frontend/src/lib/tabs/ComicDelete.svelte create mode 100644 frontend/src/lib/tabs/ComicDetails.svelte create mode 100644 frontend/src/lib/tabs/DetailsHeader.svelte create mode 100644 frontend/src/lib/tabs/DetailsSection.svelte create mode 100644 frontend/src/lib/tabs/Tab.svelte create mode 100644 frontend/src/lib/tabs/Tabs.svelte (limited to 'frontend/src/lib/tabs') diff --git a/frontend/src/lib/tabs/AddOverlay.svelte b/frontend/src/lib/tabs/AddOverlay.svelte new file mode 100644 index 0000000..b1c98bf --- /dev/null +++ b/frontend/src/lib/tabs/AddOverlay.svelte @@ -0,0 +1,36 @@ + + +{#if $selection.size > 0} +
+ +
+{/if} diff --git a/frontend/src/lib/tabs/ArchiveDelete.svelte b/frontend/src/lib/tabs/ArchiveDelete.svelte new file mode 100644 index 0000000..b0e3c58 --- /dev/null +++ b/frontend/src/lib/tabs/ArchiveDelete.svelte @@ -0,0 +1,42 @@ + + +
+
+

+ Deleting this archive will remove the + archive file on disk. +

+ {#if archive.comics.length > 0} +

The following comics will also be deleted:

+ + {/if} +

This action is irrevocable.

+
+
+ +
+
diff --git a/frontend/src/lib/tabs/ArchiveDetails.svelte b/frontend/src/lib/tabs/ArchiveDetails.svelte new file mode 100644 index 0000000..9554557 --- /dev/null +++ b/frontend/src/lib/tabs/ArchiveDetails.svelte @@ -0,0 +1,50 @@ + + +
+
+
+
+ {filesize(archive.size, { base: 2 })} +
+
+ + {formatDistance(createdDate, now, { addSuffix: true })} + +
+
+ + {formatDistance(modifiedDate, now, { addSuffix: true })} + +
+
+ + {#if archive.comics.length > 0} +
+

Comics

+
+ {#each archive.comics as comic} + + + + {/each} +
+
+ {/if} +
diff --git a/frontend/src/lib/tabs/ArchiveEdit.svelte b/frontend/src/lib/tabs/ArchiveEdit.svelte new file mode 100644 index 0000000..80efaed --- /dev/null +++ b/frontend/src/lib/tabs/ArchiveEdit.svelte @@ -0,0 +1,68 @@ + + +
+
+ + + +
+ +
+ + {#if archive.comics.length > 0} +
+

Comics

+
+ {#each archive.comics as comic} + + + + + {/each} +
+
+ {/if} +
diff --git a/frontend/src/lib/tabs/ComicDelete.svelte b/frontend/src/lib/tabs/ComicDelete.svelte new file mode 100644 index 0000000..a10f6b2 --- /dev/null +++ b/frontend/src/lib/tabs/ComicDelete.svelte @@ -0,0 +1,34 @@ + + +
+
+

+ Deleting this comic will make all of its pages available again for allocation. All of its + metadata will be lost. +

+

This action is irrevocable.

+
+
+ +
+
diff --git a/frontend/src/lib/tabs/ComicDetails.svelte b/frontend/src/lib/tabs/ComicDetails.svelte new file mode 100644 index 0000000..0a131af --- /dev/null +++ b/frontend/src/lib/tabs/ComicDetails.svelte @@ -0,0 +1,121 @@ + + +
+
+ {#if comic.url} + + + + {/if} + + + +
+ +
+ {#if comic.language} +
+ {LanguageLabel[comic.language]} +
+ {/if} + {#if comic.censorship} +
+ {CensorshipLabel[comic.censorship]} +
+ {/if} + {#if comic.rating} +
+ {RatingLabel[comic.rating]} +
+ {/if} +
+ +
+ {#if comic.date} +
+ {formatISO9075(new Date(comic.date), { representation: 'date' })} +
+ {/if} +
+ + {formatDistance(createdDate, now, { addSuffix: true })} + +
+
+ + {formatDistance(updatedDate, now, { addSuffix: true })} + +
+
+ + {#if comic.artists.length} +
+ {#each comic.artists as { id, name } (id)} + + + + {/each} +
+ {/if} + {#if comic.circles.length} +
+ {#each comic.circles as { id, name } (id)} + + + + {/each} +
+ {/if} + {#if comic.characters.length} +
+ {#each comic.characters as { id, name } (id)} + + + + {/each} +
+ {/if} + {#if comic.worlds.length} +
+ {#each comic.worlds as { id, name } (id)} + + + + {/each} +
+ {/if} + {#if comic.tags.length} +
+ {#each comic.tags as { id, name, description } (id)} + + + + {/each} +
+ {/if} +
diff --git a/frontend/src/lib/tabs/DetailsHeader.svelte b/frontend/src/lib/tabs/DetailsHeader.svelte new file mode 100644 index 0000000..f980f75 --- /dev/null +++ b/frontend/src/lib/tabs/DetailsHeader.svelte @@ -0,0 +1,11 @@ + + +
+

+ {title} +

+
+ +
diff --git a/frontend/src/lib/tabs/DetailsSection.svelte b/frontend/src/lib/tabs/DetailsSection.svelte new file mode 100644 index 0000000..9a6ad51 --- /dev/null +++ b/frontend/src/lib/tabs/DetailsSection.svelte @@ -0,0 +1,10 @@ + + +
+

{title}

+
+ +
+
diff --git a/frontend/src/lib/tabs/Tab.svelte b/frontend/src/lib/tabs/Tab.svelte new file mode 100644 index 0000000..0a6be57 --- /dev/null +++ b/frontend/src/lib/tabs/Tab.svelte @@ -0,0 +1,14 @@ + + +{#if $context.current === id} +
+ +
+{/if} diff --git a/frontend/src/lib/tabs/Tabs.svelte b/frontend/src/lib/tabs/Tabs.svelte new file mode 100644 index 0000000..09cdbdd --- /dev/null +++ b/frontend/src/lib/tabs/Tabs.svelte @@ -0,0 +1,40 @@ + + +
+ + +
+ + -- cgit v1.2.3-2-gb3c3