Skip to content

Commit

Permalink
State sould now also in not Snapshot version saved
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Schauer-Köckeis <[email protected]>
  • Loading branch information
Gepardgame committed Oct 7, 2024
1 parent 730dc73 commit d918545
Showing 1 changed file with 17 additions and 20 deletions.
37 changes: 17 additions & 20 deletions src/containers/DefaultContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit d918545

Please sign in to comment.