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

This commit is contained in:
enes 2025-01-20 21:24:18 +01:00
parent 99d562a3ed
commit a4310675c1
2 changed files with 7 additions and 8 deletions

View File

@ -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}
/> />
&nbsp; EXPORT (unencrypted) &nbsp; UNENCRYPTED
</MenuItem> </MenuItem>
)} )}
</Menu> </Menu>

View File

@ -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) {