chore: style fix
All checks were successful
Release / build_and_release (push) Successful in 1m6s

This commit is contained in:
SwiftHawk 2024-05-15 11:19:28 +05:00
parent f65ef0e5b2
commit 8e1f445da6
2 changed files with 28 additions and 37 deletions

View File

@ -62,7 +62,6 @@ export const VerifyPage = () => {
const [isLoading, setIsLoading] = useState(true) const [isLoading, setIsLoading] = useState(true)
const [loadingSpinnerDesc, setLoadingSpinnerDesc] = useState('') const [loadingSpinnerDesc, setLoadingSpinnerDesc] = useState('')
const [isDraggingOver, setIsDraggingOver] = useState(false)
const [meta, setMeta] = useState<Meta | null>(null) const [meta, setMeta] = useState<Meta | null>(null)
const [signedStatus, setSignedStatus] = useState<SignedStatus>() const [signedStatus, setSignedStatus] = useState<SignedStatus>()
@ -214,18 +213,6 @@ export const VerifyPage = () => {
handleDecryptedArrayBuffer(arrayBuffer) handleDecryptedArrayBuffer(arrayBuffer)
} }
const handleDrop = (event: React.DragEvent<HTMLDivElement>) => {
event.preventDefault()
setIsDraggingOver(false)
const file = event.dataTransfer.files[0]
if (file.type === 'application/zip') setSelectedFile(file)
}
const handleDragOver = (event: React.DragEvent<HTMLDivElement>) => {
event.preventDefault()
setIsDraggingOver(true)
}
const handleSign = async () => { const handleSign = async () => {
if (!zip || !meta) return if (!zip || !meta) return
@ -486,18 +473,9 @@ export const VerifyPage = () => {
Select sigit file Select sigit file
</Typography> </Typography>
<Box <Box className={styles.inputBlock}>
className={styles.inputBlock}
onDrop={handleDrop}
onDragOver={handleDragOver}
>
{isDraggingOver && (
<Box className={styles.fileDragOver}>
<Typography variant='body1'>Drop file here</Typography>
</Box>
)}
<MuiFileInput <MuiFileInput
placeholder='Drop file here, or click to select' placeholder='Select file'
value={selectedFile} value={selectedFile}
onChange={(value) => setSelectedFile(value)} onChange={(value) => setSelectedFile(value)}
InputProps={{ InputProps={{
@ -518,7 +496,7 @@ export const VerifyPage = () => {
</Box> </Box>
{selectedFile && encryptionKey && ( {selectedFile && encryptionKey && (
<Box sx={{ mt: 1, display: 'flex', justifyContent: 'center' }}> <Box sx={{ mt: 2, display: 'flex', justifyContent: 'center' }}>
<Button onClick={handleDecrypt} variant='contained'> <Button onClick={handleDecrypt} variant='contained'>
Decrypt Decrypt
</Button> </Button>

View File

@ -1,3 +1,15 @@
@import '../../colors.scss';
.container {
color: $text-color;
.inputBlock {
position: relative;
display: flex;
flex-direction: column;
gap: 25px;
}
.user { .user {
display: flex; display: flex;
align-items: center; align-items: center;
@ -16,3 +28,4 @@
@extend .user; @extend .user;
} }
} }
}