Просмотр исходного кода

Adds comparison commands to branch nodes toolbar

main
Eric Amodio 6 лет назад
Родитель
Сommit
99688c28ba
7 измененных файлов: 62 добавлений и 6 удалений
  1. +6
    -0
      images/dark/icon-compare-ref-remote.svg
  2. +4
    -0
      images/dark/icon-compare-ref-working.svg
  3. +4
    -0
      images/dark/icon-compare-refs.svg
  4. +6
    -0
      images/light/icon-compare-ref-remote.svg
  5. +4
    -0
      images/light/icon-compare-ref-working.svg
  6. +4
    -0
      images/light/icon-compare-refs.svg
  7. +34
    -6
      package.json

+ 6
- 0
images/dark/icon-compare-ref-remote.svg Просмотреть файл

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 22">
<path fill="#c5c5c5" d="M14.5 14.28V8c-.03-.78-.34-1.47-.94-2.06-.6-.59-1.28-.91-2.06-.94h-1V3l-3 3 3 3V7h1c.27.02.48.11.69.31.21.2.3.42.31.69v6.28c-1.329.766-1.331 2.684-.004 3.452A2 2 0 0 0 13.5 18c1.534.004 2.497-1.654 1.734-2.985a1.99 1.99 0 0 0-.734-.735zm-1 2.92c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"/>
<path fill="#c5c5c5" stroke="#c5c5c5" stroke-width=".5" d="M7.25 8.688C7.25 8.44 6.738 7 4.719 7 3.358 7 2.188 8.08 2.188 9.25 1.074 9.25.5 10.105.5 10.938c0 .86.563 1.687 2 1.662v-.7c-1.224-.006-1.269-.805-1.269-.962 0-.096.028-.957.957-.957h.731V9.25c0-.782.877-1.519 1.8-1.519 1.434 0 1.76.872 1.8 1.013v.675h.731c.456 0 1.519.124 1.519 1.237 0 1.176-1.266 1.238-1.519 1.238l-.562-.056v.787h.562c1.17 0 2.25-.652 2.25-1.969 0-1.372-1.08-1.968-2.25-1.968z"/>
<path fill="#c5c5c5" d="M7.5 15h-1c-.27-.02-.48-.11-.69-.31-.21-.2-.3-.42-.31-.69v-3h-2v3c.03.78.34 1.47.94 2.06.6.59 1.28.91 2.06.94h1v2l3-3-3-3v2zM7.082-1.406H1.917A1.42 1.42 0 0 1 .5-2.824c0-.781.636-1.417 1.417-1.417h.161c.2-.27.508-.441.844-.466a1.842 1.842 0 0 1 1.808-1.45c.698 0 1.338.4 1.651 1.013a1.38 1.38 0 0 1 1.502 1.151 1.418 1.418 0 0 1-.801 2.587z"/>
</svg>

+ 4
- 0
images/dark/icon-compare-ref-working.svg Просмотреть файл

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 22">
<path fill="#c5c5c5" d="M.9 3.9h4.2v2.2H4V14c.01.27.1.49.31.69.21.2.42.29.69.31h1v-2l3 3-3 3v-2H5c-.78-.03-1.46-.35-2.06-.94-.6-.59-.91-1.28-.94-2.06V6.1H.9zm13.834 11.115c.763 1.331-.2 2.989-1.734 2.985a2 2 0 0 1-1.004-.268c-1.327-.768-1.325-2.686.004-3.452V8a.943.943 0 0 0-.31-.69c-.21-.2-.42-.29-.69-.31h-1v2L7 6l3-3v2h1c.78.03 1.46.35 2.06.94.6.59.91 1.28.94 2.06v6.28c.305.176.559.429.734.735zM14.2 16c0-.65-.55-1.2-1.2-1.2-.65 0-1.2.55-1.2 1.2 0 .65.54 1.2 1.2 1.2.65 0 1.2-.55 1.2-1.2z"/>
</svg>

