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>
|
<template>
|
||||||
<n8n-text size="small" color="text-base" tag="div" v-if="hint">
|
<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 }}
|
{{ hint }}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-else
|
v-else
|
||||||
ref="hint"
|
ref="hint"
|
||||||
:class="{ [$style.hint]: true, [$style.highlight]: highlight }"
|
:class="{ [$style.singleline]: singleLine, [$style.highlight]: highlight }"
|
||||||
v-html="sanitizeHtml(hint)"
|
v-html="sanitizeHtml(hint)"
|
||||||
></div>
|
></div>
|
||||||
</n8n-text>
|
</n8n-text>
|
||||||
@@ -25,6 +28,9 @@ export default Vue.extend({
|
|||||||
highlight: {
|
highlight: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
},
|
},
|
||||||
|
singleLine: {
|
||||||
|
type: Boolean,
|
||||||
|
},
|
||||||
renderHTML: {
|
renderHTML: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
@@ -42,12 +48,11 @@ export default Vue.extend({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" module>
|
<style lang="scss" module>
|
||||||
.hint {
|
.singleline {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
.highlight {
|
.highlight {
|
||||||
color: var(--color-secondary);
|
color: var(--color-secondary);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
data-test-id="parameter-expression-preview"
|
data-test-id="parameter-expression-preview"
|
||||||
:highlight="!!(expressionOutput && targetItem)"
|
:highlight="!!(expressionOutput && targetItem)"
|
||||||
:hint="expressionOutput"
|
:hint="expressionOutput"
|
||||||
|
:singleLine="true"
|
||||||
/>
|
/>
|
||||||
<input-hint
|
<input-hint
|
||||||
v-else-if="parameterHint"
|
v-else-if="parameterHint"
|
||||||
|
|||||||
Reference in New Issue
Block a user