refactor(editor): Apply Prettier (no-changelog) (#4920)

*  Adjust `format` script

* 🔥 Remove exemption for `editor-ui`

* 🎨 Prettify

* 👕 Fix lint
This commit is contained in:
Iván Ovejero
2022-12-14 10:04:10 +01:00
committed by GitHub
parent bcde07e032
commit 5ca2148c7e
284 changed files with 19247 additions and 15540 deletions

View File

@@ -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'));
}