2
0
Fork 0
mirror of https://github.com/romancm/gamebrary synced 2024-12-29 12:33:08 +00:00
gamebrary/src/router.js

151 lines
3 KiB
JavaScript
Raw Normal View History

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