mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-12 05:17:28 -08:00
feat(editor): Improve new canvas discovery design by specifying ALPHA version (no-changelog) (#11373)
This commit is contained in:
parent
066aa48baa
commit
197a1264d1
|
@ -118,7 +118,9 @@ defineExpose({ open, close });
|
|||
{{ item.label }}
|
||||
</span>
|
||||
<span v-if="item.badge">
|
||||
<N8nBadge theme="primary" size="xsmall">{{ item.badge }}</N8nBadge>
|
||||
<N8nBadge theme="primary" size="xsmall" v-bind="item.badgeProps">
|
||||
{{ item.badge }}
|
||||
</N8nBadge>
|
||||
</span>
|
||||
<N8nKeyboardShortcut
|
||||
v-if="item.shortcut"
|
||||
|
|
|
@ -4,6 +4,7 @@ export interface ActionDropdownItem {
|
|||
id: string;
|
||||
label: string;
|
||||
badge?: string;
|
||||
badgeProps?: Record<string, unknown>;
|
||||
icon?: string;
|
||||
divided?: boolean;
|
||||
disabled?: boolean;
|
||||
|
|
|
@ -189,9 +189,18 @@ const workflowMenuItems = computed<ActionDropdownItem[]>(() => {
|
|||
|
||||
actions.push({
|
||||
id: WORKFLOW_MENU_ACTIONS.SWITCH_NODE_VIEW_VERSION,
|
||||
...(nodeViewSwitcherDiscovered.value || nodeViewVersion.value === '2'
|
||||
...(nodeViewVersion.value === '2'
|
||||
? {}
|
||||
: { badge: locale.baseText('menuActions.badge.new') }),
|
||||
: nodeViewSwitcherDiscovered.value
|
||||
? {
|
||||
badge: locale.baseText('menuActions.badge.alpha'),
|
||||
badgeProps: {
|
||||
theme: 'tertiary',
|
||||
},
|
||||
}
|
||||
: {
|
||||
badge: locale.baseText('menuActions.badge.new'),
|
||||
}),
|
||||
label:
|
||||
nodeViewVersion.value === '2'
|
||||
? locale.baseText('menuActions.switchToOldNodeViewVersion')
|
||||
|
@ -735,7 +744,7 @@ function showCreateWorkflowSuccessToast(id?: string) {
|
|||
data-test-id="workflow-import-input"
|
||||
@change="handleFileImport()"
|
||||
/>
|
||||
<N8nTooltip dismissible :visible="isNodeViewDiscoveryTooltipVisible">
|
||||
<N8nTooltip :visible="isNodeViewDiscoveryTooltipVisible">
|
||||
<N8nActionDropdown
|
||||
:items="workflowMenuItems"
|
||||
data-test-id="workflow-menu"
|
||||
|
@ -743,6 +752,9 @@ function showCreateWorkflowSuccessToast(id?: string) {
|
|||
@visible-change="onWorkflowMenuOpen"
|
||||
/>
|
||||
<template #content>
|
||||
<div class="mb-4xs">
|
||||
<N8nBadge>{{ $locale.baseText('menuActions.badge.alpha') }}</N8nBadge>
|
||||
</div>
|
||||
{{ $locale.baseText('menuActions.nodeViewDiscovery.tooltip') }}
|
||||
<N8nIcon
|
||||
:class="$style.closeNodeViewDiscovery"
|
||||
|
|
|
@ -908,6 +908,7 @@
|
|||
"menuActions.switchToNewNodeViewVersion": "Switch to new canvas",
|
||||
"menuActions.switchToOldNodeViewVersion": "Switch to old canvas",
|
||||
"menuActions.badge.new": "NEW",
|
||||
"menuActions.badge.alpha": "ALPHA",
|
||||
"menuActions.nodeViewDiscovery.tooltip": "Try our new, more performant canvas",
|
||||
"multipleParameter.addItem": "Add item",
|
||||
"multipleParameter.currentlyNoItemsExist": "Currently no items exist",
|
||||
|
|
Loading…
Reference in a new issue