mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 21:07:28 -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 tagsEventBus = createEventBus();
|
||||||
const sourceControlModalEventBus = 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 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[]) => {
|
const hasChanged = (prev: string[], curr: string[]) => {
|
||||||
if (prev.length !== curr.length) {
|
if (prev.length !== curr.length) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -184,7 +192,7 @@ const workflowMenuItems = computed<ActionDropdownItem[]>(() => {
|
||||||
disabled: !onWorkflowPage.value || isNewWorkflow.value,
|
disabled: !onWorkflowPage.value || isNewWorkflow.value,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (nodeViewSwitcher.value === 'true') {
|
if (isNodeViewSwitcherEnabled.value) {
|
||||||
actions.push({
|
actions.push({
|
||||||
id: WORKFLOW_MENU_ACTIONS.SWITCH_NODE_VIEW_VERSION,
|
id: WORKFLOW_MENU_ACTIONS.SWITCH_NODE_VIEW_VERSION,
|
||||||
label:
|
label:
|
||||||
|
|
Loading…
Reference in a new issue