Skip to content

Commit eeb3d60

Browse files
committed
Updates PR actions bindings
1 parent 18837cb commit eeb3d60

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

src/webviews/apps/plus/focus/components/focus-app.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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
),

src/webviews/apps/plus/focus/components/gk-pull-request-row.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff 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;

0 commit comments

Comments
 (0)