Adopt shared WebUI layout primitives
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import { Archive, ArrowLeft, BadgeCheck, ExternalLink, RefreshCw, Save, Send, Trash2 } from "lucide-react";
|
import { Archive, ArrowLeft, BadgeCheck, ExternalLink, RefreshCw, Save, Send, Trash2 } from "lucide-react";
|
||||||
import { useCallback, useEffect, useMemo, useState } from "react";
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
||||||
import { useParams } from "react-router";
|
import { useParams } from "react-router";
|
||||||
import {
|
import { ActionToolbar,
|
||||||
ActionBlockerHint,
|
ActionBlockerHint,
|
||||||
Button,
|
Button,
|
||||||
ConfirmDialog,
|
ConfirmDialog,
|
||||||
@@ -311,7 +311,7 @@ export default function FormInstancePage({ settings, auth }: PlatformRouteContex
|
|||||||
return (
|
return (
|
||||||
<main className="forms-runtime-page">
|
<main className="forms-runtime-page">
|
||||||
<div className="form-instance-shell">
|
<div className="form-instance-shell">
|
||||||
<div className="form-instance-toolbar">
|
<ActionToolbar className="form-instance-toolbar">
|
||||||
<Button onClick={() => navigate("/forms-runtime")}>
|
<Button onClick={() => navigate("/forms-runtime")}>
|
||||||
<ArrowLeft size={16} aria-hidden="true" />
|
<ArrowLeft size={16} aria-hidden="true" />
|
||||||
Forms
|
Forms
|
||||||
@@ -325,7 +325,7 @@ export default function FormInstancePage({ settings, auth }: PlatformRouteContex
|
|||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
<DocumentationHelpLink reference={FORMS_RUNTIME_DOCUMENTATION} />
|
<DocumentationHelpLink reference={FORMS_RUNTIME_DOCUMENTATION} />
|
||||||
</div>
|
</ActionToolbar>
|
||||||
<PageScrollViewport className="form-instance-viewport">
|
<PageScrollViewport className="form-instance-viewport">
|
||||||
{error &&
|
{error &&
|
||||||
<DismissibleAlert tone="danger" resetKey={error}>
|
<DismissibleAlert tone="danger" resetKey={error}>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Link2, RefreshCw } from "lucide-react";
|
import { Link2, RefreshCw } from "lucide-react";
|
||||||
import { useCallback, useEffect, useState } from "react";
|
import { useCallback, useEffect, useState } from "react";
|
||||||
import {
|
import { ActionToolbar,
|
||||||
Button,
|
Button,
|
||||||
DocumentationHelpLink,
|
DocumentationHelpLink,
|
||||||
DismissibleAlert,
|
DismissibleAlert,
|
||||||
@@ -58,7 +58,7 @@ export default function FormsRuntimePage({ settings, auth }: PlatformRouteContex
|
|||||||
return (
|
return (
|
||||||
<main className="forms-runtime-page">
|
<main className="forms-runtime-page">
|
||||||
<div className="forms-runtime-shell">
|
<div className="forms-runtime-shell">
|
||||||
<div className="forms-runtime-toolbar">
|
<ActionToolbar className="forms-runtime-toolbar">
|
||||||
<Button onClick={() => void load()} disabled={loading} disabledReason={loading ? FORMS_RUNTIME_I18N.loading : undefined}>
|
<Button onClick={() => void load()} disabled={loading} disabledReason={loading ? FORMS_RUNTIME_I18N.loading : undefined}>
|
||||||
<RefreshCw size={16} aria-hidden="true" />
|
<RefreshCw size={16} aria-hidden="true" />
|
||||||
Refresh
|
Refresh
|
||||||
@@ -85,7 +85,7 @@ export default function FormsRuntimePage({ settings, auth }: PlatformRouteContex
|
|||||||
</label>
|
</label>
|
||||||
<span className="forms-runtime-count">{i18nMessage("i18n:govoplan-forms-runtime.form_count", { total })}</span>
|
<span className="forms-runtime-count">{i18nMessage("i18n:govoplan-forms-runtime.form_count", { total })}</span>
|
||||||
<DocumentationHelpLink reference={FORMS_RUNTIME_DOCUMENTATION} />
|
<DocumentationHelpLink reference={FORMS_RUNTIME_DOCUMENTATION} />
|
||||||
</div>
|
</ActionToolbar>
|
||||||
<PageScrollViewport className="forms-runtime-list-viewport">
|
<PageScrollViewport className="forms-runtime-list-viewport">
|
||||||
{error &&
|
{error &&
|
||||||
<DismissibleAlert tone="danger" resetKey={error}>
|
<DismissibleAlert tone="danger" resetKey={error}>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Copy, Link, Plus, Send } from "lucide-react";
|
import { Copy, Link, Plus, Send } from "lucide-react";
|
||||||
import { useCallback, useEffect, useMemo, useState } from "react";
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
||||||
import {
|
import { FormGrid,
|
||||||
Button,
|
Button,
|
||||||
Dialog,
|
Dialog,
|
||||||
DismissibleAlert,
|
DismissibleAlert,
|
||||||
@@ -152,7 +152,7 @@ export default function IntakeProfilesDialog({ open, settings, onClose }: Intake
|
|||||||
<>
|
<>
|
||||||
<section className="form-intake-create">
|
<section className="form-intake-create">
|
||||||
<h3>Add intake profile</h3>
|
<h3>Add intake profile</h3>
|
||||||
<div className="form-intake-create-grid">
|
<FormGrid columns={3} gap="small" collapseAt="workspace" className="form-intake-create-grid">
|
||||||
<label>
|
<label>
|
||||||
<span>Published Form</span>
|
<span>Published Form</span>
|
||||||
<select value={definitionId} onChange={(event) => setDefinitionId(event.target.value)} disabled={Boolean(busyKey)}>
|
<select value={definitionId} onChange={(event) => setDefinitionId(event.target.value)} disabled={Boolean(busyKey)}>
|
||||||
@@ -190,7 +190,7 @@ export default function IntakeProfilesDialog({ open, settings, onClose }: Intake
|
|||||||
<Plus size={16} aria-hidden="true" />
|
<Plus size={16} aria-hidden="true" />
|
||||||
Add profile
|
Add profile
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</FormGrid>
|
||||||
</section>
|
</section>
|
||||||
<section className="form-intake-profiles">
|
<section className="form-intake-profiles">
|
||||||
<h3>Configured profiles</h3>
|
<h3>Configured profiles</h3>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Save, Send, Trash2 } from "lucide-react";
|
import { Save, Send, Trash2 } from "lucide-react";
|
||||||
import { useEffect, useMemo, useState } from "react";
|
import { useEffect, useMemo, useState } from "react";
|
||||||
import { useParams } from "react-router";
|
import { useParams } from "react-router";
|
||||||
import {
|
import { ActionToolbar,
|
||||||
ActionBlockerHint,
|
ActionBlockerHint,
|
||||||
Button,
|
Button,
|
||||||
ConfirmDialog,
|
ConfirmDialog,
|
||||||
@@ -215,10 +215,10 @@ export default function PublicFormPage({ settings }: PlatformRouteContext) {
|
|||||||
return (
|
return (
|
||||||
<main className="forms-runtime-page forms-public-page">
|
<main className="forms-runtime-page forms-public-page">
|
||||||
<div className="form-instance-shell">
|
<div className="form-instance-shell">
|
||||||
<div className="form-instance-toolbar">
|
<ActionToolbar className="form-instance-toolbar">
|
||||||
<strong>{localized.title || "Form"}</strong>
|
<strong>{localized.title || "Form"}</strong>
|
||||||
{instance && <StatusBadge status={editable ? "active" : "inactive"} label={stateLabel(instance.status)} />}
|
{instance && <StatusBadge status={editable ? "active" : "inactive"} label={stateLabel(instance.status)} />}
|
||||||
</div>
|
</ActionToolbar>
|
||||||
<PageScrollViewport className="form-instance-viewport">
|
<PageScrollViewport className="form-instance-viewport">
|
||||||
{error && <DismissibleAlert tone="danger" resetKey={error}>{error}</DismissibleAlert>}
|
{error && <DismissibleAlert tone="danger" resetKey={error}>{error}</DismissibleAlert>}
|
||||||
{loading && <LoadingIndicator label="Loading Form" />}
|
{loading && <LoadingIndicator label="Loading Form" />}
|
||||||
|
|||||||
@@ -351,10 +351,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.form-intake-create-grid {
|
.form-intake-create-grid {
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
||||||
align-items: end;
|
align-items: end;
|
||||||
gap: 12px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-intake-create-grid label {
|
.form-intake-create-grid label {
|
||||||
@@ -580,7 +577,6 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-intake-create-grid,
|
|
||||||
.form-intake-profile-row {
|
.form-intake-profile-row {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user