feat: Add file permissions dialog for SSH file manager

Add a comprehensive file permissions modification feature accessible via right-click context menu:

- Add PermissionsDialog component with read/write/execute checkboxes for owner/group/others
- Display current and new permissions side-by-side with real-time octal calculation
- Support both numeric (755) and symbolic (rwxr-xr-x) permission formats
- Implement backend API endpoint POST /ssh/file_manager/ssh/changePermissions
- Add frontend API function changeSSHPermissions with complete logging
- Integrate dialog with FileManager via onProperties callback
- Add i18n translations for English and Chinese
- Include path escaping and comprehensive error handling
This commit is contained in:
ZacharyZcR
2025-11-09 15:39:52 +08:00
parent 417df31aa7
commit ae3b8bba12
6 changed files with 504 additions and 2 deletions

View File

@@ -1169,7 +1169,19 @@
"sshConnectionFailed": "SSH connection failed. Please check your connection to {{name}} ({{ip}}:{{port}})",
"loadFileFailed": "Failed to load file: {{error}}",
"connectedSuccessfully": "Connected successfully",
"totpVerificationFailed": "TOTP verification failed"
"totpVerificationFailed": "TOTP verification failed",
"changePermissions": "Change Permissions",
"changePermissionsDesc": "Modify file permissions for",
"currentPermissions": "Current Permissions",
"newPermissions": "New Permissions",
"owner": "Owner",
"group": "Group",
"others": "Others",
"read": "Read",
"write": "Write",
"execute": "Execute",
"permissionsChangedSuccessfully": "Permissions changed successfully",
"failedToChangePermissions": "Failed to change permissions"
},
"tunnels": {
"title": "SSH Tunnels",