소스 검색

Updates PR actions bindings

main
Keith Daulton 1 년 전
부모
커밋
eeb3d6079d
2개의 변경된 파일17개의 추가작업 그리고 3개의 파일을 삭제
  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 파일 보기

@ -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 파일 보기

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

불러오는 중...
취소
저장