mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -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) {
|
||||
this.$externalHooks().run('mainSidebar.mounted', { userRef: this.$refs.user });
|
||||
}
|
||||
if (window.innerWidth > 900 && !this.isNodeView) {
|
||||
this.$store.commit('ui/expandSidebarMenu');
|
||||
}
|
||||
this.checkWidthAndAdjustSidebar(window.innerWidth);
|
||||
await Vue.nextTick();
|
||||
this.fullyExpanded = !this.isCollapsed;
|
||||
|
@ -457,8 +454,10 @@ export default mixins(
|
|||
this.checkWidthAndAdjustSidebar(browserWidth);
|
||||
},
|
||||
checkWidthAndAdjustSidebar (width: number) {
|
||||
if (width < 900) {
|
||||
if (width < 900 || this.isNodeView) {
|
||||
this.$store.commit('ui/collapseSidebarMenu');
|
||||
} else {
|
||||
this.$store.commit('ui/expandSidebarMenu');
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
|
@ -110,7 +110,7 @@ const module: Module<IUiState, IRootState> = {
|
|||
},
|
||||
},
|
||||
modalStack: [],
|
||||
sidebarMenuCollapsed: true,
|
||||
sidebarMenuCollapsed: false,
|
||||
isPageLoading: true,
|
||||
currentView: '',
|
||||
mainPanelDimensions: {},
|
||||
|
|
Loading…
Reference in a new issue