[FA-misc] Various UI updates
All checks were successful
CI / build-backend (pull_request) Successful in 1m38s
CI / build-frontend (pull_request) Successful in 37s

This commit is contained in:
gamer147
2025-12-10 20:37:30 -05:00
parent 45afb57df5
commit f0ea71e00e
13 changed files with 298 additions and 28 deletions

View File

@@ -14,6 +14,7 @@
parseFiltersFromURL,
syncFiltersToURL,
filtersToGraphQLWhere,
sortToGraphQLOrder,
hasActiveFilters,
EMPTY_FILTERS
} from '$lib/utils/filterParams';
@@ -52,8 +53,9 @@
try {
const where = filtersToGraphQLWhere(filters);
const order = sortToGraphQLOrder(filters.sort);
const result = await client
.query(NovelsDocument, { first: PAGE_SIZE, after, where })
.query(NovelsDocument, { first: PAGE_SIZE, after, where, order })
.toPromise();
if (result.error) {
@@ -116,20 +118,13 @@
<Card class="shadow-md shadow-primary/10">
<CardHeader>
<div class="flex items-center justify-between">
<CardTitle>Novels</CardTitle>
<CardTitle>Controls</CardTitle>
{#if $isAuthenticated}
<Button variant="outline" onclick={() => (showImportModal = true)}>
Import Novel
</Button>
{/if}
</div>
<p class="text-muted-foreground text-sm">
{#if hasActiveFilters(filters)}
Showing filtered results
{:else}
Browse all novels
{/if}
</p>
</CardHeader>
<CardContent>
<NovelFilters {filters} onFilterChange={handleFilterChange} availableTags={availableTags()} />