feat(files): New → Clone repository clones into the open folder
The File Explorer's New menu (and its right-click menu) gains Clone repository: it clones a URL into the folder it has open — of the user's own home or of a workspace's own folder — through POST /api/lanes/clone with that folder as `parent`, so the URL allowlist, the own-folder check and the folder account's own git identity all apply, and opens a workspace on the clone. ECREDENTIALS asks for a login, ESSHAUTH points to Settings → Git. GET /api/homes now gives `me` its absolute `dir`. Keys typed in the dialog never reach the explorer's shortcuts (Backspace / Delete).
This commit is contained in:
+8
-1
@@ -298,7 +298,7 @@ re-run.
|
||||
#### File Explorer on a home
|
||||
|
||||
```
|
||||
GET /api/homes { homes: [{ id: "me" | <username>, label, readOnly }] }
|
||||
GET /api/homes { homes: [{ id: "me" | <username>, label, readOnly, dir? }] }
|
||||
GET /api/homes/:who/fs/list|trash|zip|download as the workspace routes above
|
||||
POST /api/homes/:who/fs/mkdir|newfile|rename|move|copy|delete|upload|trash/restore|trash/purge
|
||||
```
|
||||
@@ -341,6 +341,13 @@ A copy goes home ↔ workspace
|
||||
one Linux account; each side is checked under its own rule. A home is never a
|
||||
workspace. The **Files** page opens on `?home=me` by default.
|
||||
|
||||
`me` alone carries `dir`, its absolute folder: the File Explorer's **New →
|
||||
Clone repository** (`client/src/components/lanes/CloneHereDialog.tsx`) clones
|
||||
into the folder it has open — of the user's own home or of a workspace's own
|
||||
folder, never a session worktree, an extra folder or another user's home —
|
||||
through `POST /api/lanes/clone` below with that folder as `parent`, so every
|
||||
check of that route applies, and opens a workspace on the clone.
|
||||
|
||||
#### Clone a repository into a new workspace
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user