Browse Source

Adds menu setting to add stash to scm item toolbar

main
Eric Amodio 2 years ago
parent
commit
2d3bdc62be
3 changed files with 60 additions and 0 deletions
  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 View File

@ -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 View File

@ -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 View File

@ -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"

Loading…
Cancel
Save