Procházet zdrojové kódy

Adds gravatar support to more commits

main
Eric Amodio před 7 roky
rodič
revize
6e701589a6
2 změnil soubory, kde provedl 6 přidání a 6 odebrání
  1. +4
    -4
      src/views/commitFileNode.ts
  2. +2
    -2
      src/views/statusFileCommitsNode.ts

+ 4
- 4
src/views/commitFileNode.ts Zobrazit soubor

@ -7,12 +7,12 @@ import * as path from 'path';
export enum CommitFileNodeDisplayAs {
CommitLabel = 1 << 0,
CommitIcon = 1 << 1,
FileLabel = 1 << 2,
FileLabel = 1 << 1,
CommitIcon = 1 << 2,
StatusIcon = 1 << 3,
Gravatar = 1 << 4,
Commit = CommitLabel | CommitIcon,
File = FileLabel | StatusIcon
}
@ -25,7 +25,7 @@ export class CommitFileNode extends ExplorerNode {
public readonly status: IGitStatusFile,
public commit: GitLogCommit,
protected readonly explorer: Explorer,
private displayAs: CommitFileNodeDisplayAs = CommitFileNodeDisplayAs.Commit,
private displayAs: CommitFileNodeDisplayAs,
public readonly branch?: GitBranch
) {
super(GitUri.fromFileStatus(status, commit.repoPath, commit.sha));

+ 2
- 2
src/views/statusFileCommitsNode.ts Zobrazit soubor

@ -19,7 +19,7 @@ export class StatusFileCommitsNode extends ExplorerNode {
}
async getChildren(): Promise<ExplorerNode[]> {
return this.commits.map(c => new CommitFileNode(this.status, c, this.explorer, CommitFileNodeDisplayAs.Commit, this.branch));
return this.commits.map(c => new CommitFileNode(this.status, c, this.explorer, CommitFileNodeDisplayAs.CommitLabel | (this.explorer.config.gravatars ? CommitFileNodeDisplayAs.Gravatar : CommitFileNodeDisplayAs.CommitIcon), this.branch));
}
async getTreeItem(): Promise<TreeItem> {
@ -34,7 +34,7 @@ export class StatusFileCommitsNode extends ExplorerNode {
if (this.commits.length === 1 && this.commits[0].isUncommitted) {
item.collapsibleState = TreeItemCollapsibleState.None;
item.contextValue = 'gitlens:status-file' as ResourceType;
item.contextValue = ResourceType.StatusFile;
item.command = this.getCommand();
}

Načítá se…
Zrušit
Uložit