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