From 40273ddd6fadc9c1c9754d4adcc69a2a898dad79 Mon Sep 17 00:00:00 2001 From: Bryan Frimin Date: Fri, 20 Feb 2026 12:28:38 +0100 Subject: [PATCH] Style Signed-off-by: Bryan Frimin --- .../_components/ElectronicSignatureSection.tsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/apps/console/src/pages/organizations/compliance-page/access/_components/ElectronicSignatureSection.tsx b/apps/console/src/pages/organizations/compliance-page/access/_components/ElectronicSignatureSection.tsx index b050cc153..eadcd4d1a 100644 --- a/apps/console/src/pages/organizations/compliance-page/access/_components/ElectronicSignatureSection.tsx +++ b/apps/console/src/pages/organizations/compliance-page/access/_components/ElectronicSignatureSection.tsx @@ -22,6 +22,16 @@ const fragment = graphql` } `; +function getFilenameFromUrl(url: string): string | null { + try { + const disposition = new URL(url).searchParams.get("response-content-disposition"); + const match = disposition?.match(/filename="([^"]+)"/); + return match ? decodeURIComponent(match[1]) : null; + } catch { + return null; + } +} + export function ElectronicSignatureSection({ fragmentRef, }: { @@ -55,9 +65,10 @@ export function ElectronicSignatureSection({ href={signature.certificateFileUrl} target="_blank" rel="noopener noreferrer" - className="text-sm text-txt-accent hover:underline" + className="text-sm text-txt-primary hover:underline" + download > - {__("Download")} + {getFilenameFromUrl(signature.certificateFileUrl) ?? __("Download")} )}