Wire up preconditions for viewsWelcome buttons, and use it

This commit is contained in:
gjsjohnmurray
2020-09-30 13:01:46 +01:00
parent af4fb00687
commit ceeb974856
5 changed files with 18 additions and 20 deletions

View File

@@ -2075,11 +2075,6 @@
"contents": "%view.workbench.scm.disabled%",
"when": "!config.git.enabled"
},
{
"view": "scm",
"contents": "%view.workbench.scm.activating%",
"when": "config.git.enabled && git.state != initialized"
},
{
"view": "scm",
"contents": "%view.workbench.scm.missing%",
@@ -2088,37 +2083,36 @@
{
"view": "scm",
"contents": "%view.workbench.scm.empty%",
"when": "config.git.enabled && git.state == initialized && workbenchState == empty",
"when": "config.git.enabled && workbenchState == empty",
"preconditions": ["git.state == initialized"],
"group": "2_open@1"
},
{
"view": "scm",
"contents": "%view.workbench.scm.folder%",
"when": "config.git.enabled && git.state == initialized && workbenchState == folder",
"when": "config.git.enabled && workbenchState == folder",
"preconditions": ["git.state == initialized"],
"group": "5_scm@1"
},
{
"view": "scm",
"contents": "%view.workbench.scm.workspace%",
"when": "config.git.enabled && git.state == initialized && workbenchState == workspace && workspaceFolderCount != 0",
"preconditions": ["git.state == initialized"],
"group": "5_scm@1"
},
{
"view": "scm",
"contents": "%view.workbench.scm.emptyWorkspace%",
"when": "config.git.enabled && git.state == initialized && workbenchState == workspace && workspaceFolderCount == 0",
"when": "config.git.enabled && workbenchState == workspace && workspaceFolderCount == 0",
"preconditions": ["git.state == initialized"],
"group": "2_open@1"
},
{
"view": "explorer",
"contents": "%view.workbench.activating%",
"when": "config.git.enabled && git.state != initialized",
"group": "5_scm@1"
},
{
"view": "explorer",
"contents": "%view.workbench.cloneRepository%",
"when": "config.git.enabled && git.state == initialized",
"when": "config.git.enabled",
"preconditions": ["git.state == initialized"],
"group": "5_scm@1"
}
]