Adopt shared WebUI layout primitives
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import { MetricGrid } from "@govoplan/core-webui";
|
||||||
import {
|
import {
|
||||||
useEffect,
|
useEffect,
|
||||||
useMemo,
|
useMemo,
|
||||||
@@ -491,7 +492,7 @@ export default function DashboardPage({
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
|
||||||
<div className="metric-grid dashboard-summary-grid">
|
<MetricGrid className="dashboard-summary-metrics">
|
||||||
<MetricCard
|
<MetricCard
|
||||||
label="Active interface modules"
|
label="Active interface modules"
|
||||||
value={modules.length}
|
value={modules.length}
|
||||||
@@ -516,7 +517,7 @@ export default function DashboardPage({
|
|||||||
tone="neutral"
|
tone="neutral"
|
||||||
detail={layoutSourceLabel(layoutSource)}
|
detail={layoutSourceLabel(layoutSource)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</MetricGrid>
|
||||||
|
|
||||||
<LoadingFrame loading={loading} label="Loading Dashboard layout">
|
<LoadingFrame loading={loading} label="Loading Dashboard layout">
|
||||||
{configuring ? (
|
{configuring ? (
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { DescriptionList } from "@govoplan/core-webui";
|
||||||
import {
|
import {
|
||||||
StatusBadge,
|
StatusBadge,
|
||||||
type DashboardWidgetConfiguration,
|
type DashboardWidgetConfiguration,
|
||||||
@@ -26,7 +27,7 @@ export default function InstalledModulesWidget({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<dl className="detail-list dashboard-compact-list">
|
<DescriptionList variant="inline" termWidth="compact">
|
||||||
{visibleModules.map((module) =>
|
{visibleModules.map((module) =>
|
||||||
<div key={module.id}>
|
<div key={module.id}>
|
||||||
<dt><StatusBadge status="success" label={module.id} /></dt>
|
<dt><StatusBadge status="success" label={module.id} /></dt>
|
||||||
@@ -36,7 +37,7 @@ export default function InstalledModulesWidget({
|
|||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</dl>
|
</DescriptionList>
|
||||||
{remaining > 0 && <p className="muted dashboard-widget-overflow">+{remaining} more active interface modules</p>}
|
{remaining > 0 && <p className="muted dashboard-widget-overflow">+{remaining} more active interface modules</p>}
|
||||||
</>);
|
</>);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
margin-top: 18px;
|
margin-top: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dashboard-summary-grid .metric-detail {
|
.dashboard-summary-metrics .metric-detail {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
@@ -47,15 +47,6 @@
|
|||||||
grid-column-end: span 4;
|
grid-column-end: span 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dashboard-compact-list.detail-list div {
|
|
||||||
grid-template-columns: minmax(92px, auto) minmax(0, 1fr);
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard-widget-metrics.metric-grid {
|
|
||||||
grid-template-columns: repeat(3, minmax(120px, 1fr));
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard-config-workspace {
|
.dashboard-config-workspace {
|
||||||
display: flex;
|
display: flex;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
@@ -338,10 +329,6 @@
|
|||||||
|
|
||||||
@media (max-width: 900px) {
|
@media (max-width: 900px) {
|
||||||
.dashboard-widget-grid,
|
.dashboard-widget-grid,
|
||||||
.dashboard-widget-metrics.metric-grid {
|
|
||||||
grid-template-columns: 1fr;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard-widget-library {
|
.dashboard-widget-library {
|
||||||
grid-template-columns: minmax(0, 1fr) 36px;
|
grid-template-columns: minmax(0, 1fr) 36px;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user