feat(12-03): connection-ID routing, rename, session folder memory, thin views

- Route /cloud/:connectionId/:folderId replaces /cloud/:provider/:folderId
- api/cloud.js: getCloudFoldersByConnectionId + renameCloudConnection
- cloudConnections store: rename, selectConnection, setBrowseState, defaultDisplayName, session storage helpers
- CloudStorageView: thin — passes connectionRoots to StorageBrowser
- CloudFolderView: thin — uses connectionId param, never provider slug
- SettingsCloudTab: inline rename input for each active connection
- 27 tests pass: store, view, settings
This commit is contained in:
curo1305
2026-06-18 23:25:29 +02:00
parent 6f0ecfa39b
commit bf9af11274
10 changed files with 594 additions and 91 deletions
+16
View File
@@ -29,10 +29,26 @@ export function updateDefaultStorage(backend) {
return jsonRequest('/api/users/me/default-storage', 'PATCH', { backend })
}
/**
* Browse a cloud folder by connection UUID and folder path.
* connectionId is always a UUID; folderId is a path string (default 'root').
*/
export function getCloudFoldersByConnectionId(connectionId, folderId) {
return request(`/api/cloud/connections/${connectionId}/folders/${folderId}`)
}
/** @deprecated Use getCloudFoldersByConnectionId instead. */
export function getCloudFolders(provider, folderId) {
return request(`/api/cloud/folders/${provider}/${folderId}`)
}
/**
* Rename a cloud connection's display name.
*/
export function renameCloudConnection(id, displayName) {
return jsonRequest(`/api/cloud/connections/${id}`, 'PATCH', { display_name: displayName })
}
/**
* Initiate OAuth flow for Google Drive or OneDrive.
*