diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-04 18:09:12 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-04 18:09:12 +0300 |
commit | 856e2c64ee69b055b31a8ebbeee616f13a46505e (patch) | |
tree | 0ec9b70c8f1f74516631bf87281c175e127fedd2 /app/assets/javascripts/pipeline_editor/pipeline_editor_home.vue | |
parent | 8ed0a009f0ae0de789fae01b3cc9bda54aa03965 (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.vue | 6 |
1 files changed, 5 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 ffe275cba68..f5277fdbcca 100644 --- a/app/assets/javascripts/pipeline_editor/pipeline_editor_home.vue +++ b/app/assets/javascripts/pipeline_editor/pipeline_editor_home.vue @@ -8,7 +8,7 @@ import PipelineEditorFileNav from './components/file_nav/pipeline_editor_file_na import PipelineEditorFileTree from './components/file_tree/container.vue'; import PipelineEditorHeader from './components/header/pipeline_editor_header.vue'; import PipelineEditorTabs from './components/pipeline_editor_tabs.vue'; -import { CREATE_TAB } from './constants'; +import { CREATE_TAB, FILE_TREE_DISPLAY_KEY } from './constants'; export default { commitSectionRef: 'commitSectionRef', @@ -77,6 +77,9 @@ export default { return this.showFileTree && this.glFeatures.pipelineEditorFileTree; }, }, + mounted() { + this.showFileTree = JSON.parse(localStorage.getItem(FILE_TREE_DISPLAY_KEY)) || false; + }, methods: { closeBranchModal() { this.showSwitchBranchModal = false; @@ -92,6 +95,7 @@ export default { }, toggleFileTree() { this.showFileTree = !this.showFileTree; + localStorage.setItem(FILE_TREE_DISPLAY_KEY, this.showFileTree); }, switchBranch() { this.showSwitchBranchModal = false; |