Release govoplan-voting v0.1.21: unify interface contracts and documentation
This commit is contained in:
@@ -18,6 +18,7 @@ import { ActionBlockerHint,
|
||||
StatePanel,
|
||||
StatusBadge,
|
||||
WorkspaceActionBar,
|
||||
WorkspaceFrame,
|
||||
WorkspaceLayout,
|
||||
hasScope,
|
||||
i18nMessage,
|
||||
@@ -150,7 +151,15 @@ export default function VotingPage({ settings, auth }: PlatformRouteContext) {
|
||||
}
|
||||
|
||||
return (
|
||||
<main className="voting-page">
|
||||
<WorkspaceFrame as="main" className="voting-page" label="Ballots" interfaceId="voting.workspace" helpContextId="voting.workspace" helpModuleId="voting">
|
||||
<WorkspaceActionBar
|
||||
scope="workspace"
|
||||
variant="collection"
|
||||
refreshable
|
||||
reloadAction={{ onReload: () => void loadList().catch((reason) => setError(message(reason, "Ballots could not be loaded."))), loading: loading || busy, label: "Refresh ballots" }}
|
||||
createAction={<Button variant="primary" disabled={!canManage || busy} disabledReason={busy ? VOTING_I18N.busy : !canManage ? VOTING_I18N.manageReason : undefined} onClick={() => setEditing("new")}><Plus size={16} aria-hidden="true" />New ballot</Button>}
|
||||
helpAction={<DocumentationHelpLink reference={VOTING_DOCUMENTATION} />}
|
||||
/>
|
||||
<WorkspaceLayout
|
||||
variant="split"
|
||||
primarySize="default"
|
||||
@@ -165,15 +174,6 @@ export default function VotingPage({ settings, auth }: PlatformRouteContext) {
|
||||
helpContextId="voting.workspace"
|
||||
helpModuleId="voting"
|
||||
primary={<>
|
||||
<WorkspaceActionBar
|
||||
scope="collection-pane"
|
||||
variant="collection"
|
||||
refreshable
|
||||
reloadAction={{ onReload: () => void loadList(), loading: loading || busy, label: "Refresh ballots" }}
|
||||
className="voting-toolbar"
|
||||
createAction={<Button variant="primary" disabled={!canManage} disabledReason={!canManage ? VOTING_I18N.manageReason : undefined} onClick={() => setEditing("new")}><Plus size={16} aria-hidden="true" />New ballot</Button>}
|
||||
helpAction={<DocumentationHelpLink reference={VOTING_DOCUMENTATION} />}
|
||||
/>
|
||||
<PageScrollViewport className="voting-list-viewport">
|
||||
{loading && <LoadingIndicator label="Loading ballots" />}
|
||||
{!loading && items.length === 0 && <StatePanel size="compact" description="No ballots." />}
|
||||
@@ -317,7 +317,7 @@ export default function VotingPage({ settings, auth }: PlatformRouteContext) {
|
||||
void cast();
|
||||
}}
|
||||
/>
|
||||
</main>
|
||||
</WorkspaceFrame>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user