Skip to content

Commit

Permalink
ui: Minor UI tweaks in admin page and sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedBassem committed Mar 2, 2024
1 parent aa914bf commit cf77fa8
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 32 deletions.
65 changes: 35 additions & 30 deletions packages/web/app/dashboard/admin/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,49 +69,54 @@ export default function AdminPage() {
<p className="text-2xl">Admin</p>
<hr />
{data ? (
<Table>
<TableHeader>
<TableRow>
<TableHead>Stats</TableHead>
<TableHead>Value</TableHead>
</TableRow>
</TableHeader>
<TableBody>
<TableRow>
<TableCell>Num Users</TableCell>
<TableCell>{data.numUsers}</TableCell>
</TableRow>
<TableRow>
<TableCell>Num Bookmarks</TableCell>
<TableCell>{data.numBookmarks}</TableCell>
</TableRow>
<TableRow>
<TableCell>Pending Crawling Jobs</TableCell>
<TableCell>{data.pendingCrawls}</TableCell>
</TableRow>
<TableRow>
<TableCell>Pending Indexing Jobs</TableCell>
<TableCell>{data.pendingIndexing}</TableCell>
</TableRow>
<TableRow>
<TableCell>Pending OpenAI Jobs</TableCell>
<TableCell>{data.pendingOpenai}</TableCell>
</TableRow>
</TableBody>
</Table>
<>
<p className="text-xl">Server Stats</p>
<Table className="w-1/2">
<TableBody>
<TableRow>
<TableCell className="w-2/3">Num Users</TableCell>
<TableCell>{data.numUsers}</TableCell>
</TableRow>
<TableRow>
<TableCell>Num Bookmarks</TableCell>
<TableCell>{data.numBookmarks}</TableCell>
</TableRow>
</TableBody>
</Table>
<hr />
<p className="text-xl">Background Jobs</p>
<Table className="w-1/2">
<TableBody>
<TableRow>
<TableCell className="w-2/3">Pending Crawling Jobs</TableCell>
<TableCell>{data.pendingCrawls}</TableCell>
</TableRow>
<TableRow>
<TableCell>Pending Indexing Jobs</TableCell>
<TableCell>{data.pendingIndexing}</TableCell>
</TableRow>
<TableRow>
<TableCell>Pending OpenAI Jobs</TableCell>
<TableCell>{data.pendingOpenai}</TableCell>
</TableRow>
</TableBody>
</Table>
</>
) : (
<LoadingSpinner />
)}
<hr />
<p className="text-xl">Actions</p>
<ActionButton
className="w-1/2"
variant="destructive"
loading={isRecrawlPending}
onClick={() => recrawlLinks()}
>
Recrawl All Links
</ActionButton>
<ActionButton
className="w-1/2"
variant="destructive"
loading={isReindexPending}
onClick={() => reindexBookmarks()}
Expand Down
3 changes: 1 addition & 2 deletions packages/web/app/dashboard/components/AllLists.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"use client";

import { api } from "@/lib/trpc";
import { ScrollArea } from "@/components/ui/scroll-area";
import SidebarItem from "./SidebarItem";
import LoadingSpinner from "@/components/ui/spinner";
import NewListModal, { useNewListModal } from "./NewListModal";
Expand All @@ -16,7 +15,7 @@ export default function AllLists() {
return (
<ul className="max-h-full gap-2 overflow-scroll text-sm font-medium">
<NewListModal />
<li className="flex justify-between py-2 font-bold">
<li className="flex justify-between pb-2 font-bold">
<p>Lists</p>
<Link href="#" onClick={() => setOpen(true)}>
<Plus />
Expand Down

0 comments on commit cf77fa8

Please sign in to comment.