mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-27 12:22:16 -08:00
fix(editor): fix for menu collapse lag when loading a credentials page (#4329)
🐛 Fixing a menu collapse bug on credentials view
This commit is contained in:
parent
1811c54917
commit
298c4f20a9
|
@ -281,9 +281,6 @@ export default mixins(
|
||||||
if (this.$refs.user) {
|
if (this.$refs.user) {
|
||||||
this.$externalHooks().run('mainSidebar.mounted', { userRef: this.$refs.user });
|
this.$externalHooks().run('mainSidebar.mounted', { userRef: this.$refs.user });
|
||||||
}
|
}
|
||||||
if (window.innerWidth > 900 && !this.isNodeView) {
|
|
||||||
this.$store.commit('ui/expandSidebarMenu');
|
|
||||||
}
|
|
||||||
this.checkWidthAndAdjustSidebar(window.innerWidth);
|
this.checkWidthAndAdjustSidebar(window.innerWidth);
|
||||||
await Vue.nextTick();
|
await Vue.nextTick();
|
||||||
this.fullyExpanded = !this.isCollapsed;
|
this.fullyExpanded = !this.isCollapsed;
|
||||||
|
@ -457,8 +454,10 @@ export default mixins(
|
||||||
this.checkWidthAndAdjustSidebar(browserWidth);
|
this.checkWidthAndAdjustSidebar(browserWidth);
|
||||||
},
|
},
|
||||||
checkWidthAndAdjustSidebar (width: number) {
|
checkWidthAndAdjustSidebar (width: number) {
|
||||||
if (width < 900) {
|
if (width < 900 || this.isNodeView) {
|
||||||
this.$store.commit('ui/collapseSidebarMenu');
|
this.$store.commit('ui/collapseSidebarMenu');
|
||||||
|
} else {
|
||||||
|
this.$store.commit('ui/expandSidebarMenu');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -110,7 +110,7 @@ const module: Module<IUiState, IRootState> = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
modalStack: [],
|
modalStack: [],
|
||||||
sidebarMenuCollapsed: true,
|
sidebarMenuCollapsed: false,
|
||||||
isPageLoading: true,
|
isPageLoading: true,
|
||||||
currentView: '',
|
currentView: '',
|
||||||
mainPanelDimensions: {},
|
mainPanelDimensions: {},
|
||||||
|
|
Loading…
Reference in a new issue