fix(webui): bind template lifecycle controls to help
Module Package Release / publish-packages (push) Successful in 12s

This commit is contained in:
2026-08-24 11:36:45 +02:00
parent ee6fbc784f
commit 69416faca9
5 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project] [project]
name = "govoplan-templates" name = "govoplan-templates"
version = "0.1.20" version = "0.1.21"
description = "GovOPlaN typed template library and deterministic printable rendering." description = "GovOPlaN typed template library and deterministic printable rendering."
readme = "README.md" readme = "README.md"
requires-python = ">=3.12" requires-python = ">=3.12"
+1 -1
View File
@@ -1,3 +1,3 @@
"""GovOPlaN Templates module.""" """GovOPlaN Templates module."""
__version__ = "0.1.20" __version__ = "0.1.21"
+1 -1
View File
@@ -43,7 +43,7 @@ from govoplan_templates.backend.dsar_provider import (
MODULE_ID = "templates" MODULE_ID = "templates"
MODULE_NAME = "Templates" MODULE_NAME = "Templates"
MODULE_VERSION = "0.1.20" MODULE_VERSION = "0.1.21"
READ_SCOPE = "templates:template:read" READ_SCOPE = "templates:template:read"
WRITE_SCOPE = "templates:template:write" WRITE_SCOPE = "templates:template:write"
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@govoplan/templates-webui", "name": "@govoplan/templates-webui",
"version": "0.1.20", "version": "0.1.21",
"private": true, "private": true,
"type": "module", "type": "module",
"main": "src/index.ts", "main": "src/index.ts",
@@ -353,7 +353,7 @@ export default function TemplatesPage({ settings, auth }: Props) {
</span>} </span>}
helpAction={<DocumentationHelpLink reference={TEMPLATES_DOCUMENTATION} />} helpAction={<DocumentationHelpLink reference={TEMPLATES_DOCUMENTATION} />}
primaryActions={<> primaryActions={<>
<Button disabled={!selected || !canPublish || dirty || busy} disabledReason={busy ? TEMPLATES_I18N.busy : !selected ? TEMPLATES_I18N.noSelection : !canPublish ? TEMPLATES_I18N.publishReason : dirty ? TEMPLATES_I18N.saveBeforeAction : undefined} onClick={() => setPublishOpen(true)}><FileCheck2 size={16} /> Publish</Button> <Button helpContextId="templates.action.publish" helpModuleId="templates" disabled={!selected || !canPublish || dirty || busy} disabledReason={busy ? TEMPLATES_I18N.busy : !selected ? TEMPLATES_I18N.noSelection : !canPublish ? TEMPLATES_I18N.publishReason : dirty ? TEMPLATES_I18N.saveBeforeAction : undefined} onClick={() => setPublishOpen(true)}><FileCheck2 size={16} /> Publish</Button>
<SegmentedControl <SegmentedControl
value={view} value={view}
onChange={setView} onChange={setView}
@@ -361,7 +361,7 @@ export default function TemplatesPage({ settings, auth }: Props) {
ariaLabel="Template workspace" ariaLabel="Template workspace"
/> />
</>} </>}
destructiveActions={<IconButton label="Delete template" icon={<Trash2 size={17} />} variant="danger" disabled={!selected || readOnly} disabledReason={!selected ? TEMPLATES_I18N.noSelection : readOnly ? (canWrite ? TEMPLATES_I18N.readOnlyReason : TEMPLATES_I18N.writeReason) : undefined} onClick={() => setDeleteOpen(true)} />} destructiveActions={<IconButton label="Delete template" helpContextId="templates.action.delete" helpModuleId="templates" icon={<Trash2 size={17} />} variant="danger" disabled={!selected || readOnly} disabledReason={!selected ? TEMPLATES_I18N.noSelection : readOnly ? (canWrite ? TEMPLATES_I18N.readOnlyReason : TEMPLATES_I18N.writeReason) : undefined} onClick={() => setDeleteOpen(true)} />}
discardAction={{ label: "Discard and reload", onClick: () => requestDiscard(() => void reload(selectedId)), disabled: !selected }} discardAction={{ label: "Discard and reload", onClick: () => requestDiscard(() => void reload(selectedId)), disabled: !selected }}
saveAction={{ saveAction={{
label: <><Save size={16} /> Save revision</>, label: <><Save size={16} /> Save revision</>,