fix: migrate certificate generation (#2251)

Generate certificates and audit logs using Konva instead of browserless.

This should:
- Reduce the changes of generations failing
- Improve sealing speed
This commit is contained in:
David Nguyen
2026-01-06 14:26:19 +11:00
committed by GitHub
parent c1217c5a58
commit c2ea5e5859
36 changed files with 2008 additions and 233 deletions
@@ -323,7 +323,7 @@ export const AddSubjectFormPartial = ({
<TooltipTrigger>
<InfoIcon className="mx-2 h-4 w-4" />
</TooltipTrigger>
<TooltipContent className="text-muted-foreground p-4">
<TooltipContent className="p-4 text-muted-foreground">
<DocumentSendEmailMessageHelper />
</TooltipContent>
</Tooltip>
@@ -331,7 +331,7 @@ export const AddSubjectFormPartial = ({
<FormControl>
<Textarea
className="bg-background mt-2 h-16 resize-none"
className="mt-2 h-16 resize-none bg-background"
{...field}
maxLength={5000}
/>
@@ -360,7 +360,7 @@ export const AddSubjectFormPartial = ({
className="rounded-lg border"
>
{document.status === DocumentStatus.DRAFT ? (
<div className="text-muted-foreground py-16 text-center text-sm">
<div className="py-16 text-center text-sm text-muted-foreground">
<p>
<Trans>We won't send anything to notify recipients.</Trans>
</p>
@@ -373,7 +373,7 @@ export const AddSubjectFormPartial = ({
</p>
</div>
) : (
<ul className="text-muted-foreground divide-y">
<ul className="divide-y text-muted-foreground">
{recipients.length === 0 && (
<li className="flex flex-col items-center justify-center py-6 text-sm">
<Trans>No recipients</Trans>
@@ -388,10 +388,10 @@ export const AddSubjectFormPartial = ({
<AvatarWithText
avatarFallback={recipient.email.slice(0, 1).toUpperCase()}
primaryText={
<p className="text-muted-foreground text-sm">{recipient.email}</p>
<p className="text-sm text-muted-foreground">{recipient.email}</p>
}
secondaryText={
<p className="text-muted-foreground/70 text-xs">
<p className="text-xs text-muted-foreground/70">
{_(RECIPIENT_ROLES_DESCRIPTION[recipient.role].roleName)}
</p>
}
@@ -24,7 +24,7 @@ export const DocumentFlowFormContainer = ({
<form
id={id}
className={cn(
'dark:bg-background border-border bg-widget sticky top-20 flex h-full max-h-[64rem] flex-col overflow-auto rounded-xl border px-4 py-6',
'sticky top-20 flex h-full max-h-[64rem] flex-col overflow-auto rounded-xl border border-border bg-widget px-4 py-6 dark:bg-background',
className,
)}
{...props}
@@ -47,11 +47,11 @@ export const DocumentFlowFormContainerHeader = ({
return (
<>
<h3 className="text-foreground text-2xl font-semibold">{_(title)}</h3>
<h3 className="text-2xl font-semibold text-foreground">{_(title)}</h3>
<p className="text-muted-foreground mt-2 text-sm">{_(description)}</p>
<p className="mt-2 text-sm text-muted-foreground">{_(description)}</p>
<hr className="border-border mb-8 mt-4" />
<hr className="mb-8 mt-4 border-border" />
</>
);
};
@@ -66,10 +66,7 @@ export const DocumentFlowFormContainerContent = ({
...props
}: DocumentFlowFormContainerContentProps) => {
return (
<div
className={cn('custom-scrollbar -mx-2 flex flex-1 flex-col px-2', className)}
{...props}
>
<div className={cn('custom-scrollbar -mx-2 flex flex-1 flex-col px-2', className)} {...props}>
<div className="flex flex-1 flex-col">{children}</div>
</div>
);
@@ -102,17 +99,17 @@ export const DocumentFlowFormContainerStep = ({
}: DocumentFlowFormContainerStepProps) => {
return (
<div>
<p className="text-muted-foreground text-sm">
<p className="text-sm text-muted-foreground">
<Trans>
Step <span>{`${step} of ${maxStep}`}</span>
</Trans>
</p>
<div className="bg-muted relative mt-4 h-[2px] rounded-md">
<div className="relative mt-4 h-[2px] rounded-md bg-muted">
<motion.div
layout="size"
layoutId="document-flow-container-step"
className="bg-primary absolute inset-y-0 left-0"
className="absolute inset-y-0 left-0 bg-primary"
style={{
width: `${(100 / maxStep) * step}%`,
}}
@@ -150,7 +147,7 @@ export const DocumentFlowFormContainerActions = ({
<div className="mt-4 flex gap-x-4">
<Button
type="button"
className="dark:bg-muted dark:hover:bg-muted/80 flex-1 bg-black/5 hover:bg-black/10"
className="flex-1 bg-black/5 hover:bg-black/10 dark:bg-muted dark:hover:bg-muted/80"
size="lg"
variant="secondary"
disabled={disabled || loading || !canGoBack || !onGoBackClick}
@@ -161,7 +158,7 @@ export const DocumentFlowFormContainerActions = ({
<Button
type="button"
className="bg-primary flex-1"
className="flex-1 bg-primary"
size="lg"
disabled={disabled || disableNextStep || loading || !canGoNext}
loading={loading}
@@ -62,7 +62,7 @@ export const FieldContent = ({ field, documentMeta }: FieldIconProps) => {
>
<div className="flex items-center">
<Checkbox className="h-3 w-3" disabled />
<Label className="text-foreground ml-1.5 text-xs font-normal opacity-50">
<Label className="ml-1.5 text-xs font-normal text-foreground opacity-50">
<Trans>Checkbox option</Trans>
</Label>
</div>
@@ -90,7 +90,7 @@ export const FieldContent = ({ field, documentMeta }: FieldIconProps) => {
{item.value && (
<Label
htmlFor={`checkbox-${index}`}
className="text-foreground ml-1.5 text-xs font-normal"
className="ml-1.5 text-xs font-normal text-foreground"
>
{item.value}
</Label>
@@ -122,7 +122,7 @@ export const FieldContent = ({ field, documentMeta }: FieldIconProps) => {
{item.value && (
<Label
htmlFor={`option-${index}`}
className="text-foreground ml-1.5 text-xs font-normal"
className="ml-1.5 text-xs font-normal text-foreground"
>
{item.value}
</Label>
@@ -140,7 +140,7 @@ export const FieldContent = ({ field, documentMeta }: FieldIconProps) => {
!field.inserted
) {
return (
<div className="text-field-card-foreground flex flex-row items-center py-0.5 text-[clamp(0.07rem,25cqw,0.825rem)] text-sm">
<div className="flex flex-row items-center py-0.5 text-[clamp(0.07rem,25cqw,0.825rem)] text-sm text-field-card-foreground">
<p>
<Trans>Select</Trans>
</p>
@@ -196,7 +196,7 @@ export const FieldContent = ({ field, documentMeta }: FieldIconProps) => {
<div className="flex h-full w-full items-center overflow-hidden">
<p
className={cn(
'text-foreground w-full whitespace-pre-wrap text-left text-[clamp(0.07rem,25cqw,0.825rem)] duration-200',
'w-full whitespace-pre-wrap text-left text-[clamp(0.07rem,25cqw,0.825rem)] text-foreground duration-200',
{
'!text-center': textAlign === 'center' || !textToDisplay,
'!text-right': textAlign === 'right',