ipfs-webui
ipfs-webui copied to clipboard
Implement and Enhance File Move Functionality
hey @lidel, I attempted the issue with this PR
Description
This PR implements a file moving functionality in the IPFS Web UI, addressing issue #943. It adds support for moving single/multiple files and directories through both drag-and-drop and the move action button, with proper path handling and directory creation.
Changes
-
Core Move Functionality:
- Added proper path normalization to ensure correct destination paths
- Implemented automatic directory creation for move destinations
- Added handling for moving multiple selected files
-
Move Modal Improvements:
- Added directory path suggestions
- Implemented directory creation info tooltip
- Added validation to prevent invalid moves
- Added auto directory creation on directories that do not exist
-
Drag and Drop Enhancements:
- Added support for dragging files(single/multiple) to breadcrumbs without issues
- Implemented multi-file drag and drop operations
- Proper handling of destination paths when dropping files
-
Path Handling:
- Added proper handling of existing directories
- Implemented path normalization to prevent duplicate slashes
- Added checks to prevent moving files into themselves
-
Selected Actions More tab addition:
- Added "More" options menu for responsive layout
- Implemented collapsible actions based on screen width
- Enhanced accessibility for action buttons
Testing
- Tested moving single and multiple files
- Verified directory creation works correctly
- Tested drag and drop functionality
- Confirmed move operations maintain file integrity
Closes #943