gamebrary/src/router.js

151 lines
3 KiB
JavaScript
Raw Normal View History

2018-10-18 22:15:28 -07:00
import Vue from 'vue';
import Router from 'vue-router';
import Board from '@/pages/Board';
2020-09-25 17:09:20 -07:00
import About from '@/pages/About';
import Wallpapers from '@/pages/Wallpapers';
import PublicBoards from '@/pages/PublicBoards';
2020-09-25 17:09:20 -07:00
import Tags from '@/pages/Tags';
2020-10-31 10:43:04 -07:00
import Notes from '@/pages/Notes';
2020-09-25 17:09:20 -07:00
import Releases from '@/pages/Releases';
2020-09-28 16:27:08 -07:00
import Auth from '@/pages/Auth';
2020-08-18 11:56:10 -07:00
import Dashboard from '@/pages/Dashboard';
2021-01-20 15:44:04 -07:00
import Boards from '@/components/Boards';
2020-11-20 23:32:14 -07:00
import Settings from '@/pages/Settings';
2020-10-22 14:53:41 -07:00
import Upgrade from '@/pages/Upgrade';
2021-03-01 23:19:12 -07:00
import Profile from '@/pages/Profile';
2021-03-02 20:23:54 -07:00
import EditProfile from '@/pages/Profile/EditProfile';
2021-03-09 17:25:11 -07:00
import PublicProfile from '@/pages/PublicProfile';
2018-10-18 22:15:28 -07:00
Vue.use(Router);
export default new Router({
2019-11-08 12:56:03 -07:00
routes: [
{
2020-09-28 16:26:19 -07:00
name: 'dashboard',
2020-08-10 21:16:43 -07:00
path: '/',
2020-08-18 11:56:10 -07:00
component: Dashboard,
2019-11-08 12:56:03 -07:00
meta: {
2020-08-18 11:56:10 -07:00
title: 'Dashboard',
2019-11-08 12:56:03 -07:00
},
2021-01-20 15:44:04 -07:00
redirect: { name: 'boards' },
children: [
{
name: 'boards',
path: '/boards',
component: Boards,
meta: {
2021-01-25 09:52:26 -07:00
title: 'Boards',
2021-01-20 15:44:04 -07:00
},
},
{
name: 'wallpapers',
path: '/wallpapers',
component: Wallpapers,
meta: {
title: 'Wallpapers',
},
},
{
name: 'tags',
path: '/tags',
component: Tags,
meta: {
title: 'Tags',
},
},
{
name: 'notes',
path: '/notes',
component: Notes,
meta: {
title: 'Notes',
},
},
{
path: '/settings',
name: 'settings',
component: Settings,
meta: {
title: 'Settings',
},
},
],
2019-11-08 12:56:03 -07:00
},
{
name: 'public-boards',
path: '/public-boards',
component: PublicBoards,
meta: {
title: 'PublicBoards',
2021-02-03 15:14:38 -07:00
public: true,
},
},
2020-10-22 14:53:41 -07:00
{
name: 'upgrade',
path: '/upgrade',
component: Upgrade,
meta: {
title: 'Upgrade',
},
},
2021-03-01 23:19:12 -07:00
{
name: 'profile',
path: '/profile',
component: Profile,
meta: {
title: 'Profile',
},
},
2021-03-02 20:23:54 -07:00
{
name: 'edit-profile',
path: '/profile/edit',
component: EditProfile,
meta: {
title: 'Edit profile',
},
},
2020-09-25 17:09:20 -07:00
{
name: 'about',
path: '/about',
component: About,
meta: {
title: 'About',
},
},
{
name: 'releases',
path: '/releases',
component: Releases,
meta: {
title: 'Releases',
},
},
2020-08-18 11:56:10 -07:00
{
2020-09-28 16:27:08 -07:00
name: 'auth',
path: '/auth',
component: Auth,
meta: {
title: 'Auth',
},
2019-11-08 12:56:03 -07:00
},
{
2020-09-28 16:27:08 -07:00
path: '/board/:id',
name: 'board',
component: Board,
2019-11-08 12:56:03 -07:00
},
2020-10-05 11:42:13 -07:00
{
path: '/b/:id',
name: 'public-board',
component: Board,
meta: {
public: true,
},
},
2019-11-08 12:56:03 -07:00
{
path: '*',
2021-03-09 17:25:11 -07:00
name: 'public-profile',
component: PublicProfile,
2019-11-08 12:56:03 -07:00
},
],
2018-10-18 22:15:28 -07:00
});