Pārlūkot izejas kodu

Updates PR actions bindings

main
Keith Daulton pirms 1 gada
vecāks
revīzija
eeb3d6079d
2 mainītis faili ar 17 papildinājumiem un 3 dzēšanām
  1. +4
    -0
      src/webviews/apps/plus/focus/components/focus-app.ts
  2. +13
    -3
      src/webviews/apps/plus/focus/components/gk-pull-request-row.ts

+ 4
- 0
src/webviews/apps/plus/focus/components/focus-app.ts Parādīt failu

@ -225,6 +225,10 @@ export class GlFocusApp extends LitElement {
html`<gk-pull-request-row
.rank=${rank}
.pullRequest=${state.pullRequest}
.isCurrentBranch=${state.isCurrentBranch}
.isCurrentWorktree=${state.isCurrentWorktree}
.hasWorktree=${state.hasWorktree}
.hasLocalBranch=${state.hasLocalBranch}
></gk-pull-request-row>`,
() => html`<gk-issue-row .rank=${rank} .issue=${state.issue}></gk-issue-row>`,
),

+ 13
- 3
src/webviews/apps/plus/focus/components/gk-pull-request-row.ts Parādīt failu

@ -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}"
><code-icon icon="gl-switch"></code-icon
></a>
<span>${this.isCurrentBranch ? 'Already on this branch' : 'Switch to Branch...'}</span>
<span
>${this.isCurrentBranch
? 'Already on this branch'
: this.hasWorktree
? 'This branch has a worktree'
: 'Switch to Branch...'}</span
>
</gk-tooltip>
</nav>
</gk-focus-item>
@ -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;

Notiek ielāde…
Atcelt
Saglabāt