feat(app): scaffold Vue3 frontend (stage 1)
This commit is contained in:
37
app-frontend/src/router/index.js
Normal file
37
app-frontend/src/router/index.js
Normal file
@@ -0,0 +1,37 @@
|
||||
import { createRouter, createWebHistory } from 'vue-router'
|
||||
|
||||
import AppLayout from '../layouts/AppLayout.vue'
|
||||
|
||||
const LoginPage = () => import('../pages/LoginPage.vue')
|
||||
const RegisterPage = () => import('../pages/RegisterPage.vue')
|
||||
const ResetPasswordPage = () => import('../pages/ResetPasswordPage.vue')
|
||||
|
||||
const AccountsPage = () => import('../pages/AccountsPage.vue')
|
||||
const SchedulesPage = () => import('../pages/SchedulesPage.vue')
|
||||
const ScreenshotsPage = () => import('../pages/ScreenshotsPage.vue')
|
||||
|
||||
const routes = [
|
||||
{ path: '/', redirect: '/login' },
|
||||
{ path: '/login', name: 'login', component: LoginPage },
|
||||
{ path: '/register', name: 'register', component: RegisterPage },
|
||||
{ path: '/reset_password', name: 'reset_password', component: ResetPasswordPage },
|
||||
{
|
||||
path: '/app',
|
||||
component: AppLayout,
|
||||
children: [
|
||||
{ path: '', redirect: '/app/accounts' },
|
||||
{ path: 'accounts', name: 'accounts', component: AccountsPage },
|
||||
{ path: 'schedules', name: 'schedules', component: SchedulesPage },
|
||||
{ path: 'screenshots', name: 'screenshots', component: ScreenshotsPage },
|
||||
],
|
||||
},
|
||||
{ path: '/:pathMatch(.*)*', redirect: '/login' },
|
||||
]
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
routes,
|
||||
})
|
||||
|
||||
export default router
|
||||
|
||||
Reference in New Issue
Block a user