Fix: file-manager and swarm-desktop bugs (#714)
- drive capacity display with stamp polling - download/upload progress handling - overlay and tooltip issues - FileMaganger readme - ultra-light mode handling - account feed view page - download media files - remove not found syncing link - fix ultra light node wallet page - tooltip issues --------- Co-authored-by: Andrei Mitrea <andrei.mitrea.hq@gmail.com> Co-authored-by: nidishk <nidishkrishnan45@gmail.com> Co-authored-by: Ferenc Sárai <sarai.ferenc@gmail.com> Co-authored-by: Nándor Komlódi <nandor.komlodi@gmail.com> Co-authored-by: rolandlor <33499567+rolandlor@users.noreply.github.com>
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import { ReactElement } from 'react'
|
||||
import type { FileInfo, DriveInfo } from '@solarpunkltd/file-manager-lib'
|
||||
import { ConfirmModal } from '../ConfirmModal/ConfirmModal'
|
||||
import { Tooltip } from '../Tooltip/Tooltip'
|
||||
import { DeleteFileModal } from '../DeleteFileModal/DeleteFileModal'
|
||||
import { DestroyDriveModal } from '../DestroyDriveModal/DestroyDriveModal'
|
||||
import { FileAction } from '../../constants/transfers'
|
||||
import { TOOLTIPS } from '../../constants/tooltips'
|
||||
|
||||
interface FileBrowserModalsProps {
|
||||
showDeleteModal: boolean
|
||||
@@ -11,12 +13,15 @@ interface FileBrowserModalsProps {
|
||||
fileCountText: string
|
||||
currentDrive: DriveInfo | null
|
||||
confirmBulkForget: boolean
|
||||
confirmBulkRestore: boolean
|
||||
showDestroyDriveModal: boolean
|
||||
pendingCancelUpload: string | null
|
||||
onDeleteCancel: () => void
|
||||
onDeleteProceed: (action: FileAction) => void
|
||||
onForgetConfirm: () => Promise<void>
|
||||
onForgetCancel: () => void
|
||||
onRestoreConfirm: () => Promise<void>
|
||||
onRestoreCancel: () => void
|
||||
onDestroyCancel: () => void
|
||||
onDestroyConfirm: () => Promise<void>
|
||||
onCancelUploadConfirm: () => void
|
||||
@@ -29,12 +34,15 @@ export function FileBrowserModals({
|
||||
fileCountText,
|
||||
currentDrive,
|
||||
confirmBulkForget,
|
||||
confirmBulkRestore,
|
||||
showDestroyDriveModal,
|
||||
pendingCancelUpload,
|
||||
onDeleteCancel,
|
||||
onDeleteProceed,
|
||||
onForgetConfirm,
|
||||
onForgetCancel,
|
||||
onRestoreConfirm,
|
||||
onRestoreCancel,
|
||||
onDestroyCancel,
|
||||
onDestroyConfirm,
|
||||
onCancelUploadConfirm,
|
||||
@@ -53,7 +61,12 @@ export function FileBrowserModals({
|
||||
|
||||
{confirmBulkForget && (
|
||||
<ConfirmModal
|
||||
title="Forget permanently?"
|
||||
title={
|
||||
<>
|
||||
Forget permanently?
|
||||
<Tooltip label={TOOLTIPS.FILE_OPERATION_FORGET} />
|
||||
</>
|
||||
}
|
||||
message={
|
||||
<>
|
||||
This removes <b>{selectedFiles.length}</b> {fileCountText} from your view.
|
||||
@@ -68,6 +81,26 @@ export function FileBrowserModals({
|
||||
/>
|
||||
)}
|
||||
|
||||
{confirmBulkRestore && (
|
||||
<ConfirmModal
|
||||
title={
|
||||
<>
|
||||
Restore from trash?
|
||||
<Tooltip label={TOOLTIPS.FILE_OPERATION_RESTORE_FROM_TRASH} />
|
||||
</>
|
||||
}
|
||||
message={
|
||||
<>
|
||||
This will restore <b>{selectedFiles.length}</b> {fileCountText} from trash.
|
||||
</>
|
||||
}
|
||||
confirmLabel="Restore"
|
||||
cancelLabel="Cancel"
|
||||
onConfirm={onRestoreConfirm}
|
||||
onCancel={onRestoreCancel}
|
||||
/>
|
||||
)}
|
||||
|
||||
{showDestroyDriveModal && currentDrive && (
|
||||
<DestroyDriveModal drive={currentDrive} onCancelClick={onDestroyCancel} doDestroy={onDestroyConfirm} />
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user