feat: centralize shared page layouts

This commit is contained in:
2026-08-18 01:03:33 +02:00
parent d307e29145
commit 934db6d44b
11 changed files with 261 additions and 41 deletions
+7 -13
View File
@@ -1,22 +1,17 @@
import Card from "../../components/Card";
import MetricCard from "../../components/MetricCard";
import PageScrollViewport from "../../components/PageScrollViewport";
import PageTitle from "../../components/PageTitle";
import PageLayout from "../../components/PageLayout";
import { usePlatformModules } from "../../platform/ModuleContext";
export default function DashboardPage() {
const modules = usePlatformModules();
return (
<PageScrollViewport className="core-dashboard-page">
<div className="content-pad workspace-data-page">
<div className="page-heading split workspace-heading">
<div>
<PageTitle>i18n:govoplan-core.dashboard.d87f47b4</PageTitle>
<p>Install and enable the dashboard module to make this page configurable.</p>
</div>
</div>
<PageLayout
title="i18n:govoplan-core.dashboard.d87f47b4"
description="Install and enable the dashboard module to make this page configurable."
viewportClassName="core-dashboard-page"
>
<div className="metric-grid">
<MetricCard label="i18n:govoplan-core.installed_modules.32b3e799" value={modules.length} tone="info" detail={modules.length ? moduleLabels(modules).join(", ") : "i18n:govoplan-core.core_only.d46ce7d9"} />
<MetricCard label="Dashboard module" value="not installed" tone="neutral" detail="Core fallback is active." />
@@ -39,8 +34,7 @@ export default function DashboardPage() {
<p className="muted">This minimal core home is only shown while no dashboard WebUI module is available. Feature modules own their pages and can expose dashboard widgets once the dashboard module is installed.</p>
</Card>
</div>
</div>
</PageScrollViewport>);
</PageLayout>);
}