Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-02-12 21:08:59 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-02-12 21:08:59 +0300
commit6d533fe8b44007d82b8de29a4b706da69e5f5936 (patch)
treef02d924a3b8f81ca28852c993831fcf596417f1b /app/assets/javascripts/pipeline_editor/pipeline_editor_home.vue
parentf44248b613e94534fd6a1b1f8fb6df179f1bbf56 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/pipeline_editor/pipeline_editor_home.vue')
-rw-r--r--app/assets/javascripts/pipeline_editor/pipeline_editor_home.vue19
1 files changed, 18 insertions, 1 deletions
diff --git a/app/assets/javascripts/pipeline_editor/pipeline_editor_home.vue b/app/assets/javascripts/pipeline_editor/pipeline_editor_home.vue
index b7535cc0964..dc61bfa8993 100644
--- a/app/assets/javascripts/pipeline_editor/pipeline_editor_home.vue
+++ b/app/assets/javascripts/pipeline_editor/pipeline_editor_home.vue
@@ -2,6 +2,7 @@
import CommitSection from './components/commit/commit_section.vue';
import PipelineEditorTabs from './components/pipeline_editor_tabs.vue';
import PipelineEditorHeader from './components/header/pipeline_editor_header.vue';
+import { TABS_WITH_COMMIT_FORM, CREATE_TAB } from './constants';
export default {
components: {
@@ -23,6 +24,21 @@ export default {
required: true,
},
},
+ data() {
+ return {
+ currentTab: CREATE_TAB,
+ };
+ },
+ computed: {
+ showCommitForm() {
+ return TABS_WITH_COMMIT_FORM.includes(this.currentTab);
+ },
+ },
+ methods: {
+ setCurrentTab(tabName) {
+ this.currentTab = tabName;
+ },
+ },
};
</script>
@@ -37,7 +53,8 @@ export default {
:ci-file-content="ciFileContent"
:is-ci-config-data-loading="isCiConfigDataLoading"
v-on="$listeners"
+ @set-current-tab="setCurrentTab"
/>
- <commit-section :ci-file-content="ciFileContent" v-on="$listeners" />
+ <commit-section v-if="showCommitForm" :ci-file-content="ciFileContent" v-on="$listeners" />
</div>
</template>