refactor(editor): Do not use CodeNodeEditor anywhere except the Code node (no-changelog) (#8636)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2024-02-15 11:35:50 +01:00 committed by GitHub
parent 941278db68
commit bf729aa2f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 11 deletions

View file

@ -158,8 +158,7 @@ export class Code implements INodeType {
name: 'code',
type: 'string',
typeOptions: {
editor: 'codeNodeEditor',
editorLanguage: 'javaScript',
editor: 'jsEditor',
},
default: defaultCodeExecute,
hint: 'This code will only run and return data if a "Main" input & output got created.',
@ -176,8 +175,7 @@ export class Code implements INodeType {
name: 'code',
type: 'string',
typeOptions: {
editor: 'codeNodeEditor',
editorLanguage: 'javaScript',
editor: 'jsEditor',
},
default: defaultCodeSupplyData,
hint: 'This code will only run and return data if an output got created which is not "Main".',

View file

@ -99,8 +99,7 @@ export class ToolCode implements INodeType {
},
},
typeOptions: {
editor: 'codeNodeEditor',
editorLanguage: 'javaScript',
editor: 'jsEditor',
},
default:
'// Example: convert the incoming query to uppercase and return it\nreturn query.toUpperCase()',
@ -120,7 +119,7 @@ export class ToolCode implements INodeType {
},
},
typeOptions: {
editor: 'codeNodeEditor',
editor: 'codeNodeEditor', // TODO: create a separate `pythonEditor` component
editorLanguage: 'python',
},
default:

View file

@ -8,7 +8,7 @@ import { CHAT_EMBED_MODAL_KEY, CHAT_TRIGGER_NODE_TYPE, WEBHOOK_NODE_TYPE } from
import { useRootStore } from '@/stores/n8nRoot.store';
import { useWorkflowsStore } from '@/stores/workflows.store';
import HtmlEditor from '@/components/HtmlEditor/HtmlEditor.vue';
import CodeNodeEditor from '@/components/CodeNodeEditor/CodeNodeEditor.vue';
import JsEditor from '@/components/JsEditor/JsEditor.vue';
import { useI18n } from '@/composables/useI18n';
const props = defineProps({
@ -150,7 +150,7 @@ function closeDialog() {
{{ i18n.baseText('chatEmbed.install') }}
</n8n-text>
</div>
<CodeNodeEditor :model-value="commonCode.install" is-read-only />
<HtmlEditor :model-value="commonCode.install" is-read-only />
</div>
<div class="mb-s">
@ -165,8 +165,8 @@ function closeDialog() {
<HtmlEditor v-if="currentTab === 'cdn'" :model-value="cdnCode" is-read-only />
<HtmlEditor v-if="currentTab === 'vue'" :model-value="vueCode" is-read-only />
<CodeNodeEditor v-if="currentTab === 'react'" :model-value="reactCode" is-read-only />
<CodeNodeEditor v-if="currentTab === 'other'" :model-value="otherCode" is-read-only />
<JsEditor v-if="currentTab === 'react'" :model-value="reactCode" is-read-only />
<JsEditor v-if="currentTab === 'other'" :model-value="otherCode" is-read-only />
<n8n-text>
{{ i18n.baseText('chatEmbed.packageInfo.description') }}