Adopt shared WebUI layout primitives
This commit is contained in:
@@ -11,7 +11,7 @@ import {
|
||||
type CampaignContentLibraryTarget,
|
||||
type CampaignPrintTemplate
|
||||
} from "../../api/campaigns";
|
||||
import { Button } from "@govoplan/core-webui";
|
||||
import { FormGrid, ContentGrid, Button } from "@govoplan/core-webui";
|
||||
import { Card } from "@govoplan/core-webui";
|
||||
import { Dialog } from "@govoplan/core-webui";
|
||||
import { FormField } from "@govoplan/core-webui";
|
||||
@@ -433,9 +433,9 @@ export default function TemplateDataPage({ settings, campaignId }: {settings: Ap
|
||||
|
||||
<LoadingFrame loading={loading || !draft} label="i18n:govoplan-campaign.loading_campaign_draft.1cf47e50">
|
||||
<>
|
||||
<div className="dashboard-grid template-editor-grid">
|
||||
<ContentGrid columns={2} collapseAt="workspace" className="template-editor-grid">
|
||||
<Card title="i18n:govoplan-campaign.editable_template.5e747a1e" actions={<Button onClick={() => setPreviewOpen(true)}>i18n:govoplan-campaign.preview.f1fbb2b4</Button>}>
|
||||
<div className="form-grid">
|
||||
<FormGrid columns={1} collapseAt="standard" className="">
|
||||
<FormField label="i18n:govoplan-campaign.subject.8d183dbd">
|
||||
<input
|
||||
ref={subjectRef}
|
||||
@@ -506,13 +506,13 @@ export default function TemplateDataPage({ settings, campaignId }: {settings: Ap
|
||||
<Button onClick={() => setContentLibraryOpen(true)} disabled={locked}>i18n:govoplan-campaign.load_from_library.327ada7c</Button>
|
||||
<Button onClick={openContentSaveDialog} disabled={locked}>i18n:govoplan-campaign.save_to_library.396649bf</Button>
|
||||
</div>
|
||||
</div>
|
||||
</FormGrid>
|
||||
</Card>
|
||||
|
||||
<div className="template-side-stack">
|
||||
<Card title="Printable output">
|
||||
<LoadingFrame loading={printTemplatesLoading} label="Loading printable templates">
|
||||
<div className="form-grid">
|
||||
<FormGrid columns={1} collapseAt="standard" className="">
|
||||
{printTemplatesError && <DismissibleAlert tone="danger" compact resetKey={printTemplatesError}>{printTemplatesError}</DismissibleAlert>}
|
||||
{!printTemplatesError && !printTemplatesAvailable && (
|
||||
<DismissibleAlert tone="info" compact dismissible={false}>
|
||||
@@ -565,7 +565,7 @@ export default function TemplateDataPage({ settings, campaignId }: {settings: Ap
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</FormGrid>
|
||||
</LoadingFrame>
|
||||
</Card>
|
||||
<Card title="i18n:govoplan-campaign.fields.e8b68527">
|
||||
@@ -598,7 +598,7 @@ export default function TemplateDataPage({ settings, campaignId }: {settings: Ap
|
||||
<UndefinedPlaceholderList items={undefinedPlaceholders} onSelect={setUndefinedDialog} />
|
||||
</Card>
|
||||
</div>
|
||||
</div>
|
||||
</ContentGrid>
|
||||
|
||||
</>
|
||||
</LoadingFrame>
|
||||
|
||||
Reference in New Issue
Block a user