Move maintenance status into root sidebar
This commit is contained in:
+29
-7
@@ -1,6 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
ExternalLink,
|
ExternalLink,
|
||||||
FolderKanban,
|
FolderKanban,
|
||||||
|
Globe2,
|
||||||
ImageIcon,
|
ImageIcon,
|
||||||
LockKeyhole,
|
LockKeyhole,
|
||||||
ShieldAlert,
|
ShieldAlert,
|
||||||
@@ -59,6 +60,7 @@ const copy = {
|
|||||||
maintenance: "Wartungsmodus",
|
maintenance: "Wartungsmodus",
|
||||||
maintenanceTitle: "Wartungsmodus",
|
maintenanceTitle: "Wartungsmodus",
|
||||||
maintenanceVisitorsClosed: "Website fuer Besucher geschlossen",
|
maintenanceVisitorsClosed: "Website fuer Besucher geschlossen",
|
||||||
|
maintenanceVisitorsShort: "Besucher gesperrt",
|
||||||
maintenanceDescription:
|
maintenanceDescription:
|
||||||
"Wenn aktiv, werden alle Seiten auf die Coming Soon Seite weitergeleitet.",
|
"Wenn aktiv, werden alle Seiten auf die Coming Soon Seite weitergeleitet.",
|
||||||
maintenanceOpen: "Website fuer Besucher offen",
|
maintenanceOpen: "Website fuer Besucher offen",
|
||||||
@@ -67,6 +69,7 @@ const copy = {
|
|||||||
uiKitDescription: "Globale Referenz fuer Cards, Buttons, Inputs und Surface Levels.",
|
uiKitDescription: "Globale Referenz fuer Cards, Buttons, Inputs und Surface Levels.",
|
||||||
uiKitAction: "Zur UI Kit",
|
uiKitAction: "Zur UI Kit",
|
||||||
media: "Media",
|
media: "Media",
|
||||||
|
siteSettings: "SEO",
|
||||||
portfolio: "Portfolio",
|
portfolio: "Portfolio",
|
||||||
portfolioTitle: "Portfolio",
|
portfolioTitle: "Portfolio",
|
||||||
portfolioDescription: "Kategorien, Projekte, Abschnitte und Dateien verwalten.",
|
portfolioDescription: "Kategorien, Projekte, Abschnitte und Dateien verwalten.",
|
||||||
@@ -74,6 +77,9 @@ const copy = {
|
|||||||
mediaTitle: "Media Library",
|
mediaTitle: "Media Library",
|
||||||
mediaDescription: "Uploads, externe URLs und Verwendungsorte zentral verwalten.",
|
mediaDescription: "Uploads, externe URLs und Verwendungsorte zentral verwalten.",
|
||||||
mediaAction: "Zur Media Library",
|
mediaAction: "Zur Media Library",
|
||||||
|
siteSettingsTitle: "SEO",
|
||||||
|
siteSettingsDescription: "Favicon, Site Name, Description, Subhead und globale SEO Defaults verwalten.",
|
||||||
|
siteSettingsAction: "Zu SEO",
|
||||||
loginTitle: "Root Login",
|
loginTitle: "Root Login",
|
||||||
loginText: "Nur autorisierte Nutzer duerfen diesen Bereich verwenden.",
|
loginText: "Nur autorisierte Nutzer duerfen diesen Bereich verwenden.",
|
||||||
passwordLabel: "Passwort",
|
passwordLabel: "Passwort",
|
||||||
@@ -238,6 +244,14 @@ export default async function RootPage({ searchParams }: RootPageProps) {
|
|||||||
badgeVariant: "outline" as const,
|
badgeVariant: "outline" as const,
|
||||||
action: copy.mediaAction,
|
action: copy.mediaAction,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: copy.siteSettingsTitle,
|
||||||
|
summary: copy.siteSettingsDescription,
|
||||||
|
status: copy.authStatusOk,
|
||||||
|
href: "/root/site-settings",
|
||||||
|
badgeVariant: "outline" as const,
|
||||||
|
action: copy.siteSettingsAction,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: copy.portfolioTitle,
|
label: copy.portfolioTitle,
|
||||||
summary: `${projects.length} ${copy.totalProjects} / ${categories.length} ${copy.totalCategories}`,
|
summary: `${projects.length} ${copy.totalProjects} / ${categories.length} ${copy.totalCategories}`,
|
||||||
@@ -263,11 +277,11 @@ export default async function RootPage({ searchParams }: RootPageProps) {
|
|||||||
logoutAction={logoutAction}
|
logoutAction={logoutAction}
|
||||||
headerTitle={copy.title}
|
headerTitle={copy.title}
|
||||||
headerDescription={copy.subtitle}
|
headerDescription={copy.subtitle}
|
||||||
headerActions={
|
sidebarTopContent={
|
||||||
maintenanceEnabled ? (
|
maintenanceEnabled ? (
|
||||||
<Button asChild variant="destructive" className="hidden sm:inline-flex">
|
<p className="px-1 text-xs font-medium text-destructive">
|
||||||
<Link href="/root/maintenance">{copy.maintenanceVisitorsClosed}</Link>
|
{copy.maintenanceVisitorsShort}
|
||||||
</Button>
|
</p>
|
||||||
) : null
|
) : null
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
@@ -294,7 +308,7 @@ export default async function RootPage({ searchParams }: RootPageProps) {
|
|||||||
title={copy.totalProjects}
|
title={copy.totalProjects}
|
||||||
value={String(projects.length)}
|
value={String(projects.length)}
|
||||||
description={copy.projectCountDescription}
|
description={copy.projectCountDescription}
|
||||||
icon={FolderKanban}
|
icon={Globe2}
|
||||||
/>
|
/>
|
||||||
</MotionFade>
|
</MotionFade>
|
||||||
<MotionFade delay={0.2}>
|
<MotionFade delay={0.2}>
|
||||||
@@ -302,13 +316,21 @@ export default async function RootPage({ searchParams }: RootPageProps) {
|
|||||||
title={copy.totalCategories}
|
title={copy.totalCategories}
|
||||||
value={String(categories.length)}
|
value={String(categories.length)}
|
||||||
description={copy.categoryCountDescription}
|
description={copy.categoryCountDescription}
|
||||||
|
icon={FolderKanban}
|
||||||
|
/>
|
||||||
|
</MotionFade>
|
||||||
|
<MotionFade delay={0.25}>
|
||||||
|
<DashboardCard
|
||||||
|
title={copy.siteSettingsTitle}
|
||||||
|
value={copy.authStatusOk}
|
||||||
|
description={copy.siteSettingsDescription}
|
||||||
icon={Shapes}
|
icon={Shapes}
|
||||||
/>
|
/>
|
||||||
</MotionFade>
|
</MotionFade>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section className="grid gap-6 xl:grid-cols-[minmax(0,1.5fr)_minmax(320px,1fr)]">
|
<section className="grid gap-6 xl:grid-cols-[minmax(0,1.5fr)_minmax(320px,1fr)]">
|
||||||
<MotionFade delay={0.25}>
|
<MotionFade delay={0.3}>
|
||||||
<Card className="border-border/70 bg-card/95 shadow-sm">
|
<Card className="border-border/70 bg-card/95 shadow-sm">
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
<CardTitle>{copy.tableTitle}</CardTitle>
|
<CardTitle>{copy.tableTitle}</CardTitle>
|
||||||
@@ -349,7 +371,7 @@ export default async function RootPage({ searchParams }: RootPageProps) {
|
|||||||
</MotionFade>
|
</MotionFade>
|
||||||
|
|
||||||
<div className="grid gap-6">
|
<div className="grid gap-6">
|
||||||
<MotionFade delay={0.3}>
|
<MotionFade delay={0.35}>
|
||||||
<Card className="border-border/70 bg-card/95 shadow-sm">
|
<Card className="border-border/70 bg-card/95 shadow-sm">
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
<CardTitle>{copy.systemStatusTitle}</CardTitle>
|
<CardTitle>{copy.systemStatusTitle}</CardTitle>
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ type RootDashboardShellProps = {
|
|||||||
headerTitle: string;
|
headerTitle: string;
|
||||||
headerDescription: string;
|
headerDescription: string;
|
||||||
headerActions?: ReactNode;
|
headerActions?: ReactNode;
|
||||||
|
sidebarTopContent?: ReactNode;
|
||||||
toolbar?: ReactNode;
|
toolbar?: ReactNode;
|
||||||
children: ReactNode;
|
children: ReactNode;
|
||||||
};
|
};
|
||||||
@@ -54,6 +55,7 @@ export async function RootDashboardShell({
|
|||||||
headerTitle,
|
headerTitle,
|
||||||
headerDescription,
|
headerDescription,
|
||||||
headerActions,
|
headerActions,
|
||||||
|
sidebarTopContent,
|
||||||
toolbar,
|
toolbar,
|
||||||
children,
|
children,
|
||||||
}: RootDashboardShellProps) {
|
}: RootDashboardShellProps) {
|
||||||
@@ -91,12 +93,15 @@ export async function RootDashboardShell({
|
|||||||
items={sidebarItems}
|
items={sidebarItems}
|
||||||
sidebarIconSrc={mediaBindings.favicon?.url}
|
sidebarIconSrc={mediaBindings.favicon?.url}
|
||||||
sidebarTop={
|
sidebarTop={
|
||||||
|
<div className="space-y-2">
|
||||||
<Button asChild variant="outline" className="w-full justify-between">
|
<Button asChild variant="outline" className="w-full justify-between">
|
||||||
<Link href={getLocalizedPath("de")} target="_blank" rel="noreferrer">
|
<Link href={getLocalizedPath("de")} target="_blank" rel="noreferrer">
|
||||||
{copy.backToSite}
|
{copy.backToSite}
|
||||||
<ArrowLeft className="h-4 w-4" />
|
<ArrowLeft className="h-4 w-4" />
|
||||||
</Link>
|
</Link>
|
||||||
</Button>
|
</Button>
|
||||||
|
{sidebarTopContent}
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
sidebarFooter={
|
sidebarFooter={
|
||||||
<>
|
<>
|
||||||
|
|||||||
Reference in New Issue
Block a user