mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
chore(editor): Increase trigger dropdown width (#18121)
This commit is contained in:
@@ -28,6 +28,7 @@ interface ActionDropdownProps {
|
|||||||
hideArrow?: boolean;
|
hideArrow?: boolean;
|
||||||
teleported?: boolean;
|
teleported?: boolean;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
|
extraPopperClass?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<ActionDropdownProps>(), {
|
const props = withDefaults(defineProps<ActionDropdownProps>(), {
|
||||||
@@ -67,7 +68,8 @@ defineSlots<{
|
|||||||
const elementDropdown = ref<InstanceType<typeof ElDropdown>>();
|
const elementDropdown = ref<InstanceType<typeof ElDropdown>>();
|
||||||
|
|
||||||
const popperClass = computed(
|
const popperClass = computed(
|
||||||
() => `${$style.shadow}${props.hideArrow ? ` ${$style.hideArrow}` : ''}`,
|
() =>
|
||||||
|
`${$style.shadow}${props.hideArrow ? ` ${$style.hideArrow}` : ''} ${props.extraPopperClass ?? ''}`,
|
||||||
);
|
);
|
||||||
|
|
||||||
const onSelect = (action: string) => emit('select', action);
|
const onSelect = (action: string) => emit('select', action);
|
||||||
@@ -127,7 +129,12 @@ defineExpose({ open, close });
|
|||||||
{{ item.label }}
|
{{ item.label }}
|
||||||
</slot>
|
</slot>
|
||||||
</span>
|
</span>
|
||||||
<N8nIcon v-if="item.checked" icon="check" :size="iconSize" />
|
<N8nIcon
|
||||||
|
v-if="item.checked"
|
||||||
|
:class="$style.checkIcon"
|
||||||
|
icon="check"
|
||||||
|
:size="iconSize"
|
||||||
|
/>
|
||||||
<span v-if="item.badge">
|
<span v-if="item.badge">
|
||||||
<N8nBadge theme="primary" size="xsmall" v-bind="item.badgeProps">
|
<N8nBadge theme="primary" size="xsmall" v-bind="item.badgeProps">
|
||||||
{{ item.badge }}
|
{{ item.badge }}
|
||||||
@@ -200,6 +207,11 @@ defineExpose({ open, close });
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.checkIcon {
|
||||||
|
flex-grow: 0;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.shortcut {
|
.shortcut {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ const actions = computed(() =>
|
|||||||
return aY === bY ? aX - bX : aY - bY;
|
return aY === bY ? aX - bX : aY - bY;
|
||||||
})
|
})
|
||||||
.map<ActionDropdownItem>((node) => ({
|
.map<ActionDropdownItem>((node) => ({
|
||||||
label: truncateBeforeLast(node.name, 25),
|
label: truncateBeforeLast(node.name, 50),
|
||||||
disabled: !!node.disabled || props.executing,
|
disabled: !!node.disabled || props.executing,
|
||||||
id: node.name,
|
id: node.name,
|
||||||
checked: props.selectedTriggerNodeName === node.name,
|
checked: props.selectedTriggerNodeName === node.name,
|
||||||
@@ -112,6 +112,7 @@ function getNodeTypeByName(name: string): INodeTypeDescription | null {
|
|||||||
:items="actions"
|
:items="actions"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
placement="top"
|
placement="top"
|
||||||
|
:extra-popper-class="$style.menuPopper"
|
||||||
@select="emit('selectTriggerNode', $event)"
|
@select="emit('selectTriggerNode', $event)"
|
||||||
>
|
>
|
||||||
<template #activator>
|
<template #activator>
|
||||||
@@ -174,6 +175,11 @@ function getNodeTypeByName(name: string): INodeTypeDescription | null {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.menuPopper {
|
||||||
|
// Width upper bound is enforced by char count instead
|
||||||
|
max-width: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
.menuItem {
|
.menuItem {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
Reference in New Issue
Block a user