+ 4
- 0
images/dark/icon-compare-refs.svg Просмотреть файл

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 22">
<path fill="#c5c5c5" d="M6 15H5c-.27-.02-.48-.11-.69-.31-.21-.2-.3-.42-.31-.69V7.72c1.329-.766 1.331-2.684.004-3.452A2 2 0 0 0 3 4C1.466 3.996.503 5.654 1.266 6.985c.175.306.429.559.734.735V14c.03.78.34 1.47.94 2.06.6.59 1.28.91 2.06.94h1v2l3-3-3-3v2zM3 4.8c.66 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2-.65 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2zm11 9.48V8c-.03-.78-.34-1.47-.94-2.06-.6-.59-1.28-.91-2.06-.94h-1V3L7 6l3 3V7h1c.27.02.48.11.69.31.21.2.3.42.31.69v6.28c-1.329.766-1.331 2.684-.004 3.452A2 2 0 0 0 13 18c1.534.004 2.497-1.654 1.734-2.985A1.99 1.99 0 0 0 14 14.28zm-1 2.92c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"/>
</svg>

+ 6
- 0
images/light/icon-compare-ref-remote.svg Просмотреть файл

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 22">
<path fill="#424242" d="M14.5 14.28V8c-.03-.78-.34-1.47-.94-2.06-.6-.59-1.28-.91-2.06-.94h-1V3l-3 3 3 3V7h1c.27.02.48.11.69.31.21.2.3.42.31.69v6.28c-1.329.766-1.331 2.684-.004 3.452A2 2 0 0 0 13.5 18c1.534.004 2.497-1.654 1.734-2.985a1.99 1.99 0 0 0-.734-.735zm-1 2.92c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"/>
<path fill="#424242" stroke="#424242" stroke-width=".5" d="M7.25 8.688C7.25 8.44 6.738 7 4.719 7 3.358 7 2.188 8.08 2.188 9.25 1.074 9.25.5 10.105.5 10.938c0 .86.563 1.687 2 1.662v-.7c-1.224-.006-1.269-.805-1.269-.962 0-.096.028-.957.957-.957h.731V9.25c0-.782.877-1.519 1.8-1.519 1.434 0 1.76.872 1.8 1.013v.675h.731c.456 0 1.519.124 1.519 1.237 0 1.176-1.266 1.238-1.519 1.238l-.562-.056v.787h.562c1.17 0 2.25-.652 2.25-1.969 0-1.372-1.08-1.968-2.25-1.968z"/>
<path fill="#424242" d="M7.5 15h-1c-.27-.02-.48-.11-.69-.31-.21-.2-.3-.42-.31-.69v-3h-2v3c.03.78.34 1.47.94 2.06.6.59 1.28.91 2.06.94h1v2l3-3-3-3v2zM7.082-1.406H1.917A1.42 1.42 0 0 1 .5-2.824c0-.781.636-1.417 1.417-1.417h.161c.2-.27.508-.441.844-.466a1.842 1.842 0 0 1 1.808-1.45c.698 0 1.338.4 1.651 1.013a1.38 1.38 0 0 1 1.502 1.151 1.418 1.418 0 0 1-.801 2.587z"/>
</svg>

+ 4
- 0
images/light/icon-compare-ref-working.svg Просмотреть файл

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 22">
<path fill="#424242" d="M.9 3.9h4.2v2.2H4V14c.01.27.1.49.31.69.21.2.42.29.69.31h1v-2l3 3-3 3v-2H5c-.78-.03-1.46-.35-2.06-.94-.6-.59-.91-1.28-.94-2.06V6.1H.9zm13.834 11.115c.763 1.331-.2 2.989-1.734 2.985a2 2 0 0 1-1.004-.268c-1.327-.768-1.325-2.686.004-3.452V8a.943.943 0 0 0-.31-.69c-.21-.2-.42-.29-.69-.31h-1v2L7 6l3-3v2h1c.78.03 1.46.35 2.06.94.6.59.91 1.28.94 2.06v6.28c.305.176.559.429.734.735zM14.2 16c0-.65-.55-1.2-1.2-1.2-.65 0-1.2.55-1.2 1.2 0 .65.54 1.2 1.2 1.2.65 0 1.2-.55 1.2-1.2z"/>
</svg>

