mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-02 07:01:30 -08:00
fix docs in custom nodes
This commit is contained in:
parent
c951ecec25
commit
0d88d9d061
|
@ -958,3 +958,11 @@ export type IFormBoxConfig = {
|
||||||
redirectLink?: string;
|
redirectLink?: string;
|
||||||
redirectText?: string;
|
redirectText?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export interface ITab {
|
||||||
|
value: string | number;
|
||||||
|
label?: string;
|
||||||
|
href?: string,
|
||||||
|
icon?: string;
|
||||||
|
align?: 'right';
|
||||||
|
};
|
||||||
|
|
|
@ -1,20 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<n8n-tabs
|
<n8n-tabs
|
||||||
:options="[
|
:options="options"
|
||||||
{
|
|
||||||
label: $locale.baseText('nodeSettings.parameters'),
|
|
||||||
value: 'params'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: $locale.baseText('nodeSettings.docs'),
|
|
||||||
value: 'docs',
|
|
||||||
href: documentationUrl,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: 'cog',
|
|
||||||
value: 'settings',
|
|
||||||
align: 'right',
|
|
||||||
}]"
|
|
||||||
:value="value"
|
:value="value"
|
||||||
@input="onTabSelect"
|
@input="onTabSelect"
|
||||||
/>
|
/>
|
||||||
|
@ -22,6 +8,7 @@
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { externalHooks } from '@/components/mixins/externalHooks';
|
import { externalHooks } from '@/components/mixins/externalHooks';
|
||||||
|
import { ITab } from '@/Interface';
|
||||||
import { INodeTypeDescription } from 'n8n-workflow';
|
import { INodeTypeDescription } from 'n8n-workflow';
|
||||||
|
|
||||||
import mixins from 'vue-typed-mixins';
|
import mixins from 'vue-typed-mixins';
|
||||||
|
@ -54,6 +41,30 @@ export default mixins(
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
},
|
},
|
||||||
|
options (): ITab[] {
|
||||||
|
const options: ITab[] = [
|
||||||
|
{
|
||||||
|
label: this.$locale.baseText('nodeSettings.parameters'),
|
||||||
|
value: 'params',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
if (this.documentationUrl) {
|
||||||
|
options.push({
|
||||||
|
label: this.$locale.baseText('nodeSettings.docs'),
|
||||||
|
value: 'docs',
|
||||||
|
href: this.documentationUrl,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
options.push(
|
||||||
|
{
|
||||||
|
icon: 'cog',
|
||||||
|
value: 'settings',
|
||||||
|
align: 'right',
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
return options;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onTabSelect(tab: string) {
|
onTabSelect(tab: string) {
|
||||||
|
|
Loading…
Reference in a new issue