Ver a proveniência

Adds menu setting to add stash to scm item toolbar

main
Eric Amodio há 2 anos
ascendente
cometimento
2d3bdc62be
3 ficheiros alterados com 60 adições e 0 eliminações
  1. +23
    -0
      package.json
  2. +5
    -0
      src/config.ts
  3. +32
    -0
      src/webviews/apps/settings/partials/menus.html

+ 23
- 0
package.json Ver ficheiro

@ -2810,6 +2810,23 @@
}
]
},
"scmItemInline": {
"anyOf": [
{
"enum": [
false
]
},
{
"type": "object",
"properties": {
"stash": {
"type": "boolean"
}
}
}
]
},
"scmItem": {
"anyOf": [
{
@ -2885,6 +2902,7 @@
"openClose": true,
"stash": true
},
"scmItemInline": {},
"scmItem": {
"clipboard": true,
"compare": true,
@ -8237,6 +8255,11 @@
],
"scm/resourceState/context": [
{
"command": "gitlens.stashSaveFiles",
"when": "gitlens:enabled && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders && scmProvider == git && scmResourceGroup =~ /^(workingTree|index)$/ && config.gitlens.menus.scmItemInline.stash",
"group": "inline@1"
},
{
"submenu": "gitlens/scm/resourceState/changes",
"when": "gitlens:enabled && scmProvider == git && scmResourceGroup =~ /^(workingTree|index|merge)$/ && config.gitlens.menus.scmItem.compare",
"group": "navigation"

+ 5
- 0
src/config.ts Ver ficheiro

@ -469,6 +469,11 @@ export interface MenuConfig {
openClose: boolean;
stash: boolean;
};
scmItemInline:
| false
| {
stash: boolean;
};
scmItem:
| false
| {

+ 32
- 0
src/webviews/apps/settings/partials/menus.html Ver ficheiro

@ -520,6 +520,38 @@
<div class="setting__input">
<div class="setting__expander"></div>
<input
id="menus.scmItemInline"
name="menus.scmItemInline"
type="checkbox"
value="undefined"
data-setting
data-setting-type="object"
disabled
/>
<label for="menus.scmItemInline">Add to the Source Control items toolbar</label>
</div>
</div>
<div class="settings ml-4">
<div class="setting" data-enablement="menus.scmItemInline">
<div class="setting__input">
<input
id="menus.scmItemInline.stash"
name="menus.scmItemInline.stash"
type="checkbox"
data-setting
data-setting-type="object"
disabled
/>
<label for="menus.scmItemInline.stash">Add <i>Stash Changes</i> command</label>
</div>
</div>
</div>
<div class="setting setting--expandable" data-enablement="menus">
<div class="setting__input">
<div class="setting__expander"></div>
<input
id="menus.scmItem"
name="menus.scmItem"
type="checkbox"

Carregando…
Cancelar
Guardar