+ 4
- 0
images/light/icon-compare-refs.svg Просмотреть файл

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 22">
<path fill="#424242" d="M6 15H5c-.27-.02-.48-.11-.69-.31-.21-.2-.3-.42-.31-.69V7.72c1.329-.766 1.331-2.684.004-3.452A2 2 0 0 0 3 4C1.466 3.996.503 5.654 1.266 6.985c.175.306.429.559.734.735V14c.03.78.34 1.47.94 2.06.6.59 1.28.91 2.06.94h1v2l3-3-3-3v2zM3 4.8c.66 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2-.65 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2zm11 9.48V8c-.03-.78-.34-1.47-.94-2.06-.6-.59-1.28-.91-2.06-.94h-1V3L7 6l3 3V7h1c.27.02.48.11.69.31.21.2.3.42.31.69v6.28c-1.329.766-1.331 2.684-.004 3.452A2 2 0 0 0 13 18c1.534.004 2.497-1.654 1.734-2.985A1.99 1.99 0 0 0 14 14.28zm-1 2.92c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"/>
</svg>

+ 34
- 6
package.json Просмотреть файл

@ -2048,12 +2048,20 @@
{
"command": "gitlens.views.compareWithHead",
"title": "Compare with HEAD",
"category": "GitLens"
"category": "GitLens",
"icon": {
"dark": "images/dark/icon-compare-refs.svg",
"light": "images/light/icon-compare-refs.svg"
}
},
{
"command": "gitlens.views.compareWithRemote",
"title": "Compare with Remote",
"category": "GitLens"
"category": "GitLens",
"icon": {
"dark": "images/dark/icon-compare-ref-remote.svg",
"light": "images/light/icon-compare-ref-remote.svg"
}
},
{
"command": "gitlens.views.compareWithSelected",
@ -2063,7 +2071,11 @@
{
"command": "gitlens.views.compareWithWorking",
"title": "Compare with Working Tree",
"category": "GitLens"
"category": "GitLens",
"icon": {
"dark": "images/dark/icon-compare-ref-working.svg",
"light": "images/light/icon-compare-ref-working.svg"
}
},
{
"command": "gitlens.views.selectForCompare",
@ -3243,16 +3255,32 @@
},
{
"command": "gitlens.openBranchInRemote",
"when": "viewItem =~ /gitlens:(branch\\b(.*?:tracking|:remote))/",
"when": "viewItem =~ /gitlens:branch\\b(.*?:tracking|:remote)/",
"group": "inline@98"
},
{
"command": "gitlens.openBranchInRemote",
"when": "viewItem =~ /gitlens:(branch\\b(.*?:tracking|:remote))/",
"when": "viewItem =~ /gitlens:branch\\b(.*?:tracking|:remote)/",
"group": "1_gitlens@1"
},
{
"command": "gitlens.views.compareWithRemote",
"when": "viewItem =~ /gitlens:branch\\b.*?:tracking/",
"group": "inline@96"
},
{
"command": "gitlens.views.compareWithHead",
"when": "viewItem =~ /gitlens:(branch(?!:current)|commit|stash|tag)\\b/",
"group": "inline@97",
"alt": "gitlens.views.compareWithWorking"
},
{
"command": "gitlens.views.compareWithWorking",
"when": "viewItem =~ /gitlens:branch:current\\b/",
"group": "inline@97"
},
{
"command": "gitlens.views.compareWithRemote",
"when": "viewItem =~ /gitlens:(branch\\b.*?:tracking)/",
"group": "7_gitlens@1"
},
@ -3263,7 +3291,7 @@
},
{
"command": "gitlens.views.compareWithWorking",
"when": "viewItem =~ /gitlens:(branch(?!:current)|commit|stash|tag)\\b/",
"when": "viewItem =~ /gitlens:(branch|commit|stash|tag)\\b/",
"group": "7_gitlens@3"
},
{

Загрузка…
Отмена
Сохранить