diff --git a/ui/src/routes/discover/+page.svelte b/ui/src/routes/discover/+page.svelte index 2f98c0d..935be27 100644 --- a/ui/src/routes/discover/+page.svelte +++ b/ui/src/routes/discover/+page.svelte @@ -86,7 +86,7 @@ let transitioning = $state(false); let showPreview = $state(false); let voted = $state<{ slug: string; action: string } | null>(null); // last voted, for undo - let activeTab = $state<'discover' | 'history'>('discover'); + let showHistory = $state(false); // svelte-ignore state_referenced_locally let votedBooks = $state(data.votedBooks ?? []); @@ -426,49 +426,125 @@ {/if} + +{#if showHistory} + +{/if} + -
+
+ -
+

Discover

{#if !deckEmpty}

{totalRemaining} books left

{/if}
- +
+ + + + +
- -
- - -
- - {#if activeTab === 'discover'} {#if deckEmpty}
@@ -501,8 +577,9 @@
{:else} {@const book = currentBook!} - -
+ + +
{#if nextNextBook} @@ -561,9 +638,9 @@ {/if} -
+
-

{book.title}

+

{book.title}

{#if book.author}

{book.author}

{/if} @@ -582,164 +659,91 @@
- LIKE + LIKE
- SKIP + SKIP
- READ NOW + READ NOW
- NOPE + NOPE
{/if}
- -
- + +
+ - + - - - - + - - -
- - -

- Swipe or tap buttons · Tap card for details -

- {/if} - {/if} - - {#if activeTab === 'history'} -
- {#if !votedBooks.length} -

No votes yet — start swiping!

- {:else} - {#each votedBooks as v (v.slug)} - {@const actionColor = v.action === 'like' ? 'text-green-400' : v.action === 'read_now' ? 'text-blue-400' : 'text-(--color-muted)'} - {@const actionLabel = v.action === 'like' ? 'Liked' : v.action === 'read_now' ? 'Read Now' : v.action === 'skip' ? 'Skipped' : 'Noped'} -
- - {#if v.book?.cover} - - {:else} -
- {/if} - - -
- - {v.book?.title ?? v.slug} - - {#if v.book?.author} -

{v.book.author}

- {/if} - {actionLabel} -
- - - -
- {/each} - - - {/if} -
{/if}