Selaa lähdekoodia

Requires vscode 1.20

Adds inline commands to explorer
main
Eric Amodio 6 vuotta sitten
vanhempi
commit
e45f63621b
12 muutettua tiedostoa jossa 78 lisäystä ja 15 poistoa
  1. +2
    -0
      CHANGELOG.md
  2. +5
    -0
      images/dark/icon-close-small.svg
  3. +4
    -0
      images/dark/icon-open-file.svg
  4. +0
    -0
      images/dark/icon-open-working-file.svg
  5. +5
    -0
      images/light/icon-close-small.svg
  6. +4
    -0
      images/light/icon-open-file.svg
  7. +0
    -0
      images/light/icon-open-working-file.svg
  8. +48
    -5
      package.json
  9. +1
    -1
      src/views/branchFolderNode.ts
  10. +1
    -1
      src/views/folderNode.ts

+ 2
- 0
CHANGELOG.md Näytä tiedosto

@ -7,6 +7,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
## [Unreleased]
### Added
- Adds `gitlens.statusBar.reduceFlicker` setting to specify whether to reduce the status bar "flickering" when changing lines by not first clearing the previous blame information -- closes [#272](https://github.com/eamodio/vscode-gitlens/issues/272)
- Adds the *Open File* (`gitlens.explorers.openFile`) command to the *GitLens* explorer inline for file nodes
- Adds the *Clear Results* (`gitlen.resultsExplorer.clearResultsNode`) command to the *GitLens Results* view inline for results nodes
### Fixed
- Fixes [#276](https://github.com/eamodio/vscode-gitlens/issues/276) - Lookup for branches without upstreams fails

+ 5
- 0
images/dark/icon-close-small.svg Näytä tiedosto

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<svg width="16" height="22" xmlns="http://www.w3.org/2000/svg">
<path fill="none" d="M-1-1h582v402H-1z"/>
<path fill="#C5C5C5" stroke="null" d="M9 11l3 3-1 1-3-3-3 3-1-1 3-3-3-3 1-1 3 3 3-3 1 1-3 3z" />
</svg>

+ 4
- 0
images/dark/icon-open-file.svg Näytä tiedosto

@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16">
<polygon fill="#C5C5C5" points="10,2 7.414,2 8.414,3 9,3 9,3.586 9,4 9,4.414 9,6 12,6 12,13 4,13 4,8 3,8 3,14 13,14 13,5"/>'
<polygon fill="#C5C5C5" points="5,1 3,1 5,3 1,3 1,5 5,5 3,7 5,7 8,4"/>
</svg>

images/dark/open-file.svg → images/dark/icon-open-working-file.svg Näytä tiedosto


+ 5
- 0
images/light/icon-close-small.svg Näytä tiedosto

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<svg width="16" height="22" xmlns="http://www.w3.org/2000/svg">
<path fill="none" d="M-1-1h582v402H-1z"/>
<path fill="#424242" stroke="null" d="M9 11l3 3-1 1-3-3-3 3-1-1 3-3-3-3 1-1 3 3 3-3 1 1-3 3z" />
</svg>

+ 4
- 0
images/light/icon-open-file.svg Näytä tiedosto

@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16">
<polygon fill="#424242" points="10,2 7.414,2 8.414,3 9,3 9,3.586 9,4 9,4.414 9,6 12,6 12,13 4,13 4,8 3,8 3,14 13,14 13,5"/>'
<polygon fill="#424242" points="5,1 3,1 5,3 1,3 1,5 5,5 3,7 5,7 8,4"/>
</svg>

images/light/open-file.svg → images/light/icon-open-working-file.svg Näytä tiedosto


+ 48
- 5
package.json Näytä tiedosto

@ -7,7 +7,7 @@
},
"publisher": "eamodio",
"engines": {
"vscode": "^1.19.0"
"vscode": "^1.20.0"
},
"license": "SEE LICENSE IN LICENSE",
"displayName": "GitLens \u2014 Git supercharged",
@ -1306,8 +1306,8 @@
"title": "Open Working File",
"category": "GitLens",
"icon": {
"dark": "images/dark/open-file.svg",
"light": "images/light/open-file.svg"
"dark": "images/dark/icon-open-working-file.svg",
"light": "images/light/icon-open-working-file.svg"
}
},
{
@ -1367,7 +1367,11 @@
{
"command": "gitlens.explorers.openFile",
"title": "Open File",
"category": "GitLens"
"category": "GitLens",
"icon": {
"dark": "images/dark/icon-open-file.svg",
"light": "images/light/icon-open-file.svg"
}
},
{
"command": "gitlens.explorers.openFileRevision",
@ -1574,7 +1578,11 @@
{
"command": "gitlens.resultsExplorer.clearResultsNode",
"title": "Clear Results",
"category": "GitLens"
"category": "GitLens",
"icon": {
"dark": "images/dark/icon-close-small.svg",
"light": "images/light/icon-close-small.svg"
}
},
{
"command": "gitlens.resultsExplorer.close",
@ -2797,6 +2805,11 @@
"group": "8_gitlens@5"
},
{
"command": "gitlens.explorers.openFile",
"when": "viewItem == gitlens:commit-file",
"group": "inline"
},
{
"command": "gitlens.explorers.openChanges",
"when": "viewItem == gitlens:commit-file",
"group": "1_gitlens@1"
@ -2844,6 +2857,11 @@
{
"command": "gitlens.explorers.openFile",
"when": "viewItem == gitlens:file-history",
"group": "inline"
},
{
"command": "gitlens.explorers.openFile",
"when": "viewItem == gitlens:file-history",
"group": "1_gitlens@1"
},
{
@ -2874,6 +2892,11 @@
{
"command": "gitlens.resultsExplorer.clearResultsNode",
"when": "viewItem == gitlens:comparison-results",
"group": "inline"
},
{
"command": "gitlens.resultsExplorer.clearResultsNode",
"when": "viewItem == gitlens:comparison-results",
"group": "1_gitlens@1"
},
{
@ -2884,6 +2907,11 @@
{
"command": "gitlens.resultsExplorer.clearResultsNode",
"when": "viewItem == gitlens:search-results",
"group": "inline"
},
{
"command": "gitlens.resultsExplorer.clearResultsNode",
"when": "viewItem == gitlens:search-results",
"group": "1_gitlens@1"
},
{
@ -2947,6 +2975,11 @@
"group": "7_gitlens_@2"
},
{
"command": "gitlens.explorers.openFile",
"when": "viewItem == gitlens:stash-file",
"group": "inline"
},
{
"command": "gitlens.explorers.applyChanges",
"when": "viewItem == gitlens:stash-file",
"group": "1_gitlens@1"
@ -2987,6 +3020,11 @@
"group": "1_gitlens@1"
},
{
"command": "gitlens.explorers.openFile",
"when": "viewItem == gitlens:status-file",
"group": "inline"
},
{
"command": "gitlens.explorers.openChanges",
"when": "viewItem == gitlens:status-file",
"group": "1_gitlens@1"
@ -3023,6 +3061,11 @@
},
{
"command": "gitlens.explorers.openFile",
"when": "viewItem == gitlens:stash-file-commits",
"group": "inline"
},
{
"command": "gitlens.explorers.openFile",
"when": "viewItem == gitlens:status-file-commits",
"group": "1_gitlens@1"
},

+ 1
- 1
src/views/branchFolderNode.ts Näytä tiedosto

@ -37,7 +37,7 @@ export class BranchFolderNode extends ExplorerNode {
async getTreeItem(): Promise<TreeItem> {
const item = new TreeItem(this.label, TreeItemCollapsibleState.Collapsed);
item.contextValue = ResourceType.Folder;
(item as any).resourceUri = this.explorer.folderResourceUri;
item.resourceUri = this.explorer.folderResourceUri;
return item;
}

+ 1
- 1
src/views/folderNode.ts Näytä tiedosto

@ -63,7 +63,7 @@ export class FolderNode extends ExplorerNode {
// TODO: Change this to expanded once https://github.com/Microsoft/vscode/issues/30918 is fixed
const item = new TreeItem(this.label, TreeItemCollapsibleState.Collapsed);
item.contextValue = ResourceType.Folder;
(item as any).resourceUri = this.explorer.folderResourceUri;
item.resourceUri = this.explorer.folderResourceUri;
return item;
}

Ladataan…
Peruuta
Tallenna