refactor(offline): update strings, create offline navigate to sign/verify w/o auto download
All checks were successful
Open PR on Staging / audit_and_check (pull_request) Successful in 39s
All checks were successful
Open PR on Staging / audit_and_check (pull_request) Successful in 39s
This commit is contained in:
parent
99d562a3ed
commit
a4310675c1
@ -69,7 +69,7 @@ const FileList = ({
|
|||||||
color={'var(--mui-palette-primary-main)'}
|
color={'var(--mui-palette-primary-main)'}
|
||||||
icon={faLock}
|
icon={faLock}
|
||||||
/>
|
/>
|
||||||
EXPORT (encrypted)
|
ENCRYPTED
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
)}
|
)}
|
||||||
{typeof handleExport === 'function' && (
|
{typeof handleExport === 'function' && (
|
||||||
@ -83,7 +83,7 @@ const FileList = ({
|
|||||||
color={'var(--mui-palette-primary-main)'}
|
color={'var(--mui-palette-primary-main)'}
|
||||||
icon={faTriangleExclamation}
|
icon={faTriangleExclamation}
|
||||||
/>
|
/>
|
||||||
EXPORT (unencrypted)
|
UNENCRYPTED
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
)}
|
)}
|
||||||
</Menu>
|
</Menu>
|
||||||
|
@ -8,7 +8,6 @@ import {
|
|||||||
Tooltip
|
Tooltip
|
||||||
} from '@mui/material'
|
} from '@mui/material'
|
||||||
import type { Identifier, XYCoord } from 'dnd-core'
|
import type { Identifier, XYCoord } from 'dnd-core'
|
||||||
import saveAs from 'file-saver'
|
|
||||||
import JSZip from 'jszip'
|
import JSZip from 'jszip'
|
||||||
import { useCallback, useEffect, useRef, useState } from 'react'
|
import { useCallback, useEffect, useRef, useState } from 'react'
|
||||||
import { DndProvider, useDrag, useDrop } from 'react-dnd'
|
import { DndProvider, useDrag, useDrop } from 'react-dnd'
|
||||||
@ -928,7 +927,6 @@ export const CreatePage = () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const isFirstSigner = signers[0].pubkey === usersPubkey
|
const isFirstSigner = signers[0].pubkey === usersPubkey
|
||||||
|
|
||||||
if (isFirstSigner) {
|
if (isFirstSigner) {
|
||||||
navigate(appPrivateRoutes.sign, { state: { meta } })
|
navigate(appPrivateRoutes.sign, { state: { meta } })
|
||||||
} else {
|
} else {
|
||||||
@ -1001,15 +999,16 @@ export const CreatePage = () => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
saveAs(finalZipFile, `request-${unixNow()}.sigit.zip`)
|
|
||||||
|
|
||||||
// If user is the next signer, we can navigate directly to sign page
|
// If user is the next signer, we can navigate directly to sign page
|
||||||
if (signers[0].pubkey === usersPubkey) {
|
const isFirstSigner = signers[0].pubkey === usersPubkey
|
||||||
|
if (isFirstSigner) {
|
||||||
navigate(appPrivateRoutes.sign, {
|
navigate(appPrivateRoutes.sign, {
|
||||||
state: { arrayBuffer }
|
state: { arrayBuffer }
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
navigate(appPrivateRoutes.homePage)
|
navigate(appPublicRoutes.verify, {
|
||||||
|
state: { uploadedZip: arrayBuffer }
|
||||||
|
})
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error instanceof Error) {
|
if (error instanceof Error) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user