diff --git a/web/src/api/workspaces.ts b/web/src/api/workspaces.ts index c643fed..b2a8869 100644 --- a/web/src/api/workspaces.ts +++ b/web/src/api/workspaces.ts @@ -52,6 +52,11 @@ export const workspacesApi = { release: (wtID: string) => request(`/api/v1/worktrees/${enc(wtID)}/release`, { method: 'POST' }), + listBranches(wsID: string): Promise { + return request<{ branches: string[] }>(`/api/v1/workspaces/${enc(wsID)}/branches`) + .then(r => r.branches) + }, + // ===== Git ops ===== statusOnMain: (wsID: string) => request(`/api/v1/workspaces/${enc(wsID)}/main/status`), diff --git a/web/src/views/workspaces/components/WorktreesTab.vue b/web/src/views/workspaces/components/WorktreesTab.vue index d432f85..e0093d9 100644 --- a/web/src/views/workspaces/components/WorktreesTab.vue +++ b/web/src/views/workspaces/components/WorktreesTab.vue @@ -6,7 +6,7 @@ > 新建 worktree @@ -31,7 +31,13 @@ - +