mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +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:
@@ -6,7 +6,7 @@
|
||||
id="app"
|
||||
:class="{
|
||||
[$style.container]: true,
|
||||
[$style.sidebarCollapsed]: uiStore.sidebarMenuCollapsed
|
||||
[$style.sidebarCollapsed]: uiStore.sidebarMenuCollapsed,
|
||||
}"
|
||||
>
|
||||
<div id="header" :class="$style.header">
|
||||
@@ -47,12 +47,7 @@ import { useTemplatesStore } from './stores/templates';
|
||||
import { useNodeTypesStore } from './stores/nodeTypes';
|
||||
import { historyHelper } from '@/mixins/history';
|
||||
|
||||
export default mixins(
|
||||
showMessage,
|
||||
userHelpers,
|
||||
restApi,
|
||||
historyHelper,
|
||||
).extend({
|
||||
export default mixins(showMessage, userHelpers, restApi, historyHelper).extend({
|
||||
name: 'App',
|
||||
components: {
|
||||
LoadingView,
|
||||
@@ -68,14 +63,14 @@ export default mixins(
|
||||
},
|
||||
computed: {
|
||||
...mapStores(
|
||||
useNodeTypesStore,
|
||||
useRootStore,
|
||||
useSettingsStore,
|
||||
useTemplatesStore,
|
||||
useUIStore,
|
||||
useUsersStore,
|
||||
),
|
||||
defaultLocale (): string {
|
||||
useNodeTypesStore,
|
||||
useRootStore,
|
||||
useSettingsStore,
|
||||
useTemplatesStore,
|
||||
useUIStore,
|
||||
useUsersStore,
|
||||
),
|
||||
defaultLocale(): string {
|
||||
return this.rootStore.defaultLocale;
|
||||
},
|
||||
},
|
||||
@@ -110,8 +105,7 @@ export default mixins(
|
||||
}
|
||||
try {
|
||||
await this.settingsStore.testTemplatesEndpoint();
|
||||
} catch (e) {
|
||||
}
|
||||
} catch (e) {}
|
||||
},
|
||||
logHiringBanner() {
|
||||
if (this.settingsStore.isHiringBannerEnabled && this.$route.name !== VIEWS.DEMO) {
|
||||
@@ -126,8 +120,7 @@ export default mixins(
|
||||
this.uiStore.currentView = this.$route.name || '';
|
||||
if (this.$route && this.$route.meta && this.$route.meta.templatesEnabled) {
|
||||
this.templatesStore.setSessionId();
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
this.templatesStore.resetSessionId(); // reset telemetry session id when user leaves template pages
|
||||
}
|
||||
|
||||
@@ -161,7 +154,8 @@ export default mixins(
|
||||
// if cannot access page and is logged in, respect signin redirect
|
||||
if (this.$route.name === VIEWS.SIGNIN && typeof this.$route.query.redirect === 'string') {
|
||||
const redirect = decodeURIComponent(this.$route.query.redirect);
|
||||
if (redirect.startsWith('/')) { // protect against phishing
|
||||
if (redirect.startsWith('/')) {
|
||||
// protect against phishing
|
||||
this.$router.replace(redirect);
|
||||
return;
|
||||
}
|
||||
@@ -171,7 +165,10 @@ export default mixins(
|
||||
this.$router.replace({ name: VIEWS.HOMEPAGE });
|
||||
},
|
||||
redirectIfNecessary() {
|
||||
const redirect = this.$route.meta && typeof this.$route.meta.getRedirect === 'function' && this.$route.meta.getRedirect();
|
||||
const redirect =
|
||||
this.$route.meta &&
|
||||
typeof this.$route.meta.getRedirect === 'function' &&
|
||||
this.$route.meta.getRedirect();
|
||||
if (redirect) {
|
||||
this.$router.replace(redirect);
|
||||
}
|
||||
@@ -221,11 +218,11 @@ export default mixins(
|
||||
|
||||
.container {
|
||||
display: grid;
|
||||
grid-template-areas:
|
||||
"sidebar header"
|
||||
"sidebar content";
|
||||
grid-auto-columns: fit-content($sidebar-expanded-width) 1fr;
|
||||
grid-template-rows: fit-content($sidebar-width) 1fr;
|
||||
grid-template-areas:
|
||||
'sidebar header'
|
||||
'sidebar content';
|
||||
grid-auto-columns: fit-content($sidebar-expanded-width) 1fr;
|
||||
grid-template-rows: fit-content($sidebar-width) 1fr;
|
||||
}
|
||||
|
||||
.content {
|
||||
|
||||
Reference in New Issue
Block a user