feat: add WebDAV file browser with auth improvements

Add a new Files section powered by WebDAV for browsing, uploading,
downloading, renaming, and deleting files and folders.

New features:
- WebDAV file browser with grid/list views and breadcrumb navigation
- File upload (drag-and-drop and button), folder creation, rename, delete
- File preview modals for images and other file types
- WebDAV proxy API route to handle authentication
- Navigation rail entry for Files (auto-hidden when WebDAV is unsupported)

Auth improvements:
- Fix premature redirects on calendar, contacts, and settings pages by
  adding explicit auth check on mount before redirecting to login
- Persist active settings tab in localStorage

Other:
- Expose getAuthHeader() and getServerUrl() on JMAPClient
- Add WebDAV store with connection testing and capability detection
- Add i18n translations for file browser in all 8 locales (de, en, es,
  fr, it, ja, nl, pt)
This commit is contained in:
Linus Rath
2026-03-15 05:24:27 +01:00
parent cb74e3bf73
commit 1f1db8fac8
23 changed files with 4179 additions and 12 deletions
+79
View File
@@ -61,6 +61,7 @@
"contacts": "Contacts",
"calendar": "Calendar",
"settings": "Settings",
"files": "Files",
"loading_mailboxes": "Loading mailboxes...",
"push_connected": "Real-time updates active",
"push_disconnected": "Real-time updates inactive",
@@ -1729,5 +1730,83 @@
"got_it": "Got it",
"settings": "Settings",
"dismiss": "Dismiss"
},
"files": {
"title": "Files",
"search_placeholder": "Search files...",
"empty_state_title": "No files yet",
"empty_state_description": "Upload files or create folders to get started",
"upload": "Upload",
"upload_files": "Upload Files",
"new_folder": "New Folder",
"new_folder_name": "Folder name",
"rename": "Rename",
"rename_title": "Rename",
"new_name": "New name",
"delete": "Delete",
"delete_confirm_title": "Delete resource",
"delete_confirm_message": "Are you sure you want to delete \"{name}\"? This cannot be undone.",
"download": "Download",
"name": "Name",
"size": "Size",
"modified": "Modified",
"type": "Type",
"folder": "Folder",
"file": "File",
"parent_directory": "Parent directory",
"breadcrumb_root": "Home",
"drop_files_here": "Drop files here to upload",
"uploading": "Uploading...",
"upload_success": "{count, plural, one {1 file uploaded} other {# files uploaded}}",
"upload_error": "Failed to upload file",
"create_folder_success": "Folder created",
"create_folder_error": "Failed to create folder",
"delete_success": "Deleted successfully",
"delete_error": "Failed to delete",
"rename_success": "Renamed successfully",
"rename_error": "Failed to rename",
"download_error": "Failed to download",
"not_available": "WebDAV file storage is not available on this server",
"cancel": "Cancel",
"create": "Create",
"save": "Save",
"no_results": "No files match your search",
"batch_delete_confirm_message": "Are you sure you want to delete {count, plural, one {1 item} other {# items}}? This cannot be undone.",
"batch_delete_success": "{count, plural, one {1 item deleted} other {# items deleted}}",
"grid_view": "Grid view",
"list_view": "List view",
"details": "Details",
"path": "Path",
"preview": "Preview",
"preview_error": "Failed to load preview",
"cut": "Cut",
"copy": "Copy",
"paste": "Paste",
"move_success": "{count, plural, one {1 item moved} other {# items moved}}",
"move_error": "Failed to move",
"paste_success": "Pasted successfully",
"paste_error": "Failed to paste",
"new_text_file": "New Text File",
"file_name": "File name",
"retry": "Retry",
"refresh": "Refresh",
"toggle_favorite": "Toggle favorite",
"duplicate": "Duplicate",
"duplicate_success": "Duplicated successfully",
"duplicate_error": "Failed to duplicate",
"create_file_success": "File created",
"create_file_error": "Failed to create file",
"favorites": "Favorites",
"recent": "Recent",
"properties": "Properties",
"open_folder": "Open folder",
"upload_folder": "Upload Folder",
"file_too_large": "\"{name}\" exceeds the maximum file size ({max})",
"undo": "Undo",
"undo_success": "Action undone",
"undo_error": "Failed to undo",
"toolbar": "File actions",
"file_list": "Files and folders",
"context_menu": "Actions"
}
}