mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 20:24:05 -08:00
feat(editor): Enable NodeView version switcher by default on internal (no-changelog) (#10356)
This commit is contained in:
parent
021d9981b6
commit
2580a5e19e
|
@ -96,9 +96,17 @@ const importFileRef = ref<HTMLInputElement | undefined>();
|
|||
const tagsEventBus = createEventBus();
|
||||
const sourceControlModalEventBus = createEventBus();
|
||||
|
||||
const nodeViewSwitcher = useLocalStorage('NodeView.switcher', import.meta.env.DEV ? 'true' : '');
|
||||
const nodeViewSwitcher = useLocalStorage('NodeView.switcher', '');
|
||||
const nodeViewVersion = useLocalStorage('NodeView.version', '1');
|
||||
|
||||
const isNodeViewSwitcherEnabled = computed(() => {
|
||||
return (
|
||||
import.meta.env.DEV ||
|
||||
nodeViewSwitcher.value === 'true' ||
|
||||
settingsStore.deploymentType === 'n8n-internal'
|
||||
);
|
||||
});
|
||||
|
||||
const hasChanged = (prev: string[], curr: string[]) => {
|
||||
if (prev.length !== curr.length) {
|
||||
return true;
|
||||
|
@ -184,7 +192,7 @@ const workflowMenuItems = computed<ActionDropdownItem[]>(() => {
|
|||
disabled: !onWorkflowPage.value || isNewWorkflow.value,
|
||||
});
|
||||
|
||||
if (nodeViewSwitcher.value === 'true') {
|
||||
if (isNodeViewSwitcherEnabled.value) {
|
||||
actions.push({
|
||||
id: WORKFLOW_MENU_ACTIONS.SWITCH_NODE_VIEW_VERSION,
|
||||
label:
|
||||
|
|
Loading…
Reference in a new issue