refactor: adopt shared page layout
This commit is contained in:
@@ -12,12 +12,10 @@ import {
|
|||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
DismissibleAlert,
|
|
||||||
DocumentationHelpLink,
|
DocumentationHelpLink,
|
||||||
LoadingFrame,
|
LoadingFrame,
|
||||||
MetricCard,
|
MetricCard,
|
||||||
PageScrollViewport,
|
PageLayout,
|
||||||
PageTitle,
|
|
||||||
dashboardWidgetsForModules,
|
dashboardWidgetsForModules,
|
||||||
hasAnyScope,
|
hasAnyScope,
|
||||||
hasScope,
|
hasScope,
|
||||||
@@ -443,14 +441,14 @@ export default function DashboardPage({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<PageScrollViewport className="dashboard-page">
|
<PageLayout
|
||||||
<div className="content-pad workspace-data-page">
|
className="dashboard-page"
|
||||||
<div className="page-heading split workspace-heading">
|
title="i18n:govoplan-dashboard.dashboard.3f8b4df2"
|
||||||
<div>
|
description="Personal workspace assembled from installed module widgets."
|
||||||
<PageTitle>i18n:govoplan-dashboard.dashboard.3f8b4df2</PageTitle>
|
error={error}
|
||||||
<p>Personal workspace assembled from installed module widgets.</p>
|
success={error ? "" : notice}
|
||||||
</div>
|
actions={
|
||||||
<div className="button-row compact-actions">
|
<>
|
||||||
<DocumentationHelpLink reference={DASHBOARD_DOCUMENTATION} />
|
<DocumentationHelpLink reference={DASHBOARD_DOCUMENTATION} />
|
||||||
{!configuring && (
|
{!configuring && (
|
||||||
<>
|
<>
|
||||||
@@ -489,19 +487,9 @@ export default function DashboardPage({
|
|||||||
</Button>
|
</Button>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</>
|
||||||
</div>
|
}
|
||||||
|
>
|
||||||
{error && (
|
|
||||||
<DismissibleAlert tone="danger" resetKey={error} floating>
|
|
||||||
{error}
|
|
||||||
</DismissibleAlert>
|
|
||||||
)}
|
|
||||||
{notice && !error && (
|
|
||||||
<DismissibleAlert tone="success" resetKey={notice} floating>
|
|
||||||
{notice}
|
|
||||||
</DismissibleAlert>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<div className="metric-grid dashboard-summary-grid">
|
<div className="metric-grid dashboard-summary-grid">
|
||||||
<MetricCard
|
<MetricCard
|
||||||
@@ -597,8 +585,6 @@ export default function DashboardPage({
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</LoadingFrame>
|
</LoadingFrame>
|
||||||
</div>
|
|
||||||
|
|
||||||
<WidgetConfigurationDialog
|
<WidgetConfigurationDialog
|
||||||
open={Boolean(editingPlacement && editingWidget)}
|
open={Boolean(editingPlacement && editingWidget)}
|
||||||
widget={editingWidget}
|
widget={editingWidget}
|
||||||
@@ -609,7 +595,7 @@ export default function DashboardPage({
|
|||||||
setEditingInstanceId(null);
|
setEditingInstanceId(null);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</PageScrollViewport>
|
</PageLayout>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user