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:
@@ -3,7 +3,7 @@
|
||||
<div :class="$style.header">
|
||||
<n8n-heading size="2xlarge">
|
||||
{{ $locale.baseText('settings.api') }}
|
||||
<span :style="{ fontSize: 'var(--font-size-s)', color: 'var(--color-text-light)', }">
|
||||
<span :style="{ fontSize: 'var(--font-size-s)', color: 'var(--color-text-light)' }">
|
||||
({{ $locale.baseText('beta') }})
|
||||
</span>
|
||||
</n8n-heading>
|
||||
@@ -57,7 +57,11 @@
|
||||
</div>
|
||||
<n8n-action-box
|
||||
v-else-if="mounted"
|
||||
:buttonText="$locale.baseText(loading ? 'settings.api.create.button.loading' : 'settings.api.create.button')"
|
||||
:buttonText="
|
||||
$locale.baseText(
|
||||
loading ? 'settings.api.create.button.loading' : 'settings.api.create.button',
|
||||
)
|
||||
"
|
||||
:description="$locale.baseText('settings.api.create.description')"
|
||||
@click="createApiKey"
|
||||
/>
|
||||
@@ -75,9 +79,7 @@ import { useSettingsStore } from '@/stores/settings';
|
||||
import { useRootStore } from '@/stores/n8nRootStore';
|
||||
import { useUsersStore } from '@/stores/users';
|
||||
|
||||
export default mixins(
|
||||
showMessage,
|
||||
).extend({
|
||||
export default mixins(showMessage).extend({
|
||||
name: 'SettingsPersonalView',
|
||||
components: {
|
||||
CopyInput,
|
||||
@@ -98,11 +100,7 @@ export default mixins(
|
||||
this.apiPlaygroundPath = `${baseUrl}${apiPath}/v${latestVersion}/docs`;
|
||||
},
|
||||
computed: {
|
||||
...mapStores(
|
||||
useRootStore,
|
||||
useSettingsStore,
|
||||
useUsersStore,
|
||||
),
|
||||
...mapStores(useRootStore, useSettingsStore, useUsersStore),
|
||||
currentUser(): IUser | null {
|
||||
return this.usersStore.currentUser;
|
||||
},
|
||||
@@ -122,7 +120,7 @@ export default mixins(
|
||||
},
|
||||
async getApiKey() {
|
||||
try {
|
||||
this.apiKey = await this.settingsStore.getApiKey() || '';
|
||||
this.apiKey = (await this.settingsStore.getApiKey()) || '';
|
||||
} catch (error) {
|
||||
this.$showError(error, this.$locale.baseText('settings.api.view.error'));
|
||||
} finally {
|
||||
@@ -133,7 +131,7 @@ export default mixins(
|
||||
this.loading = true;
|
||||
|
||||
try {
|
||||
this.apiKey = await this.settingsStore.createApiKey() || '';
|
||||
this.apiKey = (await this.settingsStore.createApiKey()) || '';
|
||||
} catch (error) {
|
||||
this.$showError(error, this.$locale.baseText('settings.api.create.error'));
|
||||
} finally {
|
||||
@@ -144,7 +142,10 @@ export default mixins(
|
||||
async deleteApiKey() {
|
||||
try {
|
||||
await this.settingsStore.deleteApiKey();
|
||||
this.$showMessage({ title: this.$locale.baseText("settings.api.delete.toast"), type: 'success' });
|
||||
this.$showMessage({
|
||||
title: this.$locale.baseText('settings.api.delete.toast'),
|
||||
type: 'success',
|
||||
});
|
||||
this.apiKey = '';
|
||||
} catch (error) {
|
||||
this.$showError(error, this.$locale.baseText('settings.api.delete.error'));
|
||||
@@ -191,4 +192,3 @@ export default mixins(
|
||||
color: var(--color-text-light);
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user