2023-03-26 11:43:23 +00:00
|
|
|
const pages = import.meta.glob('../pages/**')
|
|
|
|
|
2022-09-20 19:59:52 +00:00
|
|
|
function page (path) {
|
2023-01-21 11:57:37 +00:00
|
|
|
return pages[`../pages/${path}`]
|
2022-09-20 19:59:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export default [
|
|
|
|
// Logged Users
|
|
|
|
{ path: '/home', name: 'home', component: page('home.vue') },
|
|
|
|
|
|
|
|
// Forms
|
|
|
|
{ path: '/forms/create', name: 'forms.create', component: page('forms/create.vue') },
|
2022-11-16 10:56:49 +00:00
|
|
|
{ path: '/forms/create/guest', name: 'forms.create.guest', component: page('forms/create-guest.vue') },
|
2022-09-20 19:59:52 +00:00
|
|
|
{ path: '/forms/:slug/edit', name: 'forms.edit', component: page('forms/edit.vue') },
|
2022-11-09 10:23:17 +00:00
|
|
|
{
|
|
|
|
path: '/forms/:slug/show',
|
|
|
|
component: page('forms/show/index.vue'),
|
|
|
|
children: [
|
|
|
|
{ path: '', redirect: { name: 'forms.show' } },
|
|
|
|
{ path: 'submissions', name: 'forms.show', component: page('forms/show/submissions.vue') },
|
2023-03-26 11:43:23 +00:00
|
|
|
{ path: 'share', name: 'forms.show.share', component: page('forms/show/share.vue') },
|
|
|
|
{ path: 'analytics', name: 'forms.show.analytics', component: page('forms/show/stats.vue') }
|
2022-11-09 10:23:17 +00:00
|
|
|
]
|
|
|
|
},
|
2022-09-20 19:59:52 +00:00
|
|
|
|
|
|
|
// Subscription
|
|
|
|
{ path: '/subscriptions/success', name: 'subscriptions.success', component: page('subscriptions/success.vue') },
|
|
|
|
{ path: '/subscriptions/error', name: 'subscriptions.error', component: page('subscriptions/error.vue') },
|
|
|
|
|
|
|
|
// Settings
|
|
|
|
{
|
|
|
|
path: '/settings',
|
|
|
|
component: page('settings/index.vue'),
|
|
|
|
children: [
|
|
|
|
{ path: '', redirect: { name: 'settings.workspaces' } },
|
|
|
|
{ path: 'workspaces', name: 'settings.workspaces', component: page('settings/workspace.vue') },
|
|
|
|
{ path: 'billing', name: 'settings.billing', component: page('settings/billing.vue') },
|
|
|
|
{ path: 'profile', name: 'settings.profile', component: page('settings/profile.vue') },
|
|
|
|
{ path: 'account', name: 'settings.account', component: page('settings/account.vue') },
|
|
|
|
{ path: 'password', name: 'settings.password', component: page('settings/password.vue') },
|
|
|
|
{ path: 'admin', name: 'settings.admin', component: page('settings/admin.vue') }
|
|
|
|
]
|
|
|
|
},
|
|
|
|
|
|
|
|
// Auth Routes
|
|
|
|
{ path: '/login', name: 'login', component: page('auth/login.vue') },
|
|
|
|
{ path: '/register', name: 'register', component: page('auth/register.vue') },
|
|
|
|
{ path: '/password/reset', name: 'password.request', component: page('auth/password/email.vue') },
|
|
|
|
{ path: '/password/reset/:token', name: 'password.reset', component: page('auth/password/reset.vue') },
|
|
|
|
{ path: '/email/verify/:id', name: 'verification.verify', component: page('auth/verification/verify.vue') },
|
|
|
|
{ path: '/email/resend', name: 'verification.resend', component: page('auth/verification/resend.vue') },
|
|
|
|
|
|
|
|
// Public Content
|
|
|
|
|
|
|
|
// Legal Routes
|
|
|
|
{ path: '/privacy-policy', name: 'privacy-policy', component: page('legal-help/privacy-policy.vue') },
|
|
|
|
{ path: '/terms-conditions', name: 'terms-conditions', component: page('legal-help/terms-conditions.vue') },
|
|
|
|
|
|
|
|
// Community
|
|
|
|
{ path: '/discount-students-academics-ngos', name: 'discount-community', component: page('community/students-academics-ngos.vue') },
|
|
|
|
|
|
|
|
// Guest Routes
|
|
|
|
{ path: '/', name: 'welcome', component: page('welcome.vue') },
|
2023-08-30 07:58:29 +00:00
|
|
|
{ path: '/pricing', name: 'pricing', component: page('pricing.vue') },
|
2023-07-11 15:27:05 +00:00
|
|
|
{ path: '/ai-form-builder', name: 'aiformbuilder', component: page('ai-form-builder.vue') },
|
2022-09-20 19:59:52 +00:00
|
|
|
{ path: '/integrations', name: 'integrations', component: page('integrations.vue') },
|
|
|
|
{ path: '/forms/:slug', name: 'forms.show_public', component: page('forms/show-public.vue') },
|
|
|
|
|
2022-10-02 18:38:41 +00:00
|
|
|
// Templates
|
2023-10-13 10:11:03 +00:00
|
|
|
{ path: '/my-templates', name: 'my_templates', component: page('templates/my_templates.vue') },
|
2023-09-08 11:00:28 +00:00
|
|
|
{ path: '/form-templates', name: 'templates', component: page('templates/templates.vue') },
|
|
|
|
{ path: '/form-templates/:slug', name: 'templates.show', component: page('templates/show.vue') },
|
2022-10-02 18:38:41 +00:00
|
|
|
|
2022-09-20 19:59:52 +00:00
|
|
|
{ path: '*', component: page('errors/404.vue') }
|
|
|
|
]
|