Browse Source

Adds menu toggle for Add Co-author command

Splits scm group inline from context menu settings
main
Eric Amodio 4 years ago
parent
commit
46d88bd11b
3 changed files with 113 additions and 18 deletions
  1. +43
    -7
      package.json
  2. +10
    -1
      src/config.ts
  3. +60
    -10
      src/webviews/apps/settings/index.html

+ 43
- 7
package.json View File

@ -852,6 +852,40 @@
}
]
},
"scm": {
"anyOf": [
{
"enum": [
false
]
},
{
"type": "object",
"properties": {
"authors": {
"type": "boolean"
}
}
}
]
},
"scmGroupInline": {
"anyOf": [
{
"enum": [
false
]
},
{
"type": "object",
"properties": {
"stash": {
"type": "boolean"
}
}
}
]
},
"scmGroup": {
"anyOf": [
{
@ -870,9 +904,6 @@
},
"stash": {
"type": "boolean"
},
"stashInline": {
"type": "boolean"
}
}
}
@ -935,11 +966,16 @@
"history": true,
"remote": true
},
"scm": {
"authors": true
},
"scmGroupInline": {
"stash": true
},
"scmGroup": {
"compare": true,
"openClose": true,
"stash": true,
"stashInline": true
"stash": true
},
"scmItem": {
"clipboard": true,
@ -4434,14 +4470,14 @@
"scm/title": [
{
"command": "gitlens.addAuthors",
"when": "gitlens:enabled && !gitlens:readonly",
"when": "gitlens:enabled && !gitlens:readonly && config.gitlens.menus.scm.authors",
"group": "navigation@-99"
}
],
"scm/resourceGroup/context": [
{
"command": "gitlens.stashSave",
"when": "gitlens:enabled && !gitlens:readonly && config.gitlens.menus.scmGroup.stashInline",
"when": "gitlens:enabled && !gitlens:readonly && config.gitlens.menus.scmGroupInline.stash",
"group": "inline@-1"
},
{

+ 10
- 1
src/config.ts View File

@ -356,13 +356,22 @@ export interface MenuConfig {
history: boolean;
remote: boolean;
};
scm:
| false
| {
authors: boolean;
};
scmGroupInline:
| false
| {
stash: boolean;
};
scmGroup:
| false
| {
compare: boolean;
openClose: boolean;
stash: boolean;
stashInline: boolean;
};
scmItem:
| false

+ 60
- 10
src/webviews/apps/settings/index.html View File

@ -2652,37 +2652,87 @@
<div class="setting__input">
<div class="setting__expander"></div>
<input
id="menus.scmGroup"
name="menus.scmGroup"
id="menus.scm"
name="menus.scm"
type="checkbox"
value="undefined"
data-setting
data-setting-type="object"
disabled
/>
<label for="menus.scmGroup"
>Add commands to the Source Control groups context menu</label
<label for="menus.scm">Add commands to the Source Control toolbar</label>
</div>
</div>
<div class="settings ml-4">
<div class="setting" data-enablement="menus.scm">
<div class="setting__input">
<input
id="menus.scm.authors"
name="menus.scm.authors"
type="checkbox"
data-setting
data-setting-type="object"
disabled
/>
<label for="menus.scm.authors">Add co-authors 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.scmGroupInline"
name="menus.scmGroupInline"
type="checkbox"
value="undefined"
data-setting
data-setting-type="object"
disabled
/>
<label for="menus.scmGroupInline"
>Add commands to the Source Control groups toolbar</label
>
</div>
</div>
<div class="settings ml-4">
<div class="setting" data-enablement="menus.scmGroup">
<div class="setting" data-enablement="menus.scmGroupInline">
<div class="setting__input">
<input
id="menus.scmGroup.stashInline"
name="menus.scmGroup.stashInline"
id="menus.scmGroupInline.stash"
name="menus.scmGroupInline.stash"
type="checkbox"
data-setting
data-setting-type="object"
disabled
/>
<label for="menus.scmGroup.stashInline"
>Add stash changes command to the inline toolbar</label
>
<label for="menus.scmGroupInline.stash">Add stash changes 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.scmGroup"
name="menus.scmGroup"
type="checkbox"
value="undefined"
data-setting
data-setting-type="object"
disabled
/>
<label for="menus.scmGroup"
>Add commands to the Source Control groups context menu</label
>
</div>
</div>
<div class="settings ml-4">
<div class="setting" data-enablement="menus.scmGroup">
<div class="setting__input">
<input

Loading…
Cancel
Save