mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat(editor): Use website as the main templates repository (#8591)
This commit is contained in:
committed by
GitHub
parent
5ab34fe335
commit
79b09fdf84
@@ -78,7 +78,7 @@ export const routes = [
|
||||
{
|
||||
path: '/',
|
||||
name: VIEWS.HOMEPAGE,
|
||||
redirect: (to) => {
|
||||
redirect: () => {
|
||||
return { name: VIEWS.WORKFLOWS };
|
||||
},
|
||||
meta: {
|
||||
@@ -130,6 +130,15 @@ export const routes = [
|
||||
},
|
||||
middleware: ['authenticated'],
|
||||
},
|
||||
beforeEnter: (to, _from, next) => {
|
||||
const templatesStore = useTemplatesStore();
|
||||
if (!templatesStore.hasCustomTemplatesHost) {
|
||||
const id = Array.isArray(to.params.id) ? to.params.id[0] : to.params.id;
|
||||
window.location.href = templatesStore.getWebsiteTemplatePageURL(id);
|
||||
} else {
|
||||
next();
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/templates/:id/setup',
|
||||
@@ -180,6 +189,14 @@ export const routes = [
|
||||
},
|
||||
middleware: ['authenticated'],
|
||||
},
|
||||
beforeEnter: (_to, _from, next) => {
|
||||
const templatesStore = useTemplatesStore();
|
||||
if (!templatesStore.hasCustomTemplatesHost) {
|
||||
window.location.href = templatesStore.getWebsiteTemplateRepositoryURL;
|
||||
} else {
|
||||
next();
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/credentials',
|
||||
|
||||
Reference in New Issue
Block a user