mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-21 02:56:40 -08:00
feat(editor): Show parameter hint on multilines (#5014)
Single/multi line for hints.
This commit is contained in:
parent
40a934bbb4
commit
1942fd8232
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue