File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed
src/webviews/apps/plus/focus/components Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -225,6 +225,10 @@ export class GlFocusApp extends LitElement {
225225 html `< gk-pull-request-row
226226 .rank =${ rank }
227227 .pullRequest =${ state . pullRequest }
228+ .isCurrentBranch=${ state . isCurrentBranch }
229+ .isCurrentWorktree=${ state . isCurrentWorktree }
230+ .hasWorktree=${ state . hasWorktree }
231+ .hasLocalBranch=${ state . hasLocalBranch }
228232 > </ gk-pull-request-row > ` ,
229233 ( ) => html `< gk-issue-row .rank =${ rank } .issue =${ state . issue } > </ gk-issue-row > ` ,
230234 ) ,
Original file line number Diff line number Diff line change @@ -278,11 +278,21 @@ export class GkPullRequestRow extends LitElement {
278278 slot ="trigger "
279279 href ="# "
280280 tabindex ="${ this . hasWorktree || this . isCurrentBranch ? - 1 : nothing } "
281- aria-label ="${ this . isCurrentBranch ? 'Already on this branch' : 'Switch to Branch...' } "
281+ aria-label ="${ this . isCurrentBranch
282+ ? 'Already on this branch'
283+ : this . hasWorktree
284+ ? 'This branch has a worktree'
285+ : 'Switch to Branch...' } "
282286 @click ="${ this . onSwitchBranchClick } "
283287 > < code-icon icon ="gl-switch "> </ code-icon
284288 > </ a >
285- < span > ${ this . isCurrentBranch ? 'Already on this branch' : 'Switch to Branch...' } </ span >
289+ < span
290+ > ${ this . isCurrentBranch
291+ ? 'Already on this branch'
292+ : this . hasWorktree
293+ ? 'This branch has a worktree'
294+ : 'Switch to Branch...' } </ span
295+ >
286296 </ gk-tooltip >
287297 </ nav >
288298 </ gk-focus-item >
@@ -304,7 +314,7 @@ export class GkPullRequestRow extends LitElement {
304314 }
305315
306316 onSwitchBranchClick ( e : Event ) {
307- if ( this . isCurrentBranch ) {
317+ if ( this . isCurrentBranch || this . hasWorktree ) {
308318 e . preventDefault ( ) ;
309319 e . stopImmediatePropagation ( ) ;
310320 return ;
You can’t perform that action at this time.
0 commit comments