62 lines
3.9 KiB
JavaScript
62 lines
3.9 KiB
JavaScript
import PlainLayout from "layouts/PlainLayout.vue";
|
|
|
|
const routes = [
|
|
{path: '/login', name: "login", component: () => import('pages/public/LoginPage.vue'), meta: {layout: PlainLayout}},
|
|
{path: '/register', name: "registration", component: () => import('pages/public/RegisterPage.vue'), meta: {layout: PlainLayout}},
|
|
{path: '/forgotten-password', name: "forgottenPassword", component: () => import('pages/public/RegisterPage.vue'), meta: {layout: PlainLayout}},
|
|
|
|
{path: '', name: "homepage", component: () => import('pages/public/IndexPage.vue'), meta: {layout: PlainLayout}},
|
|
|
|
{
|
|
path: '/',
|
|
component: () => import('layouts/PublicLayout.vue'),
|
|
children: [
|
|
{path: 'about', name: "about", component: () => import('pages/public/AboutPage.vue')},
|
|
{path: ':username', name: "publicProfileDetail", component: () => import('pages/public/PilotProfilePage.vue')},
|
|
{path: ':username/:id', name: "publicFlightDetail", component: () => import('pages/public/FlightDetailPage.vue')},
|
|
]
|
|
},
|
|
{
|
|
path: '/profile',
|
|
component: () => import('layouts/ProfileLayout.vue'),
|
|
meta: {
|
|
protected: true,
|
|
},
|
|
children: [
|
|
{path: '', name: "profile", component: () => import('pages/profile/ProfilePage.vue')},
|
|
{path: 'my-flights', name: "myFlights", component: () => import('pages/profile/flight/FlightsPage.vue')},
|
|
{path: 'my-flights/add', name: "addFlight", component: () => import('pages/profile/flight/NewFlightPage.vue')},
|
|
{path: 'my-flights/:id', name: "flightDetail", component: () => import('pages/profile/flight/FlightDetailPage.vue')},
|
|
{path: 'my-flights/:id/edit/:step?', name: "flightEdit", component: () => import('pages/profile/flight/EditFlightPage.vue')},
|
|
{path: 'poi', name: "poi", component: () => import('pages/profile/poi/PointsOfInterestPage.vue')},
|
|
{path: 'poi/add', name: "addPOI", component: () => import('pages/profile/poi/NewPointOfInterestPage.vue')},
|
|
{path: 'poi/:id', name: "poiDetail", component: () => import('pages/profile/poi/PointOfInterestDetailPage.vue')},
|
|
{path: 'poi/:id/edit', name: "poiEdit", component: () => import('pages/profile/poi/EditPointOfInterestPage.vue')},
|
|
{path: 'copilots', name: "copilots", component: () => import('pages/profile/copilot/CopilotsPage.vue')},
|
|
{path: 'copilots/add', name: "addCopilot", component: () => import('pages/profile/copilot/NewCopilotPage.vue')},
|
|
{path: 'copilots/:id', name: "copilotDetail", component: () => import('pages/profile/copilot/CopilotDetailPage.vue')},
|
|
{path: 'copilots/:id/edit', name: "copilotEdit", component: () => import('pages/profile/copilot/EditCopilotPage.vue')},
|
|
{path: 'aircrafts', name: "aircrafts", component: () => import('pages/profile/aircraft/AircraftsPage.vue')},
|
|
{path: 'aircrafts/new', name: "addAircraft", component: () => import('pages/profile/aircraft/NewAircraftsPage.vue')},
|
|
{path: 'aircrafts/:id', name: "aircraftDetail", component: () => import('pages/profile/aircraft/AircraftDetailPage.vue')},
|
|
{path: 'aircrafts/:id/edit', name: "aircraftEdit", component: () => import('pages/profile/aircraft/EditAircraftPage.vue')},
|
|
|
|
{path: 'events', name: "events", component: () => import('pages/profile/event/EventsPage.vue')},
|
|
{path: 'events/add', name: "addEvent", component: () => import('pages/profile/event/NewEventPage.vue')},
|
|
{path: 'events/:id', name: "eventDetail", component: () => import('pages/profile/event/EventDetailPage.vue')},
|
|
{path: 'events/:id/edit', name: "eventEdit", component: () => import('pages/profile/event/EditEventPage.vue')},
|
|
{path: 'organizations', name: "organizations", component: () => import('pages/profile/organization/OrganizationsPage.vue')},
|
|
]
|
|
},
|
|
|
|
|
|
// Always leave this as last one,
|
|
// but you can also remove it
|
|
{
|
|
path: '/:catchAll(.*)*',
|
|
component: () => import('pages/ErrorNotFound.vue')
|
|
}
|
|
]
|
|
|
|
export default routes
|