mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 19:32: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:
@@ -4,7 +4,11 @@
|
||||
|
||||
<script lang="ts">
|
||||
import { externalHooks } from '@/mixins/externalHooks';
|
||||
import { BUILTIN_NODES_DOCS_URL, COMMUNITY_NODES_INSTALLATION_DOCS_URL, NPM_PACKAGE_DOCS_BASE_URL } from '@/constants';
|
||||
import {
|
||||
BUILTIN_NODES_DOCS_URL,
|
||||
COMMUNITY_NODES_INSTALLATION_DOCS_URL,
|
||||
NPM_PACKAGE_DOCS_BASE_URL,
|
||||
} from '@/constants';
|
||||
import { INodeUi, ITab } from '@/Interface';
|
||||
import { useNDVStore } from '@/stores/ndv';
|
||||
import { useWorkflowsStore } from '@/stores/workflows';
|
||||
@@ -14,29 +18,23 @@ import { mapStores } from 'pinia';
|
||||
import mixins from 'vue-typed-mixins';
|
||||
import { isCommunityPackageName } from '@/utils';
|
||||
|
||||
export default mixins(
|
||||
externalHooks,
|
||||
).extend({
|
||||
export default mixins(externalHooks).extend({
|
||||
name: 'NodeSettingsTabs',
|
||||
props: {
|
||||
value: {
|
||||
type: String,
|
||||
},
|
||||
nodeType: {
|
||||
},
|
||||
nodeType: {},
|
||||
sessionId: {
|
||||
type: String,
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
...mapStores(
|
||||
useNDVStore,
|
||||
useWorkflowsStore,
|
||||
),
|
||||
...mapStores(useNDVStore, useWorkflowsStore),
|
||||
activeNode(): INodeUi | null {
|
||||
return this.ndvStore.activeNode;
|
||||
},
|
||||
documentationUrl (): string {
|
||||
documentationUrl(): string {
|
||||
const nodeType = this.nodeType as INodeTypeDescription | null;
|
||||
|
||||
if (!nodeType) {
|
||||
@@ -47,8 +45,10 @@ export default mixins(
|
||||
return nodeType.documentationUrl;
|
||||
}
|
||||
|
||||
const utmTags = '?utm_source=n8n_app&utm_medium=node_settings_modal-credential_link' +
|
||||
'&utm_campaign=' + nodeType.name;
|
||||
const utmTags =
|
||||
'?utm_source=n8n_app&utm_medium=node_settings_modal-credential_link' +
|
||||
'&utm_campaign=' +
|
||||
nodeType.name;
|
||||
|
||||
// Built-in node documentation available via its codex entry
|
||||
const primaryDocUrl = nodeType.codex?.resources?.primaryDocumentation?.[0]?.url;
|
||||
@@ -74,7 +74,7 @@ export default mixins(
|
||||
const nodeType = this.nodeType as INodeTypeDescription;
|
||||
return nodeType.name.split('.')[0];
|
||||
},
|
||||
options (): ITab[] {
|
||||
options(): ITab[] {
|
||||
const options: ITab[] = [
|
||||
{
|
||||
label: this.$locale.baseText('nodeSettings.parameters'),
|
||||
@@ -103,13 +103,11 @@ export default mixins(
|
||||
}
|
||||
// If both tabs have align right, both will have excessive left margin
|
||||
const pushCogRight = this.isCommunityNode ? false : true;
|
||||
options.push(
|
||||
{
|
||||
icon: 'cog',
|
||||
value: 'settings',
|
||||
align: pushCogRight ? 'right': undefined,
|
||||
},
|
||||
);
|
||||
options.push({
|
||||
icon: 'cog',
|
||||
value: 'settings',
|
||||
align: pushCogRight ? 'right' : undefined,
|
||||
});
|
||||
|
||||
return options;
|
||||
},
|
||||
@@ -117,7 +115,10 @@ export default mixins(
|
||||
methods: {
|
||||
onTabSelect(tab: string) {
|
||||
if (tab === 'docs' && this.nodeType) {
|
||||
this.$externalHooks().run('dataDisplay.onDocumentationUrlClick', { nodeType: this.nodeType as INodeTypeDescription, documentationUrl: this.documentationUrl });
|
||||
this.$externalHooks().run('dataDisplay.onDocumentationUrlClick', {
|
||||
nodeType: this.nodeType as INodeTypeDescription,
|
||||
documentationUrl: this.documentationUrl,
|
||||
});
|
||||
this.$telemetry.track('User clicked ndv link', {
|
||||
node_type: this.activeNode.type,
|
||||
workflow_id: this.workflowsStore.workflowId,
|
||||
@@ -127,8 +128,11 @@ export default mixins(
|
||||
});
|
||||
}
|
||||
|
||||
if(tab === 'settings' && this.nodeType) {
|
||||
this.$telemetry.track('User viewed node settings', { node_type: (this.nodeType as INodeTypeDescription).name, workflow_id: this.workflowsStore.workflowId });
|
||||
if (tab === 'settings' && this.nodeType) {
|
||||
this.$telemetry.track('User viewed node settings', {
|
||||
node_type: (this.nodeType as INodeTypeDescription).name,
|
||||
workflow_id: this.workflowsStore.workflowId,
|
||||
});
|
||||
}
|
||||
|
||||
if (tab === 'settings' || tab === 'params') {
|
||||
@@ -145,7 +149,6 @@ export default mixins(
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
#communityNode > div {
|
||||
cursor: auto;
|
||||
|
||||
@@ -153,5 +156,4 @@ export default mixins(
|
||||
color: unset;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user