feat(editor): Add workflow action to switch between new and old canvas (no-changelog) (#9969)

This commit is contained in:
Alex Grozav
2024-07-09 15:58:36 +03:00
committed by GitHub
parent b5b96eb43e
commit 4e2f0adb2a
7 changed files with 79 additions and 54 deletions

View File

@@ -0,0 +1,20 @@
<script lang="ts" setup>
import { useLocalStorage } from '@vueuse/core';
import { watch } from 'vue';
import { useRouter } from 'vue-router';
import NodeViewV1 from '@/views/NodeView.vue';
import NodeViewV2 from '@/views/NodeView.v2.vue';
const router = useRouter();
const nodeViewVersion = useLocalStorage('NodeView.version', '1');
watch(nodeViewVersion, () => {
router.go(0);
});
</script>
<template>
<NodeViewV2 v-if="nodeViewVersion === '2'" />
<NodeViewV1 v-else />
</template>