-
-
-
-
-
-
-
-
-
- {{ $locale.baseText('mainSidebar.workflows') }}
-
-
-
-
-
- {{ $locale.baseText('mainSidebar.new') }}
-
-
-
-
-
- {{ $locale.baseText('mainSidebar.open') }}
-
-
-
-
-
-
- {{ $locale.baseText('mainSidebar.templates') }}
-
-
-
-
- {{ $locale.baseText('mainSidebar.credentials') }}
-
-
-
-
- {{ $locale.baseText('mainSidebar.executions') }}
-
-
-
-
-
- {{ $locale.baseText('settings') }}
-
-
-
-
-
- {{ $locale.baseText('mainSidebar.help') }}
-
-
-
-
-
-
-
- {{ $locale.baseText('mainSidebar.aboutN8n') }}
-
-
-
-
-
-
-
-
-
-
-
-
- {{nextVersions.length > 99 ? '99+' : nextVersions.length}} update{{nextVersions.length > 1 ? 's' : ''}}
-
-
-
-
-
-
-
-
- {{ $locale.baseText('settings') }}
- {{ $locale.baseText('auth.signout') }}
-
-
-
-
-
{{currentUser.fullName}}
-
-
-
-
-
+
+
+
+
+
+
+
+ {{ nextVersions.length > 99 ? '99+' : nextVersions.length}} update{{nextVersions.length > 1 ? 's' : '' }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ $locale.baseText('settings') }}
+ {{ $locale.baseText('auth.signout') }}
+
+
+
+
+
+ {{currentUser.fullName}}
+
+
+
-
-
+
+
-
-
-
diff --git a/packages/editor-ui/src/components/MenuItemsIterator.vue b/packages/editor-ui/src/components/MenuItemsIterator.vue
deleted file mode 100644
index eaee86c78f928..0000000000000
--- a/packages/editor-ui/src/components/MenuItemsIterator.vue
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
-
- {{ item.properties.title }}
-
-
-
-
-
diff --git a/packages/editor-ui/src/components/SettingsSidebar.vue b/packages/editor-ui/src/components/SettingsSidebar.vue
index 9ade642415dd1..35ccc86cefc8d 100644
--- a/packages/editor-ui/src/components/SettingsSidebar.vue
+++ b/packages/editor-ui/src/components/SettingsSidebar.vue
@@ -1,53 +1,22 @@
-
-
-
-
-
- {{ $locale.baseText('settings') }}
-
-
-
-
-
- {{ $locale.baseText('settings.personal') }}
-
-
-
-
-
- {{ $locale.baseText('settings.users') }}
-
-
-
-
-
- {{ $locale.baseText('settings.n8napi') }}
-
-
-
-
-
- {{ $locale.baseText(fakeDoor.featureName) }}
-
-
-
-
-
- {{ $locale.baseText('settings.communityNodes') }}
-
+
+
+
+
+
+
+ {{ $locale.baseText('settings') }}
+
+
+
+
+
+ {{ $locale.baseText('settings.version') }} {{ versionCli }}
+
+
+
-
-
- {{ $locale.baseText('settings.version') }} {{ versionCli }}
-
-
@@ -59,6 +28,8 @@ import { userHelpers } from './mixins/userHelpers';
import { pushConnection } from "@/components/mixins/pushConnection";
import { IFakeDoor } from '@/Interface';
import GiftNotificationIcon from './GiftNotificationIcon.vue';
+import { IMenuItem } from 'n8n-design-system';
+import { BaseTextKey } from '@/plugins/i18n';
export default mixins(
userHelpers,
@@ -73,6 +44,64 @@ export default mixins(
settingsFakeDoorFeatures(): IFakeDoor[] {
return this.$store.getters['ui/getFakeDoorByLocation']('settings');
},
+ sidebarMenuItems(): IMenuItem[] {
+
+ const menuItems: IMenuItem[] = [
+ {
+ id: 'settings-personal',
+ icon: 'user-circle',
+ label: this.$locale.baseText('settings.personal'),
+ position: 'top',
+ available: this.canAccessPersonalSettings(),
+ activateOnRouteNames: [ VIEWS.PERSONAL_SETTINGS ],
+ },
+ {
+ id: 'settings-users',
+ icon: 'user-friends',
+ label: this.$locale.baseText('settings.users'),
+ position: 'top',
+ available: this.canAccessUsersSettings(),
+ activateOnRouteNames: [ VIEWS.USERS_SETTINGS ],
+ },
+ {
+ id: 'settings-api',
+ icon: 'plug',
+ label: this.$locale.baseText('settings.n8napi'),
+ position: 'top',
+ available: this.canAccessApiSettings(),
+ activateOnRouteNames: [ VIEWS.API_SETTINGS ],
+ },
+ ];
+
+ for (const item of this.settingsFakeDoorFeatures) {
+ if (item.uiLocations.includes('settings')) {
+ menuItems.push({
+ id: item.id,
+ icon: item.icon || 'question',
+ label: this.$locale.baseText(item.featureName as BaseTextKey),
+ position: 'top',
+ available: true,
+ activateOnRoutePaths: [ `/settings/coming-soon/${item.id}` ],
+ });
+ }
+ }
+
+ menuItems.push(
+ {
+ id: 'settings-community-nodes',
+ icon: 'cube',
+ label: this.$locale.baseText('settings.communityNodes'),
+ position: 'top',
+ available: this.canAccessCommunityNodes(),
+ activateOnRouteNames: [ VIEWS.COMMUNITY_NODES ],
+ },
+ );
+
+ return menuItems;
+ },
+ },
+ mounted() {
+ this.pushConnect();
},
methods: {
canAccessPersonalSettings(): boolean {
@@ -96,83 +125,60 @@ export default mixins(
openUpdatesPanel() {
this.$store.dispatch('ui/openModal', VERSIONS_MODAL_KEY);
},
- },
- mounted() {
- this.pushConnect();
+ async handleSelect (key: string) {
+ switch (key) {
+ case 'settings-personal':
+ if (this.$router.currentRoute.name !== VIEWS.PERSONAL_SETTINGS) {
+ this.$router.push({ name: VIEWS.PERSONAL_SETTINGS });
+ }
+ break;
+ case 'settings-users':
+ if (this.$router.currentRoute.name !== VIEWS.USERS_SETTINGS) {
+ this.$router.push({ name: VIEWS.USERS_SETTINGS });
+ }
+ break;
+ case 'settings-api':
+ if (this.$router.currentRoute.name !== VIEWS.API_SETTINGS) {
+ this.$router.push({ name: VIEWS.API_SETTINGS });
+ }
+ break;
+ case 'environments':
+ case 'logging':
+ this.$router.push({ name: VIEWS.FAKE_DOOR, params: { featureId: key } }).catch(() => {});
+ break;
+ case 'settings-community-nodes':
+ if (this.$router.currentRoute.name !== VIEWS.COMMUNITY_NODES) {
+ this.$router.push({ name: VIEWS.COMMUNITY_NODES });
+ }
+ break;
+ default:
+ break;
+ }
+ },
},
});