feat: verify and sign screen include list of file servers where a SIGIT is uploaded

This commit is contained in:
Stixx 2025-01-06 12:29:30 +01:00
parent 67d33e1aff
commit 41ce2f4aff

View File

@ -19,6 +19,7 @@ import {
faCheck, faCheck,
faClock, faClock,
faEye, faEye,
faServer,
faFile, faFile,
faFileCircleExclamation faFileCircleExclamation
} from '@fortawesome/free-solid-svg-icons' } from '@fortawesome/free-solid-svg-icons'
@ -40,6 +41,7 @@ export const UsersDetails = ({ meta }: UsersDetailsProps) => {
signers, signers,
viewers, viewers,
fileHashes, fileHashes,
zipUrls,
signersStatus, signersStatus,
createdAt, createdAt,
completedAt, completedAt,
@ -100,6 +102,18 @@ export const UsersDetails = ({ meta }: UsersDetailsProps) => {
return false return false
} }
/**
* Used to parse the base URL from Blossom server full path
*/
const getBaseUrl = (url: string): string => {
try {
const parsedUrl = new URL(url)
return `${parsedUrl.protocol}//${parsedUrl.host}`
} catch (error) {
return 'Invalid URL'
}
}
return submittedBy ? ( return submittedBy ? (
<div className={styles.container}> <div className={styles.container}>
<div className={styles.section}> <div className={styles.section}>
@ -270,6 +284,19 @@ export const UsersDetails = ({ meta }: UsersDetailsProps) => {
<FontAwesomeIcon icon={faFileCircleExclamation} /> &mdash; <FontAwesomeIcon icon={faFileCircleExclamation} /> &mdash;
</> </>
)} )}
<span className={styles.detailsItem}>
<FontAwesomeIcon icon={faEye} /> {signedStatus}
</span>
</div>
<div className={styles.section}>
<p>File Servers</p>
{zipUrls.map((url) => (
<span className={styles.detailsItem} key={url}>
<FontAwesomeIcon icon={faServer} /> {getBaseUrl(url)}
</span>
))}
</div> </div>
</div> </div>
) : undefined ) : undefined