mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +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:
@@ -10,7 +10,7 @@
|
||||
@update:filters="filters = $event"
|
||||
>
|
||||
<template #default="{ data }">
|
||||
<credential-card :data="data"/>
|
||||
<credential-card :data="data" />
|
||||
</template>
|
||||
<template #filters="{ setKeyValue }">
|
||||
<div class="mb-s">
|
||||
@@ -43,22 +43,22 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import {showMessage} from '@/mixins/showMessage';
|
||||
import {ICredentialsResponse, ICredentialTypeMap, IUser} from '@/Interface';
|
||||
import { showMessage } from '@/mixins/showMessage';
|
||||
import { ICredentialsResponse, ICredentialTypeMap, IUser } from '@/Interface';
|
||||
import mixins from 'vue-typed-mixins';
|
||||
|
||||
import SettingsView from './SettingsView.vue';
|
||||
import ResourcesListLayout from "@/components/layouts/ResourcesListLayout.vue";
|
||||
import PageViewLayout from "@/components/layouts/PageViewLayout.vue";
|
||||
import PageViewLayoutList from "@/components/layouts/PageViewLayoutList.vue";
|
||||
import CredentialCard from "@/components/CredentialCard.vue";
|
||||
import {ICredentialType} from "n8n-workflow";
|
||||
import TemplateCard from "@/components/TemplateCard.vue";
|
||||
import ResourcesListLayout from '@/components/layouts/ResourcesListLayout.vue';
|
||||
import PageViewLayout from '@/components/layouts/PageViewLayout.vue';
|
||||
import PageViewLayoutList from '@/components/layouts/PageViewLayoutList.vue';
|
||||
import CredentialCard from '@/components/CredentialCard.vue';
|
||||
import { ICredentialType } from 'n8n-workflow';
|
||||
import TemplateCard from '@/components/TemplateCard.vue';
|
||||
import { debounceHelper } from '@/mixins/debounce';
|
||||
import ResourceOwnershipSelect from "@/components/forms/ResourceOwnershipSelect.ee.vue";
|
||||
import ResourceFiltersDropdown from "@/components/forms/ResourceFiltersDropdown.vue";
|
||||
import {CREDENTIAL_SELECT_MODAL_KEY} from '@/constants';
|
||||
import Vue from "vue";
|
||||
import ResourceOwnershipSelect from '@/components/forms/ResourceOwnershipSelect.ee.vue';
|
||||
import ResourceFiltersDropdown from '@/components/forms/ResourceFiltersDropdown.vue';
|
||||
import { CREDENTIAL_SELECT_MODAL_KEY } from '@/constants';
|
||||
import Vue from 'vue';
|
||||
import { mapStores } from 'pinia';
|
||||
import { useUIStore } from '@/stores/ui';
|
||||
import { useUsersStore } from '@/stores/users';
|
||||
@@ -67,10 +67,7 @@ import { useCredentialsStore } from '@/stores/credentials';
|
||||
|
||||
type IResourcesListLayoutInstance = Vue & { sendFiltersTelemetry: (source: string) => void };
|
||||
|
||||
export default mixins(
|
||||
showMessage,
|
||||
debounceHelper,
|
||||
).extend({
|
||||
export default mixins(showMessage, debounceHelper).extend({
|
||||
name: 'SettingsPersonalView',
|
||||
components: {
|
||||
ResourcesListLayout,
|
||||
@@ -93,12 +90,7 @@ export default mixins(
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapStores(
|
||||
useCredentialsStore,
|
||||
useNodeTypesStore,
|
||||
useUIStore,
|
||||
useUsersStore,
|
||||
),
|
||||
...mapStores(useCredentialsStore, useNodeTypesStore, useUIStore, useUsersStore),
|
||||
allCredentials(): ICredentialsResponse[] {
|
||||
return this.credentialsStore.allCredentials;
|
||||
},
|
||||
@@ -118,7 +110,6 @@ export default mixins(
|
||||
});
|
||||
},
|
||||
async initialize() {
|
||||
|
||||
const loadPromises = [
|
||||
this.credentialsStore.fetchAllCredentials(),
|
||||
this.credentialsStore.fetchCredentialTypes(false),
|
||||
@@ -132,7 +123,11 @@ export default mixins(
|
||||
|
||||
this.usersStore.fetchUsers(); // Can be loaded in the background, used for filtering
|
||||
},
|
||||
onFilter(resource: ICredentialsResponse, filters: { type: string[]; search: string; }, matches: boolean): boolean {
|
||||
onFilter(
|
||||
resource: ICredentialsResponse,
|
||||
filters: { type: string[]; search: string },
|
||||
matches: boolean,
|
||||
): boolean {
|
||||
if (filters.type.length > 0) {
|
||||
matches = matches && filters.type.includes(resource.type);
|
||||
}
|
||||
@@ -140,9 +135,12 @@ export default mixins(
|
||||
if (filters.search) {
|
||||
const searchString = filters.search.toLowerCase();
|
||||
|
||||
matches = matches || (
|
||||
this.credentialTypesById[resource.type] && this.credentialTypesById[resource.type].displayName.toLowerCase().includes(searchString)
|
||||
);
|
||||
matches =
|
||||
matches ||
|
||||
(this.credentialTypesById[resource.type] &&
|
||||
this.credentialTypesById[resource.type].displayName
|
||||
.toLowerCase()
|
||||
.includes(searchString));
|
||||
}
|
||||
|
||||
return matches;
|
||||
@@ -168,4 +166,3 @@ export default mixins(
|
||||
padding: 0 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user