Feature updates v1.7.4: media, blog, featured content, editor nav, content blocks #11
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} />
|
||||
|
|
|
|||
|
|
@ -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
|
||||
outside the CMS rather than as another tab within it. */
|
||||
export const PANEL_NAV = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue