chore: format the tree and clear ruff's findings
Applies ruff format, ruff check --fix and prettier, so CI can gate on all three. The surviving unused imports were all re-exports in __init__.py, now covered by a per-file ignore; the pdf.js viewer and the generated openapi types join the vendored code that eslint and prettier already skip.
This commit is contained in:
@@ -49,7 +49,8 @@
|
||||
Read
|
||||
</DropdownMenu.Item>
|
||||
<DropdownMenu.Item
|
||||
onclick={() => bookOps.downloadBookFile(book.id, book.files[0].id, book.files[0].filename)}
|
||||
onclick={() =>
|
||||
bookOps.downloadBookFile(book.id, book.files[0].id, book.files[0].filename)}
|
||||
>
|
||||
<Download class="size-4" />
|
||||
Download
|
||||
|
||||
@@ -111,7 +111,11 @@
|
||||
<Spinner />
|
||||
</div>
|
||||
{:else if bookCollection.books.length > 0}
|
||||
<ScrollArea bind:viewportRef={scrollContainer} orientation="both" class="h-[calc(100vh-11rem)] w-full px-5 pb-5">
|
||||
<ScrollArea
|
||||
bind:viewportRef={scrollContainer}
|
||||
orientation="both"
|
||||
class="h-[calc(100vh-11rem)] w-full px-5 pb-5"
|
||||
>
|
||||
{#if bookCollection.view === 'grid'}
|
||||
<BookGrid books={bookCollection.books} />
|
||||
{:else if bookCollection.view === 'list'}
|
||||
@@ -170,7 +174,7 @@
|
||||
</Sidebar.Inset>
|
||||
|
||||
<!-- Filter Sidebar (right-side) -->
|
||||
<FilterSidebar class="m-2 pb-5 h-full pt-20" />
|
||||
<FilterSidebar class="m-2 h-full pt-20 pb-5" />
|
||||
</Sidebar.Provider>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -73,8 +73,8 @@
|
||||
bookOps.deleteDialogTitle = `Delete "${book.title}"?`;
|
||||
bookOps.deleteFn = async (deleteFiles: boolean) => {
|
||||
await bookOps.deleteBooks([book.id], deleteFiles);
|
||||
libraryState.activeLibrary!.total!--
|
||||
bookshelfState.deletedBooks([book])
|
||||
libraryState.activeLibrary!.total!--;
|
||||
bookshelfState.deletedBooks([book]);
|
||||
};
|
||||
bookOps.deleteDialogOpen = true;
|
||||
}}
|
||||
|
||||
@@ -121,7 +121,10 @@
|
||||
? 'cursor-pointer'
|
||||
: ''}"
|
||||
>
|
||||
<a href={resolve('/(root)/(library)/book/[bookId]', { bookId: String(book.id) })} class="shrink-0">
|
||||
<a
|
||||
href={resolve('/(root)/(library)/book/[bookId]', { bookId: String(book.id) })}
|
||||
class="shrink-0"
|
||||
>
|
||||
<BookCover {book} height={110} />
|
||||
</a>
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
aria-pressed={active}
|
||||
onclick={() => (active ? bookCollection.clearView() : bookCollection.applyPreset(preset))}
|
||||
class="shrink-0 rounded-full border px-3 py-1 text-xs whitespace-nowrap transition-colors {active
|
||||
? 'border-primary bg-primary text-primary-foreground font-medium'
|
||||
? 'border-primary bg-primary font-medium text-primary-foreground'
|
||||
: 'border-border text-muted-foreground hover:border-muted-foreground hover:text-foreground'}"
|
||||
>
|
||||
{preset.label}
|
||||
|
||||
@@ -19,9 +19,7 @@
|
||||
class="{buttonVariants({ variant: 'ghost', size: 'icon' })} relative"
|
||||
>
|
||||
{#if bookCollection.hasActiveSort}
|
||||
<div
|
||||
class="absolute top-[5px] right-[5px] h-1.5 w-1.5 rounded-full bg-flag"
|
||||
></div>
|
||||
<div class="absolute top-[5px] right-[5px] h-1.5 w-1.5 rounded-full bg-flag"></div>
|
||||
{/if}
|
||||
<ArrowUpDown />
|
||||
</DropdownMenu.Trigger>
|
||||
|
||||
Reference in New Issue
Block a user