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:
@@ -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();
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user