mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 03:12:15 +00:00
refactor(editor): Apply Prettier (no-changelog) (#4920)
* ⚡ Adjust `format` script * 🔥 Remove exemption for `editor-ui` * 🎨 Prettify * 👕 Fix lint
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
import mixins from 'vue-typed-mixins';
|
||||
import { ABOUT_MODAL_KEY, VERSIONS_MODAL_KEY, VIEWS } from '@/constants';
|
||||
import { userHelpers } from '@/mixins/userHelpers';
|
||||
import { pushConnection } from "@/mixins/pushConnection";
|
||||
import { pushConnection } from '@/mixins/pushConnection';
|
||||
import { IFakeDoor } from '@/Interface';
|
||||
import { IMenuItem } from 'n8n-design-system';
|
||||
import { BaseTextKey } from '@/plugins/i18n';
|
||||
@@ -33,22 +33,14 @@ import { useUIStore } from '@/stores/ui';
|
||||
import { useSettingsStore } from '@/stores/settings';
|
||||
import { useRootStore } from '@/stores/n8nRootStore';
|
||||
|
||||
export default mixins(
|
||||
userHelpers,
|
||||
pushConnection,
|
||||
).extend({
|
||||
export default mixins(userHelpers, pushConnection).extend({
|
||||
name: 'SettingsSidebar',
|
||||
computed: {
|
||||
...mapStores(
|
||||
useRootStore,
|
||||
useSettingsStore,
|
||||
useUIStore,
|
||||
),
|
||||
...mapStores(useRootStore, useSettingsStore, useUIStore),
|
||||
settingsFakeDoorFeatures(): IFakeDoor[] {
|
||||
return this.uiStore.getFakeDoorByLocation('settings');
|
||||
},
|
||||
sidebarMenuItems(): IMenuItem[] {
|
||||
|
||||
const menuItems: IMenuItem[] = [
|
||||
{
|
||||
id: 'settings-personal',
|
||||
@@ -56,7 +48,7 @@ export default mixins(
|
||||
label: this.$locale.baseText('settings.personal'),
|
||||
position: 'top',
|
||||
available: this.canAccessPersonalSettings(),
|
||||
activateOnRouteNames: [ VIEWS.PERSONAL_SETTINGS ],
|
||||
activateOnRouteNames: [VIEWS.PERSONAL_SETTINGS],
|
||||
},
|
||||
{
|
||||
id: 'settings-users',
|
||||
@@ -64,7 +56,7 @@ export default mixins(
|
||||
label: this.$locale.baseText('settings.users'),
|
||||
position: 'top',
|
||||
available: this.canAccessUsersSettings(),
|
||||
activateOnRouteNames: [ VIEWS.USERS_SETTINGS ],
|
||||
activateOnRouteNames: [VIEWS.USERS_SETTINGS],
|
||||
},
|
||||
{
|
||||
id: 'settings-api',
|
||||
@@ -72,7 +64,7 @@ export default mixins(
|
||||
label: this.$locale.baseText('settings.n8napi'),
|
||||
position: 'top',
|
||||
available: this.canAccessApiSettings(),
|
||||
activateOnRouteNames: [ VIEWS.API_SETTINGS ],
|
||||
activateOnRouteNames: [VIEWS.API_SETTINGS],
|
||||
},
|
||||
];
|
||||
|
||||
@@ -84,21 +76,19 @@ export default mixins(
|
||||
label: this.$locale.baseText(item.featureName as BaseTextKey),
|
||||
position: 'top',
|
||||
available: true,
|
||||
activateOnRoutePaths: [ `/settings/coming-soon/${item.id}` ],
|
||||
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 ],
|
||||
},
|
||||
);
|
||||
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;
|
||||
},
|
||||
@@ -125,7 +115,7 @@ export default mixins(
|
||||
openUpdatesPanel() {
|
||||
this.uiStore.openModal(VERSIONS_MODAL_KEY);
|
||||
},
|
||||
async handleSelect (key: string) {
|
||||
async handleSelect(key: string) {
|
||||
switch (key) {
|
||||
case 'settings-personal':
|
||||
if (this.$router.currentRoute.name !== VIEWS.PERSONAL_SETTINGS) {
|
||||
@@ -161,7 +151,6 @@ export default mixins(
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
||||
.container {
|
||||
min-width: $sidebar-expanded-width;
|
||||
height: 100vh;
|
||||
@@ -169,7 +158,6 @@ export default mixins(
|
||||
border-right: var(--border-base);
|
||||
position: relative;
|
||||
overflow: auto;
|
||||
|
||||
}
|
||||
|
||||
.returnButton {
|
||||
@@ -181,6 +169,9 @@ export default mixins(
|
||||
}
|
||||
|
||||
@media screen and (max-height: 420px) {
|
||||
.updatesSubmenu, .versionContainer { display: none; }
|
||||
.updatesSubmenu,
|
||||
.versionContainer {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user