frontend: add bookmark management and homepage navigation

Admin-only /bookmarks page for managing entries; homepage now renders
public bookmarks as a category-grouped navigation grid (empty state
links admin to the manager). Dashboard gains a recent-bookmarks card,
dock and main layout get a bookmark entry for admins, and the
middleware protects /bookmarks.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-03 01:51:55 +08:00
parent ffecc9451d
commit 37cecaa1ce
8 changed files with 625 additions and 42 deletions

View File

@@ -22,6 +22,11 @@ export default async function MainLayout({
<Link href="/dashboard" className="text-sm hover:underline">
</Link>
{user?.role === "admin" && (
<Link href="/bookmarks" className="text-sm hover:underline">
</Link>
)}
<form
action={async () => {
"use server";