Ver código fonte

Updates PR actions bindings

main
Keith Daulton 1 ano atrás
pai
commit
eeb3d6079d
2 arquivos alterados com 17 adições e 3 exclusões
  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 Ver arquivo

@ -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 Ver arquivo

@ -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;

Carregando…
Cancelar
Salvar