mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-12 13:27:31 -08:00
1d5ba3d437
* implement import
* set name, remove console log
* add validation and such
* remove monday.com package for testing
* clean up code
* await new name
* refactor api requests
* remove unnessary import
* build
* add zoom button
* update positions on loading template
* update error handling
* build
* update zoom to center
* set state to dirty upon leaving
* clean up pr
* refactor func
* refactor redir
* fix lint issue
* refactor func out
* use new endpoint
* revert error changes
* revert error changes
* update logic to find top left node
* zoom to fit when opening workflow
* revert testing change
* update case
* address comments
* reset zoom when opening new workflow
* update endpoint to plural form
* update endpoint
* ⚡ Minor improvements
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
62 lines
1.1 KiB
TypeScript
62 lines
1.1 KiB
TypeScript
import Vue from 'vue';
|
|
import Router from 'vue-router';
|
|
import MainHeader from '@/components/MainHeader/MainHeader.vue';
|
|
import MainSidebar from '@/components/MainSidebar.vue';
|
|
import NodeView from '@/views/NodeView.vue';
|
|
|
|
Vue.use(Router);
|
|
|
|
export default new Router({
|
|
mode: 'history',
|
|
// @ts-ignore
|
|
base: window.BASE_PATH === '/%BASE_PATH%/' ? '/' : window.BASE_PATH,
|
|
routes: [
|
|
{
|
|
path: '/execution/:id',
|
|
name: 'ExecutionById',
|
|
components: {
|
|
default: NodeView,
|
|
header: MainHeader,
|
|
sidebar: MainSidebar,
|
|
},
|
|
},
|
|
{
|
|
path: '/oauth2/callback',
|
|
name: 'oAuth2Callback',
|
|
components: {
|
|
},
|
|
},
|
|
{
|
|
path: '/workflow',
|
|
name: 'NodeViewNew',
|
|
components: {
|
|
default: NodeView,
|
|
header: MainHeader,
|
|
sidebar: MainSidebar,
|
|
},
|
|
},
|
|
{
|
|
path: '/workflow/:name',
|
|
name: 'NodeViewExisting',
|
|
components: {
|
|
default: NodeView,
|
|
header: MainHeader,
|
|
sidebar: MainSidebar,
|
|
},
|
|
},
|
|
{
|
|
path: '/',
|
|
redirect: '/workflow',
|
|
},
|
|
{
|
|
path: '/workflows/templates/:id',
|
|
name: 'WorkflowTemplate',
|
|
components: {
|
|
default: NodeView,
|
|
header: MainHeader,
|
|
sidebar: MainSidebar,
|
|
},
|
|
},
|
|
],
|
|
});
|