From 3c230e6fb4b5971669a6df8e4eeb1f9f78339873 Mon Sep 17 00:00:00 2001 From: enes Date: Wed, 21 Aug 2024 11:21:26 +0200 Subject: [PATCH 1/7] fix: optional label for download button in filelist --- src/components/FileList/index.tsx | 6 ++++-- src/pages/verify/index.tsx | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/FileList/index.tsx b/src/components/FileList/index.tsx index 7cd30eb..ada596b 100644 --- a/src/components/FileList/index.tsx +++ b/src/components/FileList/index.tsx @@ -9,13 +9,15 @@ interface FileListProps { currentFile: CurrentUserFile setCurrentFile: (file: CurrentUserFile) => void handleDownload: () => void + downloadLabel?: string } const FileList = ({ files, currentFile, setCurrentFile, - handleDownload + handleDownload, + downloadLabel }: FileListProps) => { const isActive = (file: CurrentUserFile) => file.id === currentFile.id return ( @@ -41,7 +43,7 @@ const FileList = ({ ) diff --git a/src/pages/verify/index.tsx b/src/pages/verify/index.tsx index ceba0eb..46c9f48 100644 --- a/src/pages/verify/index.tsx +++ b/src/pages/verify/index.tsx @@ -538,6 +538,7 @@ export const VerifyPage = () => { currentFile={currentFile} setCurrentFile={setCurrentFile} handleDownload={handleExport} + downloadLabel="Download Sigit" /> )} {displayExportedBy()} -- 2.34.1 From e7b0bbe23c71421d9725b242cb62ed11e40ffdad Mon Sep 17 00:00:00 2001 From: enes Date: Wed, 21 Aug 2024 11:21:57 +0200 Subject: [PATCH 2/7] fix: update user placeholder for create --- src/pages/create/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/create/index.tsx b/src/pages/create/index.tsx index ee34646..c2c66f5 100644 --- a/src/pages/create/index.tsx +++ b/src/pages/create/index.tsx @@ -930,7 +930,7 @@ export const CreatePage = () => {
setUserInput(e.target.value)} onKeyDown={handleInputKeyDown} -- 2.34.1 From 8c974768a81db75a0bd94e20db6a495126207f5b Mon Sep 17 00:00:00 2001 From: enes Date: Wed, 21 Aug 2024 11:25:35 +0200 Subject: [PATCH 3/7] fix: sign buttons styles Fix issue caused by styles change from 6f88f22933ddd6bf787c69d0dcaf12032d5ea4f9 --- .../MarkFormField/style.module.scss | 122 +++++++++--------- 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/src/components/MarkFormField/style.module.scss b/src/components/MarkFormField/style.module.scss index ef80df0..1275038 100644 --- a/src/components/MarkFormField/style.module.scss +++ b/src/components/MarkFormField/style.module.scss @@ -41,6 +41,67 @@ background: #447592; color: white; } + + .actionButtons { + display: flex; + flex-direction: row; + grid-gap: 5px; + } + + .actionsBottom { + display: flex; + flex-direction: row; + grid-gap: 5px; + justify-content: center; + align-items: center; + } + + .submitButton { + width: 100%; + max-width: 300px; + margin-top: 10px; + } + + .paginationButton { + font-size: 12px; + padding: 5px 10px; + border-radius: 3px; + background: rgba(0, 0, 0, 0.1); + color: rgba(0, 0, 0, 0.5); + } + + .paginationButton:hover { + background: #447592; + color: rgba(255, 255, 255, 0.5); + } + + .paginationButtonDone { + background: #5e8eab; + color: rgb(255, 255, 255); + } + + .paginationButtonCurrent { + height: 2px; + width: 100%; + background: #4c82a3; + } + + .trigger { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + position: relative; + } + + .triggerBtn { + background: white; + color: #434343; + padding: 5px 30px; + box-shadow: 0px -3px 4px 0 rgb(0, 0, 0, 0.1); + position: absolute; + top: -25px; + } } .actions { @@ -92,12 +153,6 @@ position: relative; } -.actionButtons { - display: flex; - flex-direction: row; - grid-gap: 5px; -} - .inputWrapper { display: flex; flex-direction: column; @@ -132,20 +187,6 @@ linear-gradient(white, white); } -.actionsBottom { - display: flex; - flex-direction: row; - grid-gap: 5px; - justify-content: center; - align-items: center; -} - -.submitButton { - width: 100%; - max-width: 300px; - margin-top: 10px; -} - .footerContainer { display: flex; flex-direction: row; @@ -167,44 +208,3 @@ flex-direction: column; grid-gap: 5px; } - -.paginationButton { - font-size: 12px; - padding: 5px 10px; - border-radius: 3px; - background: rgba(0, 0, 0, 0.1); - color: rgba(0, 0, 0, 0.5); -} - -.paginationButton:hover { - background: #447592; - color: rgba(255, 255, 255, 0.5); -} - -.paginationButtonDone { - background: #5e8eab; - color: rgb(255, 255, 255); -} - -.paginationButtonCurrent { - height: 2px; - width: 100%; - background: #4c82a3; -} - -.trigger { - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - position: relative; -} - -.triggerBtn { - background: white; - color: #434343; - padding: 5px 30px; - box-shadow: 0px -3px 4px 0 rgb(0, 0, 0, 0.1); - position: absolute; - top: -25px; -} -- 2.34.1 From 58f70db7f61a8a963289831d25b7ea877798a593 Mon Sep 17 00:00:00 2001 From: enes Date: Wed, 21 Aug 2024 11:26:17 +0200 Subject: [PATCH 4/7] fix(verify-page): map item keys --- src/pages/verify/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/verify/index.tsx b/src/pages/verify/index.tsx index 46c9f48..c67c2fc 100644 --- a/src/pages/verify/index.tsx +++ b/src/pages/verify/index.tsx @@ -48,6 +48,7 @@ import { TooltipChild } from '../../components/TooltipChild.tsx' import FileList from '../../components/FileList' import { CurrentUserFile } from '../../types/file.ts' import { Mark } from '../../types/mark.ts' +import React from 'react' interface PdfViewProps { files: CurrentUserFile[] @@ -78,11 +79,10 @@ const SlimPdfView = ({ const signatureEvents = Object.keys(parsedSignatureEvents) if (!hash) return return ( - <> +
(pdfRefs.current[id] = el)} - key={filename} className={styles.fileWrapper} > {pdfFile.pages.map((page, i) => { @@ -132,7 +132,7 @@ const SlimPdfView = ({ File Separator )} - + ) })}
-- 2.34.1 From 329fd3d27beeb4ae08558887b731b9657de90237 Mon Sep 17 00:00:00 2001 From: enes Date: Wed, 21 Aug 2024 11:30:20 +0200 Subject: [PATCH 5/7] fix: useSigitProfile dep Remove unecessary dep and disable lint line --- src/hooks/useSigitProfiles.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hooks/useSigitProfiles.tsx b/src/hooks/useSigitProfiles.tsx index 8178dd7..88d6c50 100644 --- a/src/hooks/useSigitProfiles.tsx +++ b/src/hooks/useSigitProfiles.tsx @@ -64,7 +64,8 @@ export const useSigitProfiles = ( }) } } - }, [pubkeys, profileMetadata]) + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [pubkeys]) return profileMetadata } -- 2.34.1 From 7b33e37ca55496589d81ea62a638837cd787fb71 Mon Sep 17 00:00:00 2001 From: enes Date: Wed, 21 Aug 2024 11:37:07 +0200 Subject: [PATCH 6/7] refactor(toolbox): make Text default --- src/pages/create/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/create/index.tsx b/src/pages/create/index.tsx index c2c66f5..8a73012 100644 --- a/src/pages/create/index.tsx +++ b/src/pages/create/index.tsx @@ -133,7 +133,7 @@ export const CreatePage = () => { identifier: MarkType.TEXT, icon: , label: 'Text', - active: false + active: true }, { identifier: MarkType.SIGNATURE, @@ -151,7 +151,7 @@ export const CreatePage = () => { identifier: MarkType.FULLNAME, icon: , label: 'Full Name', - active: true + active: false }, { identifier: MarkType.INITIALS, -- 2.34.1 From 15d4d0a75276ec20394d2ef5e68e737c8f412cee Mon Sep 17 00:00:00 2001 From: enes Date: Wed, 21 Aug 2024 13:11:56 +0200 Subject: [PATCH 7/7] fix: review suggestion --- src/components/FileList/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/FileList/index.tsx b/src/components/FileList/index.tsx index ada596b..53557a5 100644 --- a/src/components/FileList/index.tsx +++ b/src/components/FileList/index.tsx @@ -43,7 +43,7 @@ const FileList = ({
) -- 2.34.1