feat: add multi-page support, improve template creation logic, and refine rank resolution in certificate designer

This commit is contained in:
estifanos
2026-09-02 10:43:26 +00:00
parent 92f2f16b80
commit 984dec0d6d
11 changed files with 224 additions and 48 deletions

View File

@@ -135,6 +135,21 @@ export function BlockPropertiesPanel({
/>
</Group>
<NumberInput
label={t('designer.blockPage', 'Page')}
description={t('designer.blockPageHint', 'Which sheet of the document this block prints on')}
value={(block.page ?? 0) + 1}
onChange={(value) => {
const index = Math.max(0, Math.min(63, Math.floor(Number(value) || 1) - 1));
// Omitted on the first page so a single-page design stays as it was.
const { page: _page, ...rest } = block;
onChange(index > 0 ? { ...rest, page: index } : rest);
}}
min={1}
max={64}
disabled={disabled}
/>
<Group gap="xs" grow>
<NumberInput
label={t('designer.blockX', 'X (%)')}