Feat: FileManager (#98) (#703)

* feat: add file manager module

- Complete file manager implementation with UI/UX
- Add drive management functionality
- Add file upload/download with progress tracking
- Add stamp integration and handling
- Add bulk operations and context menus

Co-authored-by: Roland Seres <roland.seres90@gmail.com>
Co-authored-by: nidishk <nidishkrishnan45@gmail.com>
This commit is contained in:
Bálint Ujvári
2025-11-12 11:26:00 +01:00
committed by GitHub
parent 1249c0df71
commit 5bfe2a0331
107 changed files with 21529 additions and 5578 deletions
+5 -3
View File
@@ -12,7 +12,7 @@ interface Props {
export function AssetSyncing({ reference }: Props): ReactElement {
const { beeApi } = useContext(SettingsContext)
const syncTimer = useRef<NodeJS.Timer>()
const syncTimer = useRef<ReturnType<typeof setInterval> | null>(null)
const [isRetrieveChecking, setIsRetrieveChecking] = useState<boolean>(false)
const [syncProgress, setSyncProgress] = useState<number>(0)
@@ -22,7 +22,7 @@ export function AssetSyncing({ reference }: Props): ReactElement {
let allTags: Tag[] = []
let offset = 0
const limit = 1000
let tagsBatch
let tagsBatch: Tag[]
do {
tagsBatch = await beeApi.getAllTags({ limit, offset })
@@ -32,7 +32,7 @@ export function AssetSyncing({ reference }: Props): ReactElement {
const tag = allTags.find(t => t.address === reference)
if (tag) {
if (tag && tag.split > 0) {
const progress = ((tag.seen + tag.synced) / tag.split) * 100
setSyncProgress(progress)
}
@@ -44,6 +44,7 @@ export function AssetSyncing({ reference }: Props): ReactElement {
return () => {
if (syncTimer.current) {
clearInterval(syncTimer.current)
syncTimer.current = null
}
}
// eslint-disable-next-line react-hooks/exhaustive-deps
@@ -52,6 +53,7 @@ export function AssetSyncing({ reference }: Props): ReactElement {
useEffect(() => {
if (syncProgress === 100 && syncTimer.current) {
clearInterval(syncTimer.current)
syncTimer.current = null
}
}, [syncProgress])