Преглед изворни кода

Renames gravatar when not gravatar specific

main
Eric Amodio пре 4 година
родитељ
комит
742299eec4
7 измењених фајлова са 14 додато и 14 уклоњено
  1. +5
    -5
      src/annotations/gutterBlameAnnotationProvider.ts
  2. +4
    -4
      src/git/formatters/commitFormatter.ts
  3. +1
    -1
      src/git/models/commit.ts
  4. +1
    -1
      src/git/models/contributor.ts
  5. +1
    -1
      src/views/nodes/commitFileNode.ts
  6. +1
    -1
      src/views/nodes/commitNode.ts
  7. +1
    -1
      src/views/nodes/contributorNode.ts

+ 5
- 5
src/annotations/gutterBlameAnnotationProvider.ts Прегледај датотеку

@ -96,7 +96,7 @@ export class GutterBlameAnnotationProvider extends BlameAnnotationProviderBase {
this.decorations.push(gutter);
if (avatars && !cfg.compact && commit !== undefined && commit.email !== undefined) {
this.addOrUpdateGravatarDecoration(commit, gutter.range, gravatarDefault, avatarDecorationsMap!);
this.addOrUpdateAvatarDecoration(commit, gutter.range, gravatarDefault, avatarDecorationsMap!);
}
continue;
@ -118,7 +118,7 @@ export class GutterBlameAnnotationProvider extends BlameAnnotationProviderBase {
this.decorations.push(gutter);
if (avatars && commit.email !== undefined) {
this.addOrUpdateGravatarDecoration(commit, gutter.range, gravatarDefault, avatarDecorationsMap!);
this.addOrUpdateAvatarDecoration(commit, gutter.range, gravatarDefault, avatarDecorationsMap!);
}
continue;
@ -135,7 +135,7 @@ export class GutterBlameAnnotationProvider extends BlameAnnotationProviderBase {
this.decorations.push(gutter);
if (avatars && commit.email !== undefined) {
this.addOrUpdateGravatarDecoration(commit, gutter.range, gravatarDefault, avatarDecorationsMap!);
this.addOrUpdateAvatarDecoration(commit, gutter.range, gravatarDefault, avatarDecorationsMap!);
}
decorationsMap[l.sha] = gutter;
@ -163,7 +163,7 @@ export class GutterBlameAnnotationProvider extends BlameAnnotationProviderBase {
return true;
}
addOrUpdateGravatarDecoration(
addOrUpdateAvatarDecoration(
commit: GitBlameCommit,
range: Range,
gravatarDefault: GravatarDefaultStyle,
@ -178,7 +178,7 @@ export class GutterBlameAnnotationProvider extends BlameAnnotationProviderBase {
map[commit.email!] = {
decoration: window.createTextEditorDecorationType({
gutterIconPath: commit.getGravatarUri(gravatarDefault),
gutterIconPath: commit.getAvatarUri(gravatarDefault),
gutterIconSize: '16px 16px',
}),
ranges: [range],

+ 4
- 4
src/git/formatters/commitFormatter.ts Прегледај датотеку

@ -163,15 +163,15 @@ export class CommitFormatter extends Formatter {
presence.status === 'dnd' ? 'in ' : emptyStr
}${presence.statusText.toLocaleLowerCase()}`;
return `${this._getGravatarMarkdown(title)}${this._getPresenceMarkdown(presence, title)}`;
return `${this._getAvatarMarkdown(title)}${this._getPresenceMarkdown(presence, title)}`;
}
return this._getGravatarMarkdown(this._item.author);
return this._getAvatarMarkdown(this._item.author);
}
private _getGravatarMarkdown(title: string) {
private _getAvatarMarkdown(title: string) {
return `![${title}](${this._item
.getGravatarUri(Container.config.defaultGravatarsStyle)
.getAvatarUri(Container.config.defaultGravatarsStyle)
.toString(true)}|width=16,height=16 "${title}")`;
}

+ 1
- 1
src/git/models/commit.ts Прегледај датотеку

@ -218,7 +218,7 @@ export abstract class GitCommit implements GitReference {
return GitUri.getFormattedPath(this.fileName, options);
}
getGravatarUri(fallback: GravatarDefaultStyle, size: number = 16): Uri {
getAvatarUri(fallback: GravatarDefaultStyle, size: number = 16): Uri {
return getAvatarUri(this.email, fallback, size);
}

+ 1
- 1
src/git/models/contributor.ts Прегледај датотеку

@ -20,7 +20,7 @@ export class GitContributor {
public readonly current: boolean = false,
) {}
getGravatarUri(fallback: GravatarDefaultStyle, size: number = 16): Uri {
getAvatarUri(fallback: GravatarDefaultStyle, size: number = 16): Uri {
return getAvatarUri(this.email, fallback, size);
}
}

+ 1
- 1
src/views/nodes/commitFileNode.ts Прегледај датотеку

@ -62,7 +62,7 @@ export class CommitFileNode extends ViewRefFileNode {
item.tooltip = this.tooltip;
if (this._options.displayAsCommit && this.view.config.avatars) {
item.iconPath = this.commit.getGravatarUri(Container.config.defaultGravatarsStyle);
item.iconPath = this.commit.getAvatarUri(Container.config.defaultGravatarsStyle);
} else {
const icon = GitFile.getStatusIcon(this.file.status);
item.iconPath = {

+ 1
- 1
src/views/nodes/commitNode.ts Прегледај датотеку

@ -76,7 +76,7 @@ export class CommitNode extends ViewRefNode {
dateFormat: Container.config.defaultDateFormat,
});
item.iconPath = this.view.config.avatars
? this.commit.getGravatarUri(Container.config.defaultGravatarsStyle)
? this.commit.getAvatarUri(Container.config.defaultGravatarsStyle)
: new ThemeIcon('git-commit');
item.tooltip = CommitFormatter.fromTemplate(
this.commit.isUncommitted

+ 1
- 1
src/views/nodes/contributorNode.ts Прегледај датотеку

@ -76,7 +76,7 @@ export class ContributorNode extends ViewNode implements Pagea
}\n${Strings.pluralize('commit', this.contributor.count)}`;
if (this.view.config.avatars) {
item.iconPath = this.contributor.getGravatarUri(Container.config.defaultGravatarsStyle);
item.iconPath = this.contributor.getAvatarUri(Container.config.defaultGravatarsStyle);
}
return item;

Loading…
Откажи
Сачувај