From d9185458b122b32f79587836b24530ba956c016f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Schauer-K=C3=B6ckeis?= Date: Mon, 7 Oct 2024 13:41:35 +0200 Subject: [PATCH] State sould now also in not Snapshot version saved MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Schauer-Köckeis --- src/containers/DefaultContainer.vue | 37 +++++++++++++---------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/src/containers/DefaultContainer.vue b/src/containers/DefaultContainer.vue index 27fd69019..952ea9584 100644 --- a/src/containers/DefaultContainer.vue +++ b/src/containers/DefaultContainer.vue @@ -202,29 +202,26 @@ export default { mounted() { if (this.$dtrack && this.$dtrack.version.includes('SNAPSHOT')) { this.$root.$emit('bv::show::modal', 'snapshotModal'); + } - this.isSidebarMinimized = - localStorage && localStorage.getItem('isSidebarMinimized') !== null - ? localStorage.getItem('isSidebarMinimized') === 'true' - : false; - const sidebar = document.body; - if (sidebar) { - if (this.isSidebarMinimized) { - sidebar.classList.add('sidebar-minimized'); - } else { - sidebar.classList.remove('sidebar-minimized'); - } + this.isSidebarMinimized = + localStorage && localStorage.getItem('isSidebarMinimized') !== null + ? localStorage.getItem('isSidebarMinimized') === 'true' + : false; + const sidebar = document.body; + if (sidebar) { + if (this.isSidebarMinimized) { + sidebar.classList.add('sidebar-minimized'); + } else { + sidebar.classList.remove('sidebar-minimized'); } - this.$nextTick(() => { - const sidebarMinimizer = this.$el.querySelector('.sidebar-minimizer'); - if (sidebarMinimizer) { - sidebarMinimizer.addEventListener( - 'click', - this.handleMinimizedUpdate, - ); - } - }); } + this.$nextTick(() => { + const sidebarMinimizer = this.$el.querySelector('.sidebar-minimizer'); + if (sidebarMinimizer) { + sidebarMinimizer.addEventListener('click', this.handleMinimizedUpdate); + } + }); }, computed: { name() {