diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-10 18:13:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-10 18:13:21 +0300 |
commit | 26881dd926cfac47c9603d44e8d5a504ab8c4a14 (patch) | |
tree | 32d0543691630448b1b2a624bdae41ead6bcc7fc /app/assets/javascripts/pipeline_editor | |
parent | 419966e5d34a98d89354ed658c33478ce02d8017 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/pipeline_editor')
-rw-r--r-- | app/assets/javascripts/pipeline_editor/pipeline_editor_app.vue | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/app/assets/javascripts/pipeline_editor/pipeline_editor_app.vue b/app/assets/javascripts/pipeline_editor/pipeline_editor_app.vue index 0a573cb3d58..68db5d8078f 100644 --- a/app/assets/javascripts/pipeline_editor/pipeline_editor_app.vue +++ b/app/assets/javascripts/pipeline_editor/pipeline_editor_app.vue @@ -52,6 +52,7 @@ export default { isFetchingCommitSha: false, isNewCiConfigFile: false, lastCommittedContent: '', + shouldSkipStartScreen: false, showFailure: false, showStartScreen: false, showSuccess: false, @@ -60,7 +61,6 @@ export default { successType: null, }; }, - apollo: { initialCiFileContent: { fetchPolicy: fetchPolicies.NETWORK_ONLY, @@ -103,7 +103,11 @@ export default { } if (!hasCIFile) { - this.showStartScreen = true; + if (this.shouldSkipStartScreen) { + this.setNewEmptyCiConfigFile(); + } else { + this.showStartScreen = true; + } } else if (fileContent.length) { // If the file content is > 0, then we make sure to reset the // start screen flag during a refetch @@ -229,6 +233,7 @@ export default { }, mounted() { this.loadTemplateFromURL(); + this.checkShouldSkipStartScreen(); }, methods: { hideFailure() { @@ -293,6 +298,10 @@ export default { this.setNewEmptyCiConfigFile(); } }, + checkShouldSkipStartScreen() { + const params = queryToObject(window.location.search); + this.shouldSkipStartScreen = Boolean(params?.add_new_config_file); + }, }, }; </script> |