mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
fix(editor): Move overrideButton and other options to the left to line up with container boundary (no-changelog) (#13061)
This commit is contained in:
parent
2c2d63157b
commit
2492c35e90
|
@ -400,6 +400,13 @@ const getIssues = computed<string[]>(() => {
|
||||||
return [];
|
return [];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const displayIssues = computed(
|
||||||
|
() =>
|
||||||
|
props.parameter.type !== 'credentialsSelect' &&
|
||||||
|
!isResourceLocatorParameter.value &&
|
||||||
|
getIssues.value.length > 0,
|
||||||
|
);
|
||||||
|
|
||||||
const editorType = computed<EditorType | 'json' | 'code'>(() => {
|
const editorType = computed<EditorType | 'json' | 'code'>(() => {
|
||||||
return getArgument<EditorType>('editor');
|
return getArgument<EditorType>('editor');
|
||||||
});
|
});
|
||||||
|
@ -1019,6 +1026,7 @@ const isSingleLineInput = computed(() => {
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
isSingleLineInput,
|
isSingleLineInput,
|
||||||
|
displaysIssues: displayIssues.value,
|
||||||
focusInput: async () => await setFocus(),
|
focusInput: async () => await setFocus(),
|
||||||
selectInput: () => selectInput(),
|
selectInput: () => selectInput(),
|
||||||
});
|
});
|
||||||
|
@ -1597,10 +1605,7 @@ onUpdated(async () => {
|
||||||
>
|
>
|
||||||
<slot name="overrideButton" />
|
<slot name="overrideButton" />
|
||||||
</div>
|
</div>
|
||||||
<ParameterIssues
|
<ParameterIssues v-if="displayIssues" :issues="getIssues" />
|
||||||
v-if="parameter.type !== 'credentialsSelect' && !isResourceLocatorParameter"
|
|
||||||
:issues="getIssues"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -321,7 +321,13 @@ function removeOverride(clearField = false) {
|
||||||
v-if="showOverrideButton && !isSingleLineInput && optionsPosition === 'top'"
|
v-if="showOverrideButton && !isSingleLineInput && optionsPosition === 'top'"
|
||||||
#persistentOptions
|
#persistentOptions
|
||||||
>
|
>
|
||||||
<div :class="[$style.noCornersBottom, $style.overrideButtonInOptions]">
|
<div
|
||||||
|
:class="[
|
||||||
|
$style.noCornersBottom,
|
||||||
|
$style.overrideButtonInOptions,
|
||||||
|
{ [$style.overrideButtonIssueOffset]: parameterInputWrapper?.displaysIssues },
|
||||||
|
]"
|
||||||
|
>
|
||||||
<FromAiOverrideButton @click="applyOverride" />
|
<FromAiOverrideButton @click="applyOverride" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -427,6 +433,12 @@ function removeOverride(clearField = false) {
|
||||||
margin-bottom: -2px;
|
margin-bottom: -2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.overrideButtonIssueOffset {
|
||||||
|
right: 20px;
|
||||||
|
// this is necessary to push the other options to the left
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
.noCornersBottom > button {
|
.noCornersBottom > button {
|
||||||
border-bottom-right-radius: 0;
|
border-bottom-right-radius: 0;
|
||||||
border-bottom-left-radius: 0;
|
border-bottom-left-radius: 0;
|
||||||
|
|
|
@ -155,8 +155,10 @@ function onTextInput(parameterData: IUpdateInformation) {
|
||||||
|
|
||||||
const param = useTemplateRef('param');
|
const param = useTemplateRef('param');
|
||||||
const isSingleLineInput = computed(() => param.value?.isSingleLineInput);
|
const isSingleLineInput = computed(() => param.value?.isSingleLineInput);
|
||||||
|
const displaysIssues = computed(() => param.value?.displaysIssues);
|
||||||
defineExpose({
|
defineExpose({
|
||||||
isSingleLineInput,
|
isSingleLineInput,
|
||||||
|
displaysIssues,
|
||||||
focusInput: () => param.value?.focusInput(),
|
focusInput: () => param.value?.focusInput(),
|
||||||
selectInput: () => param.value?.selectInput(),
|
selectInput: () => param.value?.selectInput(),
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue