Feature updates v1.7.4: media, blog, featured content, editor nav, content blocks #11

Merged
ngu-git-admin merged 22 commits from feature/new-features into main 2026-09-27 23:37:03 +01:00
2 changed files with 24 additions and 3 deletions
Showing only changes of commit 99c3a87c87 - Show all commits

View file

@ -9,8 +9,8 @@
reads, so a new entity shows up here the moment it's registered. reads, so a new entity shows up here the moment it's registered.
Forms sit in their own block below: they're submissions coming Forms sit in their own block below: they're submissions coming
in rather than content going out, and there'll be more of them in rather than content going out, and there'll be more of them
than the feedback queue eventually. The Panel block below that than the feedback queue eventually. Tools come next, and the
only exists for superadmins. Panel block below that only exists for superadmins.
The right-hand panel is deliberately inert. Nothing here The right-hand panel is deliberately inert. Nothing here
fetches, so the landing page can't be slow or half-broken on 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 { useAuth } from "../../lib/auth.tsx";
import { SITE_VERSION } from "../../lib/version.ts"; import { SITE_VERSION } from "../../lib/version.ts";
import { ROLE_LABELS, isSuper } from "../../lib/roles.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 /* One card. The title link is stretched over the whole card with
`after:absolute`, which makes the card clickable without nesting `after:absolute`, which makes the card clickable without nesting
@ -129,6 +129,12 @@ export default function AdminHome() {
))} ))}
</CardBlock> </CardBlock>
<CardBlock title={TOOLS_NAV.label} blurb={TOOLS_NAV.blurb}>
{TOOLS_NAV.children.map((tool) => (
<NavCard key={tool.to} item={tool} />
))}
</CardBlock>
{isSuper(user) && ( {isSuper(user) && (
<CardBlock title="Superadmin" blurb="Only superadmins see this block."> <CardBlock title="Superadmin" blurb="Only superadmins see this block.">
<NavCard item={PANEL_NAV} /> <NavCard item={PANEL_NAV} />

View file

@ -89,6 +89,21 @@ export const FORMS_NAV = {
], ],
}; };
/* Tools are pages that make something rather than edit a record.
They live on the public site, so they're on the home page only:
a header tab would leave the admin area. */
export const TOOLS_NAV = {
label: "Tools",
blurb: "Handy pages for making things.",
children: [
{
to: "/qr",
label: "QR code generator",
blurb: "Codes for flyers, slides and signs, pointing at any page on the site.",
},
],
};
/* Accounts and server state, not content, which is why it sits /* Accounts and server state, not content, which is why it sits
outside the CMS rather than as another tab within it. */ outside the CMS rather than as another tab within it. */
export const PANEL_NAV = { export const PANEL_NAV = {