Add a Tools block to the admin home with the QR code generator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
c4970af3b8
commit
99c3a87c87
2 changed files with 24 additions and 3 deletions
|
|
@ -9,8 +9,8 @@
|
|||
reads, so a new entity shows up here the moment it's registered.
|
||||
Forms sit in their own block below: they're submissions coming
|
||||
in rather than content going out, and there'll be more of them
|
||||
than the feedback queue eventually. The Panel block below that
|
||||
only exists for superadmins.
|
||||
than the feedback queue eventually. Tools come next, and the
|
||||
Panel block below that only exists for superadmins.
|
||||
|
||||
The right-hand panel is deliberately inert. Nothing here
|
||||
fetches, so the landing page can't be slow or half-broken on
|
||||
|
|
@ -22,7 +22,7 @@ import { Link } from "react-router-dom";
|
|||
import { useAuth } from "../../lib/auth.tsx";
|
||||
import { SITE_VERSION } from "../../lib/version.ts";
|
||||
import { ROLE_LABELS, isSuper } from "../../lib/roles.ts";
|
||||
import { CMS_NAV, FORMS_NAV, PANEL_NAV, target } from "./adminNav.ts";
|
||||
import { CMS_NAV, FORMS_NAV, PANEL_NAV, TOOLS_NAV, target } from "./adminNav.ts";
|
||||
|
||||
/* One card. The title link is stretched over the whole card with
|
||||
`after:absolute`, which makes the card clickable without nesting
|
||||
|
|
@ -129,6 +129,12 @@ export default function AdminHome() {
|
|||
))}
|
||||
</CardBlock>
|
||||
|
||||
<CardBlock title={TOOLS_NAV.label} blurb={TOOLS_NAV.blurb}>
|
||||
{TOOLS_NAV.children.map((tool) => (
|
||||
<NavCard key={tool.to} item={tool} />
|
||||
))}
|
||||
</CardBlock>
|
||||
|
||||
{isSuper(user) && (
|
||||
<CardBlock title="Superadmin" blurb="Only superadmins see this block.">
|
||||
<NavCard item={PANEL_NAV} />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue