mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31: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:
@@ -22,11 +22,7 @@ import { useSettingsStore } from '@/stores/settings';
|
||||
import { useUsersStore } from '@/stores/users';
|
||||
import { useCredentialsStore } from '@/stores/credentials';
|
||||
|
||||
|
||||
export default mixins(
|
||||
showMessage,
|
||||
restApi,
|
||||
).extend({
|
||||
export default mixins(showMessage, restApi).extend({
|
||||
name: 'SetupView',
|
||||
components: {
|
||||
AuthView,
|
||||
@@ -103,12 +99,7 @@ export default mixins(
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapStores(
|
||||
useCredentialsStore,
|
||||
useSettingsStore,
|
||||
useUIStore,
|
||||
useUsersStore,
|
||||
),
|
||||
...mapStores(useCredentialsStore, useSettingsStore, useUIStore, useUsersStore),
|
||||
},
|
||||
methods: {
|
||||
async getAllCredentials() {
|
||||
@@ -124,21 +115,26 @@ export default mixins(
|
||||
return true;
|
||||
}
|
||||
|
||||
const workflows = this.workflowsCount > 0
|
||||
? this.$locale.baseText(
|
||||
'auth.setup.setupConfirmation.existingWorkflows',
|
||||
{ adjustToNumber: this.workflowsCount },
|
||||
)
|
||||
: '';
|
||||
const workflows =
|
||||
this.workflowsCount > 0
|
||||
? this.$locale.baseText('auth.setup.setupConfirmation.existingWorkflows', {
|
||||
adjustToNumber: this.workflowsCount,
|
||||
})
|
||||
: '';
|
||||
|
||||
const credentials = this.credentialsCount > 0
|
||||
? this.$locale.baseText(
|
||||
'auth.setup.setupConfirmation.credentials',
|
||||
{ adjustToNumber: this.credentialsCount },
|
||||
)
|
||||
: '';
|
||||
const credentials =
|
||||
this.credentialsCount > 0
|
||||
? this.$locale.baseText('auth.setup.setupConfirmation.credentials', {
|
||||
adjustToNumber: this.credentialsCount,
|
||||
})
|
||||
: '';
|
||||
|
||||
const entities = workflows && credentials ? this.$locale.baseText('auth.setup.setupConfirmation.concatEntities', {interpolate: { workflows, credentials }}) : (workflows || credentials);
|
||||
const entities =
|
||||
workflows && credentials
|
||||
? this.$locale.baseText('auth.setup.setupConfirmation.concatEntities', {
|
||||
interpolate: { workflows, credentials },
|
||||
})
|
||||
: workflows || credentials;
|
||||
return await this.confirmMessage(
|
||||
this.$locale.baseText('auth.setup.confirmOwnerSetupMessage', {
|
||||
interpolate: {
|
||||
@@ -151,7 +147,7 @@ export default mixins(
|
||||
this.$locale.baseText('auth.setup.goBack'),
|
||||
);
|
||||
},
|
||||
async onSubmit(values: {[key: string]: string | boolean}) {
|
||||
async onSubmit(values: { [key: string]: string | boolean }) {
|
||||
try {
|
||||
const confirmSetup = await this.confirmSetupOrGoBack();
|
||||
if (!confirmSetup) {
|
||||
@@ -160,21 +156,21 @@ export default mixins(
|
||||
|
||||
const forceRedirectedHere = this.settingsStore.showSetupPage;
|
||||
this.loading = true;
|
||||
await this.usersStore.createOwner(values as { firstName: string; lastName: string; email: string; password: string;});
|
||||
await this.usersStore.createOwner(
|
||||
values as { firstName: string; lastName: string; email: string; password: string },
|
||||
);
|
||||
|
||||
if (values.agree === true) {
|
||||
try {
|
||||
await this.uiStore.submitContactEmail(values.email.toString(), values.agree);
|
||||
} catch { }
|
||||
} catch {}
|
||||
}
|
||||
|
||||
if (forceRedirectedHere) {
|
||||
await this.$router.push({ name: VIEWS.HOMEPAGE });
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
await this.$router.push({ name: VIEWS.USERS_SETTINGS });
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
this.$showError(error, this.$locale.baseText('auth.setup.settingUpOwnerError'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user