feat: HTML node (#5107)
* ✨ Create HTML templating node PoC * ♻️ Apply feedback * 🐛 Scope CSS selectors * ✏️ Adjust description * ✏️ Adjust placeholder * ⚡ Replace two custom files with package output * ➕ Add `codemirror-lang-html-n8n` * 👕 Appease linter * 🧪 Skip event bus tests * ⏪ Revert "Skip event bus tests" This reverts commit 5702585d0de3b8465660567132e9003e78f1104c. * ✏️ Update codex * 🧹 Cleanup * 🐛 Restore original for `continueOnFail` * ⚡ Improve `getResolvables`
This commit is contained in:
@@ -28,6 +28,9 @@
|
||||
import { NodeParameterValueType } from 'n8n-workflow';
|
||||
import Vue, { PropType } from 'vue';
|
||||
import { isValueExpression, isResourceLocatorValue } from '@/utils';
|
||||
import { useNDVStore } from '@/stores/ndv';
|
||||
import { mapStores } from 'pinia';
|
||||
import { HTML_NODE_TYPE } from '@/constants';
|
||||
|
||||
export default Vue.extend({
|
||||
name: 'parameter-options',
|
||||
@@ -51,6 +54,7 @@ export default Vue.extend({
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
...mapStores(useNDVStore),
|
||||
isDefault(): boolean {
|
||||
return this.parameter.default === this.value;
|
||||
},
|
||||
@@ -91,6 +95,18 @@ export default Vue.extend({
|
||||
return !!this.getArgument('loadOptionsMethod') || !!this.getArgument('loadOptions');
|
||||
},
|
||||
actions(): Array<{ label: string; value: string; disabled?: boolean }> {
|
||||
if (
|
||||
this.ndvStore.activeNode?.type === HTML_NODE_TYPE &&
|
||||
this.ndvStore.activeNode?.parameters.operation === 'generateHtmlTemplate'
|
||||
) {
|
||||
return [
|
||||
{
|
||||
label: 'Format HTML',
|
||||
value: 'formatHtml',
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
const actions = [
|
||||
{
|
||||
label: this.$locale.baseText('parameterInput.resetValue'),
|
||||
|
||||
Reference in New Issue
Block a user