From 4209cabfe1beeee9df738c5056ad0289bc813eda Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Sun, 9 Feb 2025 20:50:14 -0600 Subject: [PATCH] Stub out admin info page --- src/admin/AdminNavClient.tsx | 22 ++++++++++++++++++++++ src/app/admin/info/page.tsx | 3 +++ src/site/paths.ts | 4 ++++ 3 files changed, 29 insertions(+) create mode 100644 src/app/admin/info/page.tsx diff --git a/src/admin/AdminNavClient.tsx b/src/admin/AdminNavClient.tsx index 723afcc9..2a20a336 100644 --- a/src/admin/AdminNavClient.tsx +++ b/src/admin/AdminNavClient.tsx @@ -7,8 +7,10 @@ import SiteGrid from '@/components/SiteGrid'; import Spinner from '@/components/Spinner'; import { PATH_ADMIN_CONFIGURATION, + PATH_ADMIN_INFO, checkPathPrefix, isPathAdminConfiguration, + isPathAdminInfo, isPathTopLevelAdmin, } from '@/site/paths'; import { useAppState } from '@/state/AppState'; @@ -18,6 +20,7 @@ import { usePathname } from 'next/navigation'; import { useEffect, useMemo, useState } from 'react'; import { BiCog } from 'react-icons/bi'; import { FaRegClock } from 'react-icons/fa'; +import { TbInfoSquareRounded } from 'react-icons/tb'; // Updates considered recent if they occurred in past 5 minutes const areTimesRecent = (dates: Date[]) => dates @@ -86,6 +89,25 @@ export default function AdminNavClient({ ({count})} )} + + } + > + + + + Admin Info; +} diff --git a/src/site/paths.ts b/src/site/paths.ts index 8556b115..1b1e1748 100644 --- a/src/site/paths.ts +++ b/src/site/paths.ts @@ -39,6 +39,7 @@ export const PATH_ADMIN_OUTDATED = `${PATH_ADMIN}/outdated`; export const PATH_ADMIN_UPLOADS = `${PATH_ADMIN}/uploads`; export const PATH_ADMIN_TAGS = `${PATH_ADMIN}/tags`; export const PATH_ADMIN_CONFIGURATION = `${PATH_ADMIN}/configuration`; +export const PATH_ADMIN_INFO = `${PATH_ADMIN}/info`; export const PATH_ADMIN_BASELINE = `${PATH_ADMIN}/baseline`; // Debug paths @@ -213,6 +214,9 @@ export const isPathTopLevelAdmin = (pathname?: string) => export const isPathAdminConfiguration = (pathname?: string) => checkPathPrefix(pathname, PATH_ADMIN_CONFIGURATION); +export const isPathAdminInfo = (pathname?: string) => + checkPathPrefix(pathname, PATH_ADMIN_INFO); + export const isPathProtected = (pathname?: string) => checkPathPrefix(pathname, PATH_ADMIN) || checkPathPrefix(pathname, pathForTag(TAG_HIDDEN)) ||