mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
feat(editor): Show parameter hint on multilines (#5014)
Single/multi line for hints.
This commit is contained in:
@@ -1,12 +1,15 @@
|
||||
<template>
|
||||
<n8n-text size="small" color="text-base" tag="div" v-if="hint">
|
||||
<div v-if="!renderHTML" :class="{ [$style.hint]: true, [$style.highlight]: highlight }">
|
||||
<div
|
||||
v-if="!renderHTML"
|
||||
:class="{ [$style.singleline]: singleLine, [$style.highlight]: highlight }"
|
||||
>
|
||||
{{ hint }}
|
||||
</div>
|
||||
<div
|
||||
v-else
|
||||
ref="hint"
|
||||
:class="{ [$style.hint]: true, [$style.highlight]: highlight }"
|
||||
:class="{ [$style.singleline]: singleLine, [$style.highlight]: highlight }"
|
||||
v-html="sanitizeHtml(hint)"
|
||||
></div>
|
||||
</n8n-text>
|
||||
@@ -25,6 +28,9 @@ export default Vue.extend({
|
||||
highlight: {
|
||||
type: Boolean,
|
||||
},
|
||||
singleLine: {
|
||||
type: Boolean,
|
||||
},
|
||||
renderHTML: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
@@ -42,12 +48,11 @@ export default Vue.extend({
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
.hint {
|
||||
.singleline {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
color: var(--color-secondary);
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
data-test-id="parameter-expression-preview"
|
||||
:highlight="!!(expressionOutput && targetItem)"
|
||||
:hint="expressionOutput"
|
||||
:singleLine="true"
|
||||
/>
|
||||
<input-hint
|
||||
v-else-if="parameterHint"
|
||||
|
||||
Reference in New Issue
Block a user