diff --git a/src/webviews/apps/plus/focus/components/focus-app.ts b/src/webviews/apps/plus/focus/components/focus-app.ts index 13fb6d8..4318f94 100644 --- a/src/webviews/apps/plus/focus/components/focus-app.ts +++ b/src/webviews/apps/plus/focus/components/focus-app.ts @@ -225,6 +225,10 @@ export class GlFocusApp extends LitElement { html``, () => html``, ), diff --git a/src/webviews/apps/plus/focus/components/gk-pull-request-row.ts b/src/webviews/apps/plus/focus/components/gk-pull-request-row.ts index b36a7fe..ebd635c 100644 --- a/src/webviews/apps/plus/focus/components/gk-pull-request-row.ts +++ b/src/webviews/apps/plus/focus/components/gk-pull-request-row.ts @@ -278,11 +278,21 @@ export class GkPullRequestRow extends LitElement { slot="trigger" href="#" tabindex="${this.hasWorktree || this.isCurrentBranch ? -1 : nothing}" - aria-label="${this.isCurrentBranch ? 'Already on this branch' : 'Switch to Branch...'}" + aria-label="${this.isCurrentBranch + ? 'Already on this branch' + : this.hasWorktree + ? 'This branch has a worktree' + : 'Switch to Branch...'}" @click="${this.onSwitchBranchClick}" > - ${this.isCurrentBranch ? 'Already on this branch' : 'Switch to Branch...'} + ${this.isCurrentBranch + ? 'Already on this branch' + : this.hasWorktree + ? 'This branch has a worktree' + : 'Switch to Branch...'} @@ -304,7 +314,7 @@ export class GkPullRequestRow extends LitElement { } onSwitchBranchClick(e: Event) { - if (this.isCurrentBranch) { + if (this.isCurrentBranch || this.hasWorktree) { e.preventDefault(); e.stopImmediatePropagation(); return;