diff --git a/package.json b/package.json index 4691277..539aee9 100644 --- a/package.json +++ b/package.json @@ -1936,12 +1936,6 @@ "markdownDescription": "Specifies the description format of stashes in the views. See [_Commit Tokens_](https://github.com/eamodio/vscode-gitlens/wiki/Custom-Formatting#commit-tokens) in the GitLens docs", "scope": "window" }, - "gitlens.views.stashes.avatars": { - "type": "boolean", - "default": true, - "markdownDescription": "Specifies whether to show avatar images instead of commit (or status) icons in the _Stashes_ view", - "scope": "window" - }, "gitlens.views.stashes.files.compact": { "type": "boolean", "default": true, @@ -3901,16 +3895,6 @@ "icon": "$(list-flat)" }, { - "command": "gitlens.views.stashes.setShowAvatarsOn", - "title": "Show Avatars", - "category": "GitLens" - }, - { - "command": "gitlens.views.stashes.setShowAvatarsOff", - "title": "Hide Avatars", - "category": "GitLens" - }, - { "command": "gitlens.views.tags.copy", "title": "Copy", "category": "GitLens" @@ -4988,14 +4972,6 @@ "when": "false" }, { - "command": "gitlens.views.stashes.setShowAvatarsOn", - "when": "false" - }, - { - "command": "gitlens.views.stashes.setShowAvatarsOff", - "when": "false" - }, - { "command": "gitlens.views.tags.copy", "when": "false" }, @@ -5829,16 +5805,6 @@ "group": "navigation@99" }, { - "command": "gitlens.views.stashes.setShowAvatarsOn", - "when": "view =~ /^gitlens\\.views\\.stashes/ && !config.gitlens.views.stashes.avatars", - "group": "1_gitlens@0" - }, - { - "command": "gitlens.views.stashes.setShowAvatarsOff", - "when": "view =~ /^gitlens\\.views\\.stashes/ && config.gitlens.views.stashes.avatars", - "group": "1_gitlens@0" - }, - { "command": "gitlens.views.tags.setLayoutToList", "when": "view =~ /gitlens\\.views\\.tags/ && config.gitlens.views.tags.branches.layout == tree", "group": "navigation@1" diff --git a/src/config.ts b/src/config.ts index c163403..8ee6683 100644 --- a/src/config.ts +++ b/src/config.ts @@ -519,7 +519,7 @@ export interface SearchViewConfig { } export interface StashesViewConfig { - avatars: boolean; + // avatars: boolean; files: ViewsFilesConfig; } diff --git a/src/views/nodes/commitFileNode.ts b/src/views/nodes/commitFileNode.ts index 647b624..e4088ce 100644 --- a/src/views/nodes/commitFileNode.ts +++ b/src/views/nodes/commitFileNode.ts @@ -6,6 +6,7 @@ import { GlyphChars } from '../../constants'; import { Container } from '../../container'; import { CommitFormatter, GitFile, GitLogCommit, GitRevisionReference, StatusFileFormatter } from '../../git/git'; import { GitUri } from '../../git/gitUri'; +import { StashesView } from '../stashesView'; import { View } from '../viewBase'; import { ContextValues, ViewNode, ViewRefFileNode } from './viewNode'; @@ -62,7 +63,7 @@ export class CommitFileNode extends ViewRefFileNode { item.description = this.description; item.tooltip = this.tooltip; - if (this._options.displayAsCommit && this.view.config.avatars) { + if (this._options.displayAsCommit && !(this.view instanceof StashesView) && this.view.config.avatars) { item.iconPath = this.commit.getAvatarUri(Container.config.defaultGravatarsStyle); } else { const icon = GitFile.getStatusIcon(this.file.status); diff --git a/src/views/nodes/commitNode.ts b/src/views/nodes/commitNode.ts index 30059f5..9242c7c 100644 --- a/src/views/nodes/commitNode.ts +++ b/src/views/nodes/commitNode.ts @@ -2,14 +2,15 @@ import * as paths from 'path'; import { Command, ThemeIcon, TreeItem, TreeItemCollapsibleState } from 'vscode'; import { Commands, DiffWithPreviousCommandArgs } from '../../commands'; +import { CommitFileNode } from './commitFileNode'; import { ViewFilesLayout } from '../../configuration'; import { GlyphChars } from '../../constants'; import { Container } from '../../container'; +import { FileNode, FolderNode } from './folderNode'; import { CommitFormatter, GitBranch, GitLogCommit, GitRevisionReference } from '../../git/git'; +import { StashesView } from '../stashesView'; import { Arrays, Strings } from '../../system'; import { ViewsWithFiles } from '../viewBase'; -import { CommitFileNode } from './commitFileNode'; -import { FileNode, FolderNode } from './folderNode'; import { ContextValues, ViewNode, ViewRefNode } from './viewNode'; export class CommitNode extends ViewRefNode { @@ -76,9 +77,10 @@ export class CommitNode extends ViewRefNode { () => this.setFilesLayout(ViewFilesLayout.Tree), this, ); - commands.registerCommand(this.getQualifiedCommand('setShowAvatarsOn'), () => this.setShowAvatars(true), this); - commands.registerCommand(this.getQualifiedCommand('setShowAvatarsOff'), () => this.setShowAvatars(false), this); } protected filterConfigurationChanged(e: ConfigurationChangeEvent) { @@ -260,8 +258,4 @@ export class StashesView extends ViewBase { private setFilesLayout(layout: ViewFilesLayout) { return configuration.updateEffective('views', this.configKey, 'files', 'layout', layout); } - - private setShowAvatars(enabled: boolean) { - return configuration.updateEffective('views', this.configKey, 'avatars', enabled); - } } diff --git a/src/webviews/apps/settings/partials/views.branches.html b/src/webviews/apps/settings/partials/views.branches.html new file mode 100644 index 0000000..20acf2e --- /dev/null +++ b/src/webviews/apps/settings/partials/views.branches.html @@ -0,0 +1,133 @@ +
+
+

+ Branches view + + + +

+ +

Adds a Branches view to visualize, navigate, and explore Git branches

+
+ +
+
+
+
+
+
+ +
+ +
+
+
+ +
+
+ +
+ +
+
+
+ +
+
+ +
+ +
+
+

+ Chooses the best layout based on the number of files at each nesting level +

+
+ +
+
+ + +
+

Compacts (flattens) unnecessary nesting when using a tree layouts

+
+ +
+
+ + +
+
+
+
+ +
+ + + + +
+
+ +
+

+ For more options, open + User Settings + and search for gitlens.views.branches or + gitlens.views +

+
+
+
diff --git a/src/webviews/apps/settings/partials/views.commits.html b/src/webviews/apps/settings/partials/views.commits.html new file mode 100644 index 0000000..e8a4d86 --- /dev/null +++ b/src/webviews/apps/settings/partials/views.commits.html @@ -0,0 +1,125 @@ +
+
+

+ Commits view + + + +

+ +

Adds a Commits view to visualize, navigate, and explore Git commits

+
+ +
+
+
+
+
+
+ + +
+
+ +
+
+ +
+ +
+
+

+ Chooses the best layout based on the number of files at each nesting level +

+
+ +
+
+ + +
+

Compacts (flattens) unnecessary nesting when using a tree layouts

+
+ +
+
+ + +
+
+
+
+ +
+ + + + +
+
+ +
+

+ For more options, open + User Settings + and search for gitlens.views.commits or + gitlens.views +

+
+
+
diff --git a/src/webviews/apps/settings/partials/views.contributors.html b/src/webviews/apps/settings/partials/views.contributors.html new file mode 100644 index 0000000..76aab58 --- /dev/null +++ b/src/webviews/apps/settings/partials/views.contributors.html @@ -0,0 +1,103 @@ +
+
+

+ Contributors view + + + +

+ +

Adds a Contributors view to visualize, navigate, and explore contributors

+
+ +
+
+
+
+
+
+ +
+ +
+
+

+ Chooses the best layout based on the number of files at each nesting level +

+
+ +
+
+ + +
+

Compacts (flattens) unnecessary nesting when using a tree layouts

+
+ +
+
+ + +
+
+
+
+ +
+ + + + +
+
+ +
+

+ For more options, open + User Settings + and search for gitlens.views.contributors or + gitlens.views +

+
+
+
diff --git a/src/webviews/apps/settings/partials/views.html b/src/webviews/apps/settings/partials/views.html index 8ba437c..7a31721 100644 --- a/src/webviews/apps/settings/partials/views.html +++ b/src/webviews/apps/settings/partials/views.html @@ -10,6 +10,7 @@ +

Adds rich views to visualize, navigate, and explore

diff --git a/src/webviews/apps/settings/partials/views.remotes.html b/src/webviews/apps/settings/partials/views.remotes.html new file mode 100644 index 0000000..b9b9654 --- /dev/null +++ b/src/webviews/apps/settings/partials/views.remotes.html @@ -0,0 +1,129 @@ +
+
+

+ Remotes view + + + +

+ +

Adds a Remotes view to visualize, navigate, and explore Git remotes

+
+ +
+
+
+
+
+
+ +
+ +
+
+
+ +
+
+ +
+ +
+
+
+ +
+
+ +
+ +
+
+

+ Chooses the best layout based on the number of files at each nesting level +

+
+ +
+
+ + +
+

Compacts (flattens) unnecessary nesting when using a tree layouts

+
+ +
+
+ + +
+
+
+
+ +
+ + + + +
+
+ +
+

+ For more options, open + User Settings + and search for gitlens.views.remotes or + gitlens.views +

+
+
+
diff --git a/src/webviews/apps/settings/partials/views.stashes.html b/src/webviews/apps/settings/partials/views.stashes.html new file mode 100644 index 0000000..8961f4f --- /dev/null +++ b/src/webviews/apps/settings/partials/views.stashes.html @@ -0,0 +1,82 @@ +
+
+

+ Stashes view + + + +

+ +

Adds a Stashes view to visualize, navigate, and explore Git stashes

+
+ +
+
+
+
+
+
+ +
+ +
+
+

+ Chooses the best layout based on the number of files at each nesting level +

+
+ +
+
+ + +
+

Compacts (flattens) unnecessary nesting when using a tree layouts

+
+
+
+ +
+ + + +
+
+ +
+

+ For more options, open + User Settings + and search for gitlens.views.stashes or + gitlens.views +

+
+
+
diff --git a/src/webviews/apps/settings/partials/views.tags.html b/src/webviews/apps/settings/partials/views.tags.html new file mode 100644 index 0000000..6cfb6e4 --- /dev/null +++ b/src/webviews/apps/settings/partials/views.tags.html @@ -0,0 +1,120 @@ +
+
+

+ Tags view + + + +

+ +

Adds a Tags view to visualize, navigate, and explore Git tags

+
+ +
+
+
+
+
+
+ +
+ +
+
+
+ +
+
+ +
+ +
+
+
+ +
+
+ +
+ +
+
+

+ Chooses the best layout based on the number of files at each nesting level +

+
+ +
+
+ + +
+

Compacts (flattens) unnecessary nesting when using a tree layouts

+
+ +
+
+ + +
+
+
+
+ +
+ + + + +
+
+ +
+

+ For more options, open + User Settings + and search for gitlens.views.tags or + gitlens.views +

+
+
+
diff --git a/src/webviews/apps/settings/settings.html b/src/webviews/apps/settings/settings.html index 30b9202..26716eb 100644 --- a/src/webviews/apps/settings/settings.html +++ b/src/webviews/apps/settings/settings.html @@ -180,10 +180,22 @@ <%= require('html-loader!./partials/views.repositories.html') %> + <%= require('html-loader!./partials/views.commits.html') %> + <%= require('html-loader!./partials/views.file-history.html') %> <%= require('html-loader!./partials/views.line-history.html') %> + <%= require('html-loader!./partials/views.branches.html') %> + + <%= require('html-loader!./partials/views.remotes.html') %> + + <%= require('html-loader!./partials/views.stashes.html') %> + + <%= require('html-loader!./partials/views.tags.html') %> + + <%= require('html-loader!./partials/views.contributors.html') %> + <%= require('html-loader!./partials/views.search.html') %> <%= require('html-loader!./partials/views.compare.html') %> @@ -266,6 +278,15 @@ Commits view + +
  • + File History viewBranches view +
  • +
  • + Remotes view +
  • +
  • + Stashes view +
  • +
  • + Tags view +
  • +
  • + Contributors view +
  • +
  • + Search Commits view