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:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user