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

@@ -1,8 +1,5 @@
<template>
<n8n-notice
:content="scopesShortContent"
:fullContent="scopesFullContent"
/>
<n8n-notice :content="scopesShortContent" :fullContent="scopesFullContent" />
</template>
<script lang="ts">
@@ -12,45 +9,35 @@ import Vue from 'vue';
export default Vue.extend({
name: 'ScopesNotice',
props: [
'activeCredentialType',
'scopes',
],
props: ['activeCredentialType', 'scopes'],
computed: {
...mapStores(
useCredentialsStore,
),
scopesShortContent (): string {
return this.$locale.baseText(
'nodeSettings.scopes.notice',
{
adjustToNumber: this.scopes.length,
interpolate: {
activeCredential: this.shortCredentialDisplayName,
},
...mapStores(useCredentialsStore),
scopesShortContent(): string {
return this.$locale.baseText('nodeSettings.scopes.notice', {
adjustToNumber: this.scopes.length,
interpolate: {
activeCredential: this.shortCredentialDisplayName,
},
);
});
},
scopesFullContent (): string {
return this.$locale.baseText(
'nodeSettings.scopes.expandedNoticeWithScopes',
{
adjustToNumber: this.scopes.length,
interpolate: {
activeCredential: this.shortCredentialDisplayName,
scopes: this.scopes.map(
(s: string) => s.includes('/') ? s.split('/').pop() : s,
).join('<br>'),
},
scopesFullContent(): string {
return this.$locale.baseText('nodeSettings.scopes.expandedNoticeWithScopes', {
adjustToNumber: this.scopes.length,
interpolate: {
activeCredential: this.shortCredentialDisplayName,
scopes: this.scopes
.map((s: string) => (s.includes('/') ? s.split('/').pop() : s))
.join('<br>'),
},
);
});
},
shortCredentialDisplayName (): string {
shortCredentialDisplayName(): string {
const oauth1Api = this.$locale.baseText('generic.oauth1Api');
const oauth2Api = this.$locale.baseText('generic.oauth2Api');
return this.credentialsStore.getCredentialTypeByName(this.activeCredentialType).displayName
.replace(new RegExp(`${oauth1Api}|${oauth2Api}`), '')
return this.credentialsStore
.getCredentialTypeByName(this.activeCredentialType)
.displayName.replace(new RegExp(`${oauth1Api}|${oauth2Api}`), '')
.trim();
},
},