소스 검색

Hides actions when they shouldn't apply

main
Eric Amodio 4 년 전
부모
커밋
d6040bc590
4개의 변경된 파일6개의 추가작업 그리고 13개의 파일을 삭제
  1. +5
    -5
      package.json
  2. +1
    -2
      src/views/nodes/commitFileNode.ts
  3. +0
    -2
      src/views/nodes/fileHistoryNode.ts
  4. +0
    -4
      src/views/nodes/lineHistoryNode.ts

+ 5
- 5
package.json 파일 보기

@ -6694,7 +6694,7 @@
},
{
"command": "gitlens.revealCommitInView",
"when": "viewItem =~ /gitlens:commit\b/",
"when": "view =~ /gitlens\.views\.(?!commits|branches\b)/ && viewItem =~ /gitlens:commit\b/",
"group": "3_gitlens_explore@3"
},
{
@ -6714,19 +6714,19 @@
},
{
"command": "gitlens.views.openFile",
"when": "viewItem =~ /gitlens:file\b(?!.*?\b\+history\b)/",
"when": "view =~ /gitlens\.views\.(?!(fileHistory|lineHistory)\b)/ && viewItem =~ /gitlens:file\b(?=.*?\b\+committed\b)/",
"group": "inline@1",
"alt": "gitlens.views.openFileRevision"
},
{
"command": "gitlens.views.openFileRevision",
"when": "viewItem =~ /gitlens:file\b(?=.*?\b\+history\b)/",
"when": "view =~ /gitlens\.views\.(fileHistory|lineHistory)\b/ && viewItem =~ /gitlens:file\b(?=.*?\b\+committed\b)/",
"group": "inline@1",
"alt": "gitlens.views.openFile"
},
{
"command": "gitlens.views.openChangesWithWorking",
"when": "viewItem =~ /gitlens:file\b/",
"when": "viewItem =~ /gitlens:file\b(?!.*?\b\+unstaged\b)/",
"group": "inline@96"
},
{
@ -6741,7 +6741,7 @@
},
{
"command": "gitlens.copyShaToClipboard",
"when": "viewItem =~ /gitlens:file\b(?=.*?\b\+committed\b)/",
"when": "view =~ /gitlens\.views\.(fileHistory|lineHistory)\b/ && viewItem =~ /gitlens:file\b(?=.*?\b\+committed\b)/",
"group": "inline@98",
"alt": "gitlens.copyMessageToClipboard"
},

+ 1
- 2
src/views/nodes/commitFileNode.ts 파일 보기

@ -26,7 +26,6 @@ export class CommitFileNode extends ViewRefFileNode {
private readonly _options: {
branch?: GitBranch;
displayAsCommit?: boolean;
inFileHistory?: boolean;
selection?: Selection;
unpublished?: boolean;
} = {},
@ -114,7 +113,7 @@ export class CommitFileNode extends ViewRefFileNode {
if (!this.commit.isUncommitted) {
return `${ContextValues.File}+committed${
this._options.branch?.current && this._options.branch.sha === this.commit.ref ? '+HEAD' : ''
}${this._options.unpublished ? '+unpublished' : ''}${this._options.inFileHistory ? '+history' : ''}`;
}${this._options.unpublished ? '+unpublished' : ''}`;
}
return this.commit.isUncommittedStaged ? `${ContextValues.File}+staged` : `${ContextValues.File}+unstaged`;

+ 0
- 2
src/views/nodes/fileHistoryNode.ts 파일 보기

@ -67,7 +67,6 @@ export class FileHistoryNode extends SubscribeableViewNode implements PageableVi
commit =>
new CommitFileNode(this.view, this, status!, commit, {
displayAsCommit: true,
inFileHistory: true,
}),
),
);
@ -83,7 +82,6 @@ export class FileHistoryNode extends SubscribeableViewNode implements PageableVi
new CommitFileNode(this.view, this, c.files[0], c, {
branch: this.branch,
displayAsCommit: true,
inFileHistory: true,
unpublished: unpublishedCommits?.has(c.ref),
}),
),

+ 0
- 4
src/views/nodes/lineHistoryNode.ts 파일 보기

@ -129,7 +129,6 @@ export class LineHistoryNode extends SubscribeableViewNode implements PageableVi
0,
new CommitFileNode(this.view, this, file, uncommitted, {
displayAsCommit: true,
inFileHistory: true,
selection: selection,
}),
);
@ -156,7 +155,6 @@ export class LineHistoryNode extends SubscribeableViewNode implements PageableVi
0,
new CommitFileNode(this.view, this, file, uncommitted, {
displayAsCommit: true,
inFileHistory: true,
selection: selection,
}),
);
@ -187,7 +185,6 @@ export class LineHistoryNode extends SubscribeableViewNode implements PageableVi
0,
new CommitFileNode(this.view, this, file, uncommitted, {
displayAsCommit: true,
inFileHistory: true,
selection: selection,
}),
);
@ -207,7 +204,6 @@ export class LineHistoryNode extends SubscribeableViewNode implements PageableVi
new CommitFileNode(this.view, this, c.files[0], c, {
branch: this.branch,
displayAsCommit: true,
inFileHistory: true,
selection: selection,
unpublished: unpublishedCommits?.has(c.ref),
}),

||||||
x
 
000:0
불러오는 중...
취소
저장