Pārlūkot izejas kodu

Removes enabled from Repos & Line History views

main
Eric Amodio pirms 3 gadiem
vecāks
revīzija
a7146939a8
20 mainītis faili ar 153 papildinājumiem un 217 dzēšanām
  1. +12
    -0
      CHANGELOG.md
  2. +5
    -2
      README.md
  3. +41
    -42
      package.json
  4. +0
    -2
      src/commands/common.ts
  5. +12
    -12
      src/commands/gitCommands.actions.ts
  6. +0
    -35
      src/commands/showView.ts
  7. +5
    -2
      src/config.ts
  8. +2
    -22
      src/container.ts
  9. +0
    -8
      src/views/lineHistoryView.ts
  10. +5
    -2
      src/webviews/apps/scss/settings.scss
  11. +4
    -6
      src/webviews/apps/settings/partials/views.branches.html
  12. +4
    -6
      src/webviews/apps/settings/partials/views.commits.html
  13. +3
    -3
      src/webviews/apps/settings/partials/views.contributors.html
  14. +3
    -2
      src/webviews/apps/settings/partials/views.file-history.html
  15. +11
    -15
      src/webviews/apps/settings/partials/views.line-history.html
  16. +4
    -6
      src/webviews/apps/settings/partials/views.remotes.html
  17. +31
    -42
      src/webviews/apps/settings/partials/views.repositories.html
  18. +3
    -2
      src/webviews/apps/settings/partials/views.searchAndCompare.html
  19. +4
    -6
      src/webviews/apps/settings/partials/views.stashes.html
  20. +4
    -2
      src/webviews/apps/settings/partials/views.tags.html

+ 12
- 0
CHANGELOG.md Parādīt failu

@ -16,6 +16,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- Adds a new _Copy Current Branch Name_ (`gitlens.copyCurrentBranch`) command to copy the current branch name to the clipboard — closes [#1306](https://github.com/eamodio/vscode-gitlens/issues/1306) — thanks to [PR #1307](https://github.com/eamodio/vscode-gitlens/pull/1307) by Ken Hom ([@kh0m](https://github.com/kh0m))
- Adds a _Switch to Text_ button on the _Interactive Rebase Editor_ to open the text rebase todo file — note that closing either document will start the rebase
- Adds a notification which asks if you want to create a pull request after publishing a new branch
- Adds a `gitlens.views.branches.reveal` setting to specify whether to reveal branches in the _Branches_ view, otherwise they will be revealed in the _Repositories_ view
- Adds a `gitlens.views.commits.reveal` setting to specify whether to reveal commits in the _Commits_ view, otherwise they will be revealed in the _Repositories_ view
- Adds a `gitlens.views.remotes.reveal` setting to specify whether to reveal remotes in the _Remotes_ view, otherwise they will be revealed in the _Repositories_ view
- Adds a `gitlens.views.stashes.reveal` setting to specify whether to reveal stashes in the _Stashes_ view, otherwise they will be revealed in the _Repositories_ view
- Adds a `gitlens.views.tags.reveal` setting to specify whether to reveal tags in the _Tags_ view, otherwise they will be revealed in the _Repositories_ view
- Adds a `gitlens.advanced.abbreviateShaOnCopy` setting to specify to whether to copy full or abbreviated commit SHAs to the clipboard. Abbreviates to the length of `gitlens.advanced.abbreviatedShaLength` — closes [#1062](https://github.com/eamodio/vscode-gitlens/issues/1062) — thanks to [PR #1316](https://github.com/eamodio/vscode-gitlens/pull/1316) by Brendon Smith ([@br3ndonland](https://github.com/br3ndonland))
- Adds a `gitlens.advanced.externalDiffTool` setting to specify an optional external diff tool to use when comparing files. Must be a configured [Git difftool](https://git-scm.com/docs/git-config#Documentation/git-config.txt-difftool).
- Adds a `gitlens.advanced.externalDirectoryDiffTool` setting to specify an optional external diff tool to use when comparing directories. Must be a configured [Git difftool](https://git-scm.com/docs/git-config#Documentation/git-config.txt-difftool).
@ -45,6 +50,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- Fixes an issue where _Publish Branch_ was incorrectly showing up on remote branches
- Fixes an issue where the _Open Directory Compare \*_ commands failed to work
### Removed
- Removes the `gitlens.repositories.enabled` setting, since the view is toggleable as any other view now
- Removes the `gitlens.lineHistory.enabled` setting, since the view is toggleable as any other view now
- Removes the _Hide Repositories view_ command, since the view is toggleable as any other view now
- Removes the _Hide Line History view_ command, since the view is toggleable as any other view now
## [11.1.3] - 2021-01-05
### Fixed

+ 5
- 2
README.md Parādīt failu

@ -720,6 +720,7 @@ See also [View Settings](#view-settings- 'Jump to the View settings')
| `gitlens.views.commits.pullRequests.enabled` | Specifies whether to query for pull requests associated with the current branch and commits in the _Commits_ view. Requires a connection to a supported remote service (e.g. GitHub) |
| `gitlens.views.commits.pullRequests.showForBranches` | Specifies whether to query for pull requests associated with the current branch and commits in the _Commits_ view. Requires a connection to a supported remote service (e.g. GitHub) |
| `gitlens.views.commits.pullRequests.showForCommits` | Specifies whether to show pull requests (if any) associated with the current branch in the _Commits_ view. Requires a connection to a supported remote service (e.g. GitHub) |
| `gitlens.views.commits.reveal` | Specifies whether to reveal commits in the _Commits_ view, otherwise they will be revealed in the _Repositories_ view |
| `gitlens.views.commits.showBranchComparison` | Specifies whether to show a comparison of the current branch or the working tree with a user-selected reference (branch, tag. etc) in the _Commits_ view<br /><br />`false` - hides the branch comparison<br />`branch` - compares the current branch with a user-selected reference<br />`working` - compares the working tree with a user-selected reference |
## Repositories View Settings [#](#repositories-view-settings- 'Repositories View Settings')
@ -734,7 +735,6 @@ See also [View Settings](#view-settings- 'Jump to the View settings')
| `gitlens.views.repositories.branches.layout` | Specifies how the _Repositories_ view will display branches<br /><br />`list` - displays branches as a list<br />`tree` - displays branches as a tree when branch names contain slashes `/` |
| `gitlens.views.repositories.branches.showBranchComparison` | Specifies whether to show a comparison of the branch with a user-selected reference (branch, tag. etc) under each branch in the _Repositories_ view view |
| `gitlens.views.repositories.compact` | Specifies whether to show the _Repositories_ view in a compact display density |
| `gitlens.views.repositories.enabled` | Specifies whether to show the _Repositories_ view |
| `gitlens.views.repositories.files.compact` | Specifies whether to compact (flatten) unnecessary file nesting in the _Repositories_ view. Only applies when `gitlens.views.repositories.files.layout` is set to `tree` or `auto` |
| `gitlens.views.repositories.files.layout` | Specifies how the _Repositories_ view will display files<br /><br />`auto` - automatically switches between displaying files as a `tree` or `list` based on the `gitlens.views.repositories.files.threshold` value and the number of files at each nesting level<br />`list` - displays files as a list<br />`tree` - displays files as a tree |
| `gitlens.views.repositories.files.threshold` | Specifies when to switch between displaying files as a `tree` or `list` based on the number of files in a nesting level in the _Repositories_ view. Only applies when `gitlens.views.repositories.files.layout` is set to `auto` |
@ -764,7 +764,6 @@ See also [View Settings](#view-settings- 'Jump to the View settings')
| Name | Description |
| ----------------------------------- | ------------------------------------------------------------------------------------------ |
| `gitlens.views.lineHistory.avatars` | Specifies whether to show avatar images instead of status icons in the _Line History_ view |
| `gitlens.views.lineHistory.enabled` | Specifies whether to show the _Line History_ view |
## Branches View Settings [#](#branches-view-settings- 'Branches View Settings')
@ -780,6 +779,7 @@ See also [View Settings](#view-settings- 'Jump to the View settings')
| `gitlens.views.branches.pullRequests.enabled` | Specifies whether to query for pull requests associated with the current branch and commits in the _Branches_ view. Requires a connection to a supported remote service (e.g. GitHub) |
| `gitlens.views.branches.pullRequests.showForBranches` | Specifies whether to query for pull requests associated with the current branch and commits in the _Branches_ view. Requires a connection to a supported remote service (e.g. GitHub) |
| `gitlens.views.branches.pullRequests.showForCommits` | Specifies whether to show pull requests (if any) associated with the current branch in the _Branches_ view. Requires a connection to a supported remote service (e.g. GitHub) |
| `gitlens.views.branches.reveal` | Specifies whether to reveal branches in the _Branches_ view, otherwise they will be revealed in the _Repositories_ view |
| `gitlens.views.branches.showBranchComparison` | Specifies whether to show a comparison of the branch with a user-selected reference (branch, tag. etc) in the _Branches_ view<br /><br />`false` - hides the branch comparison<br />`branch` - compares the current branch with a user-selected reference |
## Remotes View Settings [#](#remotes-view-settings- 'Remotes View Settings')
@ -796,6 +796,7 @@ See also [View Settings](#view-settings- 'Jump to the View settings')
| `gitlens.views.remotes.pullRequests.enabled` | Specifies whether to query for pull requests associated with the current branch and commits in the _Remotes_ view. Requires a connection to a supported remote service (e.g. GitHub) |
| `gitlens.views.remotes.pullRequests.showForBranches` | Specifies whether to query for pull requests associated with the current branch and commits in the _Remotes_ view. Requires a connection to a supported remote service (e.g. GitHub) |
| `gitlens.views.remotes.pullRequests.showForCommits` | Specifies whether to show pull requests (if any) associated with the current branch in the _Remotes_ view. Requires a connection to a supported remote service (e.g. GitHub) |
| `gitlens.views.remotes.reveal` | Specifies whether to reveal remotes in the _Remotes_ view, otherwise they will be revealed in the _Repositories_ view |
| `gitlens.views.remotes.showBranchComparison` | Specifies whether to show a comparison of the branch with a user-selected reference (branch, tag. etc) in the _Remotes_ view<br /><br />`false` - hides the branch comparison<br />`branch` - compares the current branch with a user-selected reference |
## Stashes View Settings [#](#stashes-view-settings- 'Stashes View Settings')
@ -807,6 +808,7 @@ See also [View Settings](#view-settings- 'Jump to the View settings')
| `gitlens.views.stashes.files.compact` | Specifies whether to compact (flatten) unnecessary file nesting in the _Stashes_ view.<br />Only applies when `gitlens.views.commits.files.layout` is set to `tree` or `auto` |
| `gitlens.views.stashes.files.layout` | Specifies how the _Stashes_ view will display files<br /><br />`auto` - automatically switches between displaying files as a `tree` or `list` based on the `gitlens.views.commits.files.threshold` value and the number of files at each nesting level<br />`list` - displays files as a list<br />`tree` - displays files as a tree |
| `gitlens.views.stashes.files.threshold` | Specifies when to switch between displaying files as a `tree` or `list` based on the number of files in a nesting level in the _Stashes_ view<br />Only applies when `gitlens.views.commits.files.layout` is set to `auto` |
| `gitlens.views.stashes.reveal` | Specifies whether to reveal stashes in the _Stashes_ view, otherwise they will be revealed in the _Repositories_ view |
## Tags View Settings [#](#tags-view-settings- 'Tags View Settings')
@ -819,6 +821,7 @@ See also [View Settings](#view-settings- 'Jump to the View settings')
| `gitlens.views.tags.files.compact` | Specifies whether to compact (flatten) unnecessary file nesting in the _Tags_ view.<br />Only applies when `gitlens.views.commits.files.layout` is set to `tree` or `auto` |
| `gitlens.views.tags.files.layout` | Specifies how the _Tags_ view will display files<br /><br />`auto` - automatically switches between displaying files as a `tree` or `list` based on the `gitlens.views.commits.files.threshold` value and the number of files at each nesting level<br />`list` - displays files as a list<br />`tree` - displays files as a tree |
| `gitlens.views.tags.files.threshold` | Specifies when to switch between displaying files as a `tree` or `list` based on the number of files in a nesting level in the _Tags_ view<br />Only applies when `gitlens.views.commits.files.layout` is set to `auto` |
| `gitlens.views.tags.reveal` | Specifies whether to reveal tags in the _Tags_ view, otherwise they will be revealed in the _Repositories_ view |
## Contributors View Settings [#](#contributors-view-settings- 'Contributors View Settings')

+ 41
- 42
package.json Parādīt failu

@ -1747,6 +1747,12 @@
"markdownDescription": "Specifies whether to show pull requests (if any) associated with commits in the _Branches_ view. Requires a connection to a supported remote service (e.g. GitHub)",
"scope": "window"
},
"gitlens.views.branches.reveal": {
"type": "boolean",
"default": true,
"markdownDescription": "Specifies whether to reveal branches in the _Branches_ view, otherwise they revealed in the _Repositories_ view",
"scope": "window"
},
"gitlens.views.branches.showBranchComparison": {
"anyOf": [
{
@ -1836,6 +1842,12 @@
"markdownDescription": "Specifies whether to show pull requests (if any) associated with commits in the _Commits_ view. Requires a connection to a supported remote service (e.g. GitHub)",
"scope": "window"
},
"gitlens.views.commits.reveal": {
"type": "boolean",
"default": true,
"markdownDescription": "Specifies whether to reveal commits in the _Commits_ view, otherwise they revealed in the _Repositories_ view",
"scope": "window"
},
"gitlens.views.commits.showBranchComparison": {
"anyOf": [
{
@ -1960,10 +1972,8 @@
"scope": "window"
},
"gitlens.views.lineHistory.enabled": {
"type": "boolean",
"default": false,
"markdownDescription": "Specifies whether to show the _Line History_ view",
"scope": "window"
"deprecationMessage": "Deprecated. This setting is no longer used",
"markdownDeprecationMessage": "Deprecated. This setting is no longer used"
},
"gitlens.views.pageItemLimit": {
"type": "number",
@ -2037,6 +2047,12 @@
"markdownDescription": "Specifies whether to show pull requests (if any) associated with commits in the _Remotes_ view. Requires a connection to a supported remote service (e.g. GitHub)",
"scope": "window"
},
"gitlens.views.remotes.reveal": {
"type": "boolean",
"default": true,
"markdownDescription": "Specifies whether to reveal remotes in the _Remotes_ view, otherwise they revealed in the _Repositories_ view",
"scope": "window"
},
"gitlens.views.repositories.autoRefresh": {
"type": "boolean",
"default": true,
@ -2097,10 +2113,8 @@
"scope": "window"
},
"gitlens.views.repositories.enabled": {
"type": "boolean",
"default": false,
"markdownDescription": "Specifies whether to show the _Repositories_ view",
"scope": "window"
"deprecationMessage": "Deprecated. This setting is no longer used",
"markdownDeprecationMessage": "Deprecated. This setting is no longer used"
},
"gitlens.views.repositories.files.compact": {
"type": "boolean",
@ -2321,6 +2335,12 @@
"markdownDescription": "Specifies when to switch between displaying files as a `tree` or `list` based on the number of files in a nesting level in the _Stashes_ view. Only applies when `#gitlens.views.stashes.files.layout#` is set to `auto`",
"scope": "window"
},
"gitlens.views.stashes.reveal": {
"type": "boolean",
"default": true,
"markdownDescription": "Specifies whether to reveal stashes in the _Stashes_ view, otherwise they revealed in the _Repositories_ view",
"scope": "window"
},
"gitlens.views.statusFileFormat": {
"deprecationMessage": "Deprecated. Use `gitlens.views.formats.files.label` instead",
"markdownDeprecationMessage": "Deprecated. Use `#gitlens.views.formats.files.label#` instead"
@ -2377,6 +2397,12 @@
"markdownDescription": "Specifies when to switch between displaying files as a `tree` or `list` based on the number of files in a nesting level in the _Tags_ view. Only applies when `#gitlens.views.tags.files.layout#` is set to `auto`",
"scope": "window"
},
"gitlens.views.tags.reveal": {
"type": "boolean",
"default": true,
"markdownDescription": "Specifies whether to reveal tags in the _Tags_ view, otherwise they revealed in the _Repositories_ view",
"scope": "window"
},
"gitlens.advanced.abbreviatedShaLength": {
"type": "number",
"default": 7,
@ -2842,11 +2868,6 @@
"category": "GitLens"
},
{
"command": "gitlens.hideLineHistoryView",
"title": "Hide Line History View",
"category": "GitLens"
},
{
"command": "gitlens.showRemotesView",
"title": "Show Remotes View",
"category": "GitLens"
@ -2857,11 +2878,6 @@
"category": "GitLens"
},
{
"command": "gitlens.hideRepositoriesView",
"title": "Hide Repositories View",
"category": "GitLens"
},
{
"command": "gitlens.showSearchAndCompareView",
"title": "Show Search And Compare Commits View",
"category": "GitLens"
@ -4875,10 +4891,6 @@
"when": "gitlens:enabled"
},
{
"command": "gitlens.hideLineHistoryView",
"when": "gitlens:enabled && config.gitlens.views.lineHistory.enabled"
},
{
"command": "gitlens.showRemotesView",
"when": "gitlens:enabled"
},
@ -4887,10 +4899,6 @@
"when": "gitlens:enabled"
},
{
"command": "gitlens.hideRepositoriesView",
"when": "gitlens:enabled && config.gitlens.views.repositories.enabled"
},
{
"command": "gitlens.showSearchAndCompareView",
"when": "gitlens:enabled"
},
@ -6638,12 +6646,7 @@
},
{
"command": "gitlens.showRepositoriesView",
"when": "view =~ /^gitlens\\.views\\.commits/ && !config.gitlens.views.repositories.enabled",
"group": "8_gitlens_toggles@0"
},
{
"command": "gitlens.hideRepositoriesView",
"when": "view =~ /^gitlens\\.views\\.commits/ && config.gitlens.views.repositories.enabled",
"when": "view =~ /^gitlens\\.views\\.commits/",
"group": "8_gitlens_toggles@0"
},
{
@ -6748,12 +6751,7 @@
},
{
"command": "gitlens.showLineHistoryView",
"when": "view =~ /^gitlens\\.views\\.fileHistory/ && !config.gitlens.views.lineHistory.enabled",
"group": "8_gitlens_toggles@0"
},
{
"command": "gitlens.hideLineHistoryView",
"when": "view =~ /^gitlens\\.views\\.fileHistory/ && config.gitlens.views.lineHistory.enabled",
"when": "view =~ /^gitlens\\.views\\.fileHistory/",
"group": "8_gitlens_toggles@0"
},
{
@ -9023,9 +9021,10 @@
{
"id": "gitlens.views.repositories",
"name": "Repositories",
"when": "!gitlens:disabled && config.gitlens.views.repositories.enabled",
"when": "!gitlens:disabled",
"contextualTitle": "GitLens",
"icon": "images/views/repositories.svg"
"icon": "images/views/repositories.svg",
"visibility": "hidden"
},
{
"id": "gitlens.views.fileHistory",
@ -9038,7 +9037,7 @@
{
"id": "gitlens.views.lineHistory",
"name": "Line History",
"when": "gitlens:enabled && config.gitlens.views.lineHistory.enabled",
"when": "!gitlens:disabled",
"contextualTitle": "GitLens",
"icon": "images/views/history.svg",
"visibility": "hidden"
@ -9089,7 +9088,7 @@
"when": "!gitlens:disabled",
"contextualTitle": "GitLens",
"icon": "images/views/search.svg",
"visibility": "hidden"
"visibility": "collapsed"
}
]
}

+ 0
- 2
src/commands/common.ts Parādīt failu

@ -74,8 +74,6 @@ export enum Commands {
ExternalDiff = 'gitlens.externalDiff',
ExternalDiffAll = 'gitlens.externalDiffAll',
FetchRepositories = 'gitlens.fetchRepositories',
HideLineHistoryView = 'gitlens.hideLineHistoryView',
HideRepositoriesView = 'gitlens.hideRepositoriesView',
InviteToLiveShare = 'gitlens.inviteToLiveShare',
OpenChangedFiles = 'gitlens.openChangedFiles',
OpenBranchesOnRemote = 'gitlens.openBranchesOnRemote',

+ 12
- 12
src/commands/gitCommands.actions.ts Parādīt failu

@ -151,18 +151,18 @@ export namespace GitActions {
},
) {
if (
configuration.get('views', 'repositories', 'enabled') &&
(Container.repositoriesView.visible ||
(branch.remote ? !Container.remotesView.visible : !Container.branchesView.visible))
!configuration.get('views', branch.remote ? 'remotes' : 'branches', 'reveal') ||
(Container.repositoriesView.visible &&
!(branch.remote ? Container.remotesView.visible : Container.branchesView.visible))
) {
return Container.repositoriesView.revealBranch(branch, options);
}
let node;
if (!branch.remote) {
node = await Container.branchesView.revealBranch(branch, options);
} else {
if (branch.remote) {
node = await Container.remotesView.revealBranch(branch, options);
} else {
node = await Container.branchesView.revealBranch(branch, options);
}
return node;
@ -647,8 +647,8 @@ export namespace GitActions {
},
) {
if (
configuration.get('views', 'repositories', 'enabled') &&
(Container.repositoriesView.visible || !Container.commitsView.visible)
!configuration.get('views', 'commits', 'reveal') ||
(Container.repositoriesView.visible && !Container.commitsView.visible)
) {
return Container.repositoriesView.revealCommit(commit, options);
}
@ -710,8 +710,8 @@ export namespace GitActions {
},
) {
if (
configuration.get('views', 'repositories', 'enabled') &&
(Container.repositoriesView.visible || !Container.tagsView.visible)
!configuration.get('views', 'tags', 'reveal') ||
(Container.repositoriesView.visible && !Container.tagsView.visible)
) {
return Container.repositoriesView.revealTag(tag, options);
}
@ -835,8 +835,8 @@ export namespace GitActions {
},
) {
if (
configuration.get('views', 'repositories', 'enabled') &&
(Container.repositoriesView.visible || !Container.stashesView.visible)
!configuration.get('views', 'stashes', 'reveal') ||
(Container.repositoriesView.visible && !Container.stashesView.visible)
) {
return Container.repositoriesView.revealStash(stash, options);
}

+ 0
- 35
src/commands/showView.ts Parādīt failu

@ -1,7 +1,6 @@
'use strict';
import { commands } from 'vscode';
import { command, Command, CommandContext, Commands } from './common';
import { configuration } from '../configuration';
import { ContextKeys, setContext, SyncedState } from '../constants';
import { Container } from '../container';
@ -38,16 +37,10 @@ export class ShowViewCommand extends Command {
case Commands.ShowFileHistoryView:
return Container.fileHistoryView.show();
case Commands.ShowLineHistoryView:
if (!Container.config.views.lineHistory.enabled) {
await configuration.updateEffective('views', 'lineHistory', 'enabled', true);
}
return Container.lineHistoryView.show();
case Commands.ShowRemotesView:
return Container.remotesView.show();
case Commands.ShowRepositoriesView:
if (!Container.config.views.repositories.enabled) {
await configuration.updateEffective('views', 'repositories', 'enabled', true);
}
return Container.repositoriesView.show();
case Commands.ShowSearchAndCompareView:
return Container.searchAndCompareView.show();
@ -64,31 +57,3 @@ export class ShowViewCommand extends Command {
return Promise.resolve(undefined);
}
}
@command()
export class HideViewCommand extends Command {
constructor() {
super([Commands.HideLineHistoryView, Commands.HideRepositoriesView]);
}
protected preExecute(context: CommandContext) {
return this.execute(context.command as Commands);
}
async execute(command: Commands) {
switch (command) {
case Commands.HideLineHistoryView:
if (Container.config.views.lineHistory.enabled) {
await configuration.updateEffective('views', 'lineHistory', 'enabled', false);
}
break;
case Commands.HideRepositoriesView:
if (Container.config.views.repositories.enabled) {
await configuration.updateEffective('views', 'repositories', 'enabled', false);
}
break;
}
return Promise.resolve(undefined);
}
}

+ 5
- 2
src/config.ts Parādīt failu

@ -510,6 +510,7 @@ export interface BranchesViewConfig {
showForBranches: boolean;
showForCommits: boolean;
};
reveal: boolean;
showBranchComparison: false | ViewShowBranchComparison.Branch;
}
@ -522,6 +523,7 @@ export interface CommitsViewConfig {
showForBranches: boolean;
showForCommits: boolean;
};
reveal: boolean;
showBranchComparison: false | ViewShowBranchComparison;
}
@ -540,7 +542,6 @@ export interface FileHistoryViewConfig {
export interface LineHistoryViewConfig {
avatars: boolean;
enabled: boolean;
}
export interface RemotesViewConfig {
@ -554,6 +555,7 @@ export interface RemotesViewConfig {
showForBranches: boolean;
showForCommits: boolean;
};
reveal: boolean;
}
export interface RepositoriesViewConfig {
@ -565,7 +567,6 @@ export interface RepositoriesViewConfig {
showBranchComparison: false | ViewShowBranchComparison.Branch;
};
compact: boolean;
enabled: boolean;
files: ViewsFilesConfig;
includeWorkingTree: boolean;
pullRequests: {
@ -595,6 +596,7 @@ export interface SearchAndCompareViewConfig {
export interface StashesViewConfig {
files: ViewsFilesConfig;
reveal: boolean;
}
export interface TagsViewConfig {
@ -603,6 +605,7 @@ export interface TagsViewConfig {
layout: ViewBranchesLayout;
};
files: ViewsFilesConfig;
reveal: boolean;
}
export interface ViewsFilesConfig {

+ 2
- 22
src/container.ts Parādīt failu

@ -66,8 +66,10 @@ export class Container {
context.subscriptions.push((this._settingsWebview = new SettingsWebview()));
context.subscriptions.push((this._welcomeWebview = new WelcomeWebview()));
context.subscriptions.push((this._repositoriesView = new RepositoriesView()));
context.subscriptions.push((this._commitsView = new CommitsView()));
context.subscriptions.push((this._fileHistoryView = new FileHistoryView()));
context.subscriptions.push((this._lineHistoryView = new LineHistoryView()));
context.subscriptions.push((this._branchesView = new BranchesView()));
context.subscriptions.push((this._remotesView = new RemotesView()));
context.subscriptions.push((this._stashesView = new StashesView()));
@ -75,28 +77,6 @@ export class Container {
context.subscriptions.push((this._contributorsView = new ContributorsView()));
context.subscriptions.push((this._searchAndCompareView = new SearchAndCompareView()));
if (config.views.lineHistory.enabled) {
context.subscriptions.push((this._lineHistoryView = new LineHistoryView()));
} else {
const disposable = configuration.onDidChange(e => {
if (configuration.changed(e, 'views', 'lineHistory', 'enabled')) {
disposable.dispose();
context.subscriptions.push((this._lineHistoryView = new LineHistoryView()));
}
});
}
if (config.views.repositories.enabled) {
context.subscriptions.push((this._repositoriesView = new RepositoriesView()));
} else {
const disposable = configuration.onDidChange(e => {
if (configuration.changed(e, 'views', 'repositories', 'enabled')) {
disposable.dispose();
context.subscriptions.push((this._repositoriesView = new RepositoriesView()));
}
});
}
context.subscriptions.push((this._rebaseEditor = new RebaseEditorProvider()));
if (config.terminalLinks.enabled) {

+ 0
- 8
src/views/lineHistoryView.ts Parādīt failu

@ -64,14 +64,6 @@ export class LineHistoryView extends ViewBase
return true;
}
protected onConfigurationChanged(e: ConfigurationChangeEvent) {
if (configuration.changed(e, 'views', this.configKey, 'enabled')) {
void setContext(ContextKeys.ViewsLineHistoryEditorFollowing, true);
}
super.onConfigurationChanged(e);
}
private changeBase() {
void this.root?.changeBase();
}

+ 5
- 2
src/webviews/apps/scss/settings.scss Parādīt failu

@ -39,14 +39,17 @@ header {
}
.command--show-view {
&:before {
padding: 1px;
margin-right: 4px;
&:after {
content: '\eb14';
font-family: codicon;
font-size: 14px;
font-weight: 400;
position: relative;
top: 3px;
left: -1px;
left: 3px;
}
}

+ 4
- 6
src/webviews/apps/settings/partials/views.branches.html Parādīt failu

@ -12,12 +12,10 @@
</h2>
<p class="section__header-hint">
Adds a Branches view
<a
class="command command--show-view"
title="Show View in Side Bar"
href="command:gitlens.showBranchesView"
></a>
Adds a
<a class="command command--show-view" title="Show View in Side Bar" href="command:gitlens.showBranchesView"
>Branches view</a
>
to visualize, explore, and manage Git branches
</p>
</div>

+ 4
- 6
src/webviews/apps/settings/partials/views.commits.html Parādīt failu

@ -12,12 +12,10 @@
</h2>
<p class="section__header-hint">
Adds a Commits view
<a
class="command command--show-view"
title="Show View in Side Bar"
href="command:gitlens.showCommitsView"
></a>
Adds a
<a class="command command--show-view" title="Show View in Side Bar" href="command:gitlens.showCommitsView"
>Commits view</a
>
to visualize, explore, and manage Git commits
</p>
</div>

+ 3
- 3
src/webviews/apps/settings/partials/views.contributors.html Parādīt failu

@ -12,13 +12,13 @@
</h2>
<p class="section__header-hint">
Adds a Contributors view
Adds a
<a
class="command command--show-view"
title="Show View in Side Bar"
href="command:gitlens.showContributorsView"
></a>
to visualize, navigate, and explore contributors
>Contributors view</a
>, hidden by default, to visualize, navigate, and explore contributors
</p>
</div>

+ 3
- 2
src/webviews/apps/settings/partials/views.file-history.html Parādīt failu

@ -12,12 +12,13 @@
</h2>
<p class="section__header-hint">
Adds a File History view
Adds a
<a
class="command command--show-view"
title="Show View in Side Bar"
href="command:gitlens.showFileHistoryView"
></a>
>File History view</a
>
to visualize, navigate, and explore the revision history of the current file or just the selected lines of
the current file
</p>

+ 11
- 15
src/webviews/apps/settings/partials/views.line-history.html Parādīt failu

@ -1,8 +1,7 @@
<section id="line-history-view" class="section--settings section--collapsible">
<div class="section__header">
<div class="setting__input setting__input--big">
<input id="views.lineHistory.enabled" name="views.lineHistory.enabled" type="checkbox" data-setting />
<label for="views.lineHistory.enabled">Line History view</label>
<h2>
Line History view
<a
class="link__learn-more"
title="Learn more"
@ -10,16 +9,17 @@
>
<i class="icon icon__info"></i>
</a>
</div>
</h2>
<p class="section__header-hint">
Adds a Line History view
Adds a
<a
class="command command--show-view"
title="Show View in Side Bar"
href="command:gitlens.showLineHistoryView"
></a>
to visualize, navigate, and explore the revision history of the selected lines of current file
>Line History view</a
>, hidden by default, to visualize, navigate, and explore the revision history of the selected lines of
current file
</p>
</div>
@ -27,7 +27,7 @@
<div class="section__group">
<div class="section__content">
<div class="settings settings--fixed ml-1">
<div class="setting" data-enablement="views.lineHistory.enabled">
<div class="setting">
<div class="setting__input">
<input
id="views.lineHistory.avatars"
@ -42,16 +42,12 @@
</div>
</div>
<div class="section__preview" data-visibility="views.lineHistory.enabled">
<img
class="image__preview hidden"
src="#{root}/images/settings/line-history-view.webp"
data-visibility="views.lineHistory.enabled"
/>
<div class="section__preview">
<img class="image__preview" src="#{root}/images/settings/line-history-view.webp" />
<img
class="image__preview--overlay hidden"
src="#{root}/images/settings/line-history-view-avatars.webp"
data-visibility="views.lineHistory.enabled &amp; views.lineHistory.avatars"
data-visibility="views.lineHistory.avatars"
/>
</div>
</div>

+ 4
- 6
src/webviews/apps/settings/partials/views.remotes.html Parādīt failu

@ -12,12 +12,10 @@
</h2>
<p class="section__header-hint">
Adds a Remotes view
<a
class="command command--show-view"
title="Show View in Side Bar"
href="command:gitlens.showRemotesView"
></a>
Adds a
<a class="command command--show-view" title="Show View in Side Bar" href="command:gitlens.showRemotesView"
>Remotes view</a
>
to visualize, explore, and manage Git remotes and remote branches
</p>
</div>

+ 31
- 42
src/webviews/apps/settings/partials/views.repositories.html Parādīt failu

@ -1,8 +1,7 @@
<section id="repositories-view" class="section--settings section--collapsible">
<div class="section__header">
<div class="setting__input setting__input--big">
<input id="views.repositories.enabled" name="views.repositories.enabled" type="checkbox" data-setting />
<label for="views.repositories.enabled">Repositories view</label>
<h2>
Repositories view
<a
class="link__learn-more"
title="Learn more"
@ -10,16 +9,16 @@
>
<i class="icon icon__info"></i>
</a>
</div>
</h2>
<p class="section__header-hint">
Adds a Repositories view
Adds a
<a
class="command command--show-view"
title="Show View in Side Bar"
href="command:gitlens.showRepositoriesView"
></a>
to visualize, explore, and manage Git repositories
>Repositories view</a
>, hidden by default, to visualize, explore, and manage Git repositories
</p>
</div>
@ -27,14 +26,14 @@
<div class="section__group">
<div class="section__content">
<div class="settings settings--fixed ml-1">
<div class="setting" data-enablement="views.repositories.enabled">
<div class="setting">
<div class="setting__input">
<label class="non-interactive">Show the following sections under each repository</label>
</div>
</div>
<div class="settings ml-2">
<div class="setting" data-enablement="views.repositories.enabled">
<div class="setting">
<div class="setting__input setting__input--inner-select">
<input
id="views.repositories.showBranchComparison"
@ -50,7 +49,7 @@
id="views.repositories.showBranchComparison"
name="views.repositories.showBranchComparison"
data-setting
data-enablement="views.repositories.enabled &amp; views.repositories.showBranchComparison !false"
data-enablement="views.repositories.showBranchComparison !false"
disabled
>
<option value="branch">current branch</option>
@ -63,7 +62,7 @@
</div>
</div>
<div class="setting" data-enablement="views.repositories.enabled">
<div class="setting">
<div class="setting__input">
<input
id="views.repositories.showUpstreamStatus"
@ -76,7 +75,7 @@
</div>
</div>
<div class="setting" data-enablement="views.repositories.enabled">
<div class="setting">
<div class="setting__input">
<input
id="views.repositories.includeWorkingTree"
@ -92,7 +91,7 @@
<div class="section__group">
<div class="section__content">
<div class="settings settings--fixed">
<div class="setting" data-enablement="views.repositories.enabled">
<div class="setting">
<div class="setting__input">
<input
id="views.repositories.pullRequests.enabled"
@ -111,10 +110,7 @@
</div>
<div class="settings settings--fixed ml-2">
<div
class="setting"
data-enablement="views.repositories.enabled &amp; views.repositories.pullRequests.enabled"
>
<div class="setting" data-enablement="views.repositories.pullRequests.enabled">
<div class="setting__input">
<input
id="views.repositories.pullRequests.showForBranches"
@ -129,10 +125,7 @@
</div>
</div>
<div
class="setting"
data-enablement="views.repositories.enabled &amp; views.repositories.pullRequests.enabled"
>
<div class="setting" data-enablement="views.repositories.pullRequests.enabled">
<div class="setting__input">
<input
id="views.repositories.pullRequests.showForCommits"
@ -151,7 +144,7 @@
</div>
</div>
<div class="setting" data-enablement="views.repositories.enabled">
<div class="setting">
<div class="setting__input">
<input
id="views.repositories.showCommits"
@ -164,7 +157,7 @@
</div>
</div>
<div class="setting" data-enablement="views.repositories.enabled">
<div class="setting">
<div class="setting__input">
<input
id="views.repositories.showBranches"
@ -177,7 +170,7 @@
</div>
</div>
<div class="setting" data-enablement="views.repositories.enabled">
<div class="setting">
<div class="setting__input">
<input
id="views.repositories.showRemotes"
@ -190,7 +183,7 @@
</div>
</div>
<div class="setting" data-enablement="views.repositories.enabled">
<div class="setting">
<div class="setting__input">
<input
id="views.repositories.showStashes"
@ -203,7 +196,7 @@
</div>
</div>
<div class="setting" data-enablement="views.repositories.enabled">
<div class="setting">
<div class="setting__input">
<input
id="views.repositories.showTags"
@ -216,7 +209,7 @@
</div>
</div>
<div class="setting" data-enablement="views.repositories.enabled">
<div class="setting">
<div class="setting__input">
<input
id="views.repositories.showContributors"
@ -229,7 +222,7 @@
</div>
</div>
<div class="setting" data-enablement="views.repositories.enabled">
<div class="setting">
<div class="setting__input">
<input
id="views.repositories.showIncomingActivity"
@ -245,7 +238,7 @@
</div>
</div>
<div class="setting" data-enablement="views.repositories.enabled">
<div class="setting">
<div class="setting__input">
<input
id="views.repositories.autoRefresh"
@ -260,7 +253,7 @@
</div>
</div>
<div class="setting" data-enablement="views.repositories.enabled">
<div class="setting">
<div class="setting__input">
<input
id="views.repositories.autoReveal"
@ -275,7 +268,7 @@
</div>
</div>
<div class="setting" data-enablement="views.repositories.enabled">
<div class="setting">
<div class="setting__input">
<input
id="views.repositories.avatars"
@ -288,7 +281,7 @@
</div>
</div>
<div class="setting" data-enablement="views.repositories.enabled">
<div class="setting">
<div class="setting__input">
<label for="views.repositories.branches.layout">Layout branches</label>
<div class="select-container">
@ -305,7 +298,7 @@
</div>
</div>
<div class="setting" data-enablement="views.repositories.enabled">
<div class="setting">
<div class="setting__input">
<label for="views.repositories.files.layout">Layout files</label>
<div class="select-container">
@ -326,7 +319,7 @@
</p>
</div>
<div class="setting" data-enablement="views.repositories.enabled">
<div class="setting">
<div class="setting__input">
<input
id="views.repositories.files.compact"
@ -340,7 +333,7 @@
<p class="setting__hint">Compacts (flattens) unnecessary nesting when using a tree layouts</p>
</div>
<div class="setting" data-enablement="views.repositories.enabled">
<div class="setting">
<div class="setting__input">
<label for="sortBranchesBy">Sort branches</label>
<div class="select-container">
@ -354,7 +347,7 @@
</div>
</div>
<div class="setting" data-enablement="views.repositories.enabled">
<div class="setting">
<div class="setting__input">
<label for="sortTagsBy">Sort tags</label>
<div class="select-container">
@ -370,12 +363,8 @@
</div>
</div>
<div class="section__preview" data-visibility="views.repositories.enabled">
<img
class="image__preview hidden"
src="#{root}/images/settings/repositories-view.webp"
data-visibility="views.repositories.enabled"
/>
<div class="section__preview">
<img class="image__preview" src="#{root}/images/settings/repositories-view.webp" />
</div>
</div>

+ 3
- 2
src/webviews/apps/settings/partials/views.searchAndCompare.html Parādīt failu

@ -12,12 +12,13 @@
</h2>
<p class="section__header-hint">
Adds a Search &amp; Compare view
Adds a
<a
class="command command--show-view"
title="Show View in Side Bar"
href="command:gitlens.showSearchAndCompareView"
></a>
>Search &amp; Compare view</a
>
to search and explore commit histories by message, author, files, id, etc, or visualize comparisons between
branches, tags, commits, and more
</p>

+ 4
- 6
src/webviews/apps/settings/partials/views.stashes.html Parādīt failu

@ -12,12 +12,10 @@
</h2>
<p class="section__header-hint">
Adds a Stashes view
<a
class="command command--show-view"
title="Show View in Side Bar"
href="command:gitlens.showStashesView"
></a>
Adds a
<a class="command command--show-view" title="Show View in Side Bar" href="command:gitlens.showStashesView"
>Stashes view</a
>
to visualize, explore, and manage Git stashes
</p>
</div>

+ 4
- 2
src/webviews/apps/settings/partials/views.tags.html Parādīt failu

@ -8,8 +8,10 @@
</h2>
<p class="section__header-hint">
Adds a Tags view
<a class="command command--show-view" title="Show View in Side Bar" href="command:gitlens.showTagsView"></a>
Adds a
<a class="command command--show-view" title="Show View in Side Bar" href="command:gitlens.showTagsView"
>Tags view</a
>
to visualize, explore, and manage Git tags
</p>
</div>

Notiek ielāde…
Atcelt
Saglabāt