feat(web): table-style 库管理, admin entries under avatar 系统管理, shelf-view upload button
This commit is contained in:
@@ -7,6 +7,7 @@ import type { Book } from "@/api/types";
|
||||
import { useAuth } from "@/auth/AuthContext";
|
||||
import { Cover } from "@/components/Cover";
|
||||
import { toast } from "@/components/Toaster";
|
||||
import { UploadButton } from "@/components/upload-button";
|
||||
import { formatBadge } from "@/components/ui";
|
||||
import {
|
||||
AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent,
|
||||
@@ -177,10 +178,13 @@ export default function Shelf() {
|
||||
))}
|
||||
</div>
|
||||
{isAdmin && lib > LIB0 && (
|
||||
<Button variant="outline" size="sm" disabled={scan.isPending} onClick={() => scan.mutate(lib)} className="gap-1.5">
|
||||
<ScanLine className="size-4" />
|
||||
{scan.isPending ? "扫描中…" : "扫描此库"}
|
||||
</Button>
|
||||
<>
|
||||
<UploadButton libId={lib} variant="outline" label="上传文件" />
|
||||
<Button variant="outline" size="sm" disabled={scan.isPending} onClick={() => scan.mutate(lib)} className="gap-1.5">
|
||||
<ScanLine className="size-4" />
|
||||
{scan.isPending ? "扫描中…" : "扫描此库"}
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
<Button variant="ghost" size="icon" aria-label="刷新书目" onClick={() => qc.invalidateQueries({ queryKey: ["books"] })}>
|
||||
<RefreshCw className="size-4" />
|
||||
|
||||
Reference in New Issue
Block a user