mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
fix(editor): menu UI fixes (no-changelog) (#4316)
* N8N-4964-menu-fixes
* 👌 Addressing PR review comments
This commit is contained in:
parent
a82fd3f33f
commit
51e8f5ff22
|
@ -153,10 +153,12 @@ export default Vue.extend({
|
||||||
|
|
||||||
|
|
||||||
.submenu {
|
.submenu {
|
||||||
|
background: none !important;
|
||||||
|
|
||||||
:global(.el-submenu__title) {
|
:global(.el-submenu__title) {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-radius: var(--border-radius-base);
|
border-radius: var(--border-radius-base) !important;
|
||||||
padding: var(--spacing-2xs) var(--spacing-xs) !important;
|
padding: var(--spacing-2xs) var(--spacing-xs) !important;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
|
||||||
|
@ -205,10 +207,12 @@ export default Vue.extend({
|
||||||
}
|
}
|
||||||
|
|
||||||
.active {
|
.active {
|
||||||
|
&, & :global(.el-submenu__title) {
|
||||||
background-color: var(--color-foreground-base);
|
background-color: var(--color-foreground-base);
|
||||||
border-radius: var(--border-radius-base);
|
border-radius: var(--border-radius-base);
|
||||||
.icon { color: var(--color-text-dark) }
|
.icon { color: var(--color-text-dark) }
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.menuItem {
|
.menuItem {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
@ -82,6 +82,7 @@ import {
|
||||||
} from '@/constants';
|
} from '@/constants';
|
||||||
import { userHelpers } from './mixins/userHelpers';
|
import { userHelpers } from './mixins/userHelpers';
|
||||||
import { debounceHelper } from './mixins/debounce';
|
import { debounceHelper } from './mixins/debounce';
|
||||||
|
import Vue from 'vue';
|
||||||
|
|
||||||
export default mixins(
|
export default mixins(
|
||||||
genericHelpers,
|
genericHelpers,
|
||||||
|
@ -160,7 +161,6 @@ export default mixins(
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
label: item.properties ? item.properties.title : '',
|
label: item.properties ? item.properties.title : '',
|
||||||
position: item.position,
|
position: item.position,
|
||||||
activateOnRouteNames: [ VIEWS.TEMPLATES ],
|
|
||||||
type: item.properties?.href ? 'link' : 'regular',
|
type: item.properties?.href ? 'link' : 'regular',
|
||||||
properties: item.properties,
|
properties: item.properties,
|
||||||
} as IMenuItem,
|
} as IMenuItem,
|
||||||
|
@ -277,8 +277,7 @@ export default mixins(
|
||||||
return [ ...items, ...regularItems ];
|
return [ ...items, ...regularItems ];
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
async mounted() {
|
||||||
this.fullyExpanded = !this.isCollapsed;
|
|
||||||
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 });
|
||||||
}
|
}
|
||||||
|
@ -286,6 +285,8 @@ export default mixins(
|
||||||
this.$store.commit('ui/expandSidebarMenu');
|
this.$store.commit('ui/expandSidebarMenu');
|
||||||
}
|
}
|
||||||
this.checkWidthAndAdjustSidebar(window.innerWidth);
|
this.checkWidthAndAdjustSidebar(window.innerWidth);
|
||||||
|
await Vue.nextTick();
|
||||||
|
this.fullyExpanded = !this.isCollapsed;
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
window.addEventListener("resize", this.onResize);
|
window.addEventListener("resize", this.onResize);
|
||||||
|
|
Loading…
Reference in a new issue