diff --git a/ui/src/routes/+layout.svelte b/ui/src/routes/+layout.svelte index 6e4c68e..b212900 100644 --- a/ui/src/routes/+layout.svelte +++ b/ui/src/routes/+layout.svelte @@ -1,5 +1,6 @@ + + + Ranking — libnovel + + +
+
+

Ranking

+

+ {#if data.items.length > 0} + {data.items.length} novels cached from last catalogue scrape + {:else} + No ranking data yet — run a full catalogue scrape to populate + {/if} +

+
+ + {#if data.isAdmin} +
{ + refreshing = true; + return async ({ update }) => { + await update(); + refreshing = false; + }; + }} + > + +
+ {/if} +
+ +{#if form} + {#if form.status === 'queued'} +
+ Full catalogue scrape queued. Ranking will update as books are processed. +
+ {:else if form.status === 'busy'} +
+ A scrape job is already running. Check back once it finishes. +
+ {:else if form.status === 'error'} +
+ Failed to queue scrape. Check that the scraper service is reachable. +
+ {/if} +{/if} + +{#if data.items.length === 0} +
+

No ranking data.

+

+ {#if data.isAdmin} + Click Refresh ranking above to trigger a full catalogue scrape. + {:else} + Ask an admin to run a catalogue scrape. + {/if} +

+
+{:else} +
+ {#each data.items as item} +
+ + + #{item.rank} + + + +
+ {#if item.cover} + {item.title} + {:else} +
+ + + +
+ {/if} +
+ + +
+ + {item.title} + +
+ {#if item.author} + {item.author} + {/if} + {#if item.status} + {item.status} + {/if} + {#if item.genres?.length} + {#each item.genres.slice(0, 3) as genre} + {genre} + {/each} + {/if} +
+
+ + + {#if item.source_url} + + + + + + {/if} +
+ {/each} +
+{/if}