feat: add vue-router

This commit is contained in:
pa
2025-10-16 00:00:48 +09:00
committed by Natsumi
parent 9cba3dbce8
commit df04f1d449
24 changed files with 175 additions and 136 deletions

View File

@@ -15,3 +15,4 @@ export async function initPlugins(isVrOverlay = false) {
export * from './i18n';
export * from './components';
export * from './sentry';
export * from './router';

50
src/plugin/router.js Normal file
View File

@@ -0,0 +1,50 @@
import { createRouter, createWebHashHistory } from 'vue-router';
import Charts from './../views/Charts/Charts.vue';
import Favorites from './../views/Favorites/Favorites.vue';
import Feed from './../views/Feed/Feed.vue';
import FriendList from './../views/FriendList/FriendList.vue';
import FriendLog from './../views/FriendLog/FriendLog.vue';
import GameLog from './../views/GameLog/GameLog.vue';
import Moderation from './../views/Moderation/Moderation.vue';
import Notification from './../views/Notifications/Notification.vue';
import PlayerList from './../views/PlayerList/PlayerList.vue';
import Profile from './../views/Profile/Profile.vue';
import Search from './../views/Search/Search.vue';
import Settings from './../views/Settings/Settings.vue';
import Tools from './../views/Tools/Tools.vue';
const routes = [
{ path: '/feed', name: 'feed', component: Feed },
{ path: '/gamelog', name: 'gameLog', component: GameLog },
{ path: '/playerlist', name: 'playerList', component: PlayerList },
{ path: '/search', name: 'search', component: Search },
{ path: '/favorites', name: 'favorites', component: Favorites },
{ path: '/friendlog', name: 'friendLog', component: FriendLog },
{ path: '/moderation', name: 'moderation', component: Moderation },
{ path: '/notification', name: 'notification', component: Notification },
{
path: '/friendlist',
name: 'friendList',
component: FriendList,
meta: { fullScreen: true }
},
{
path: '/charts',
name: 'charts',
component: Charts,
meta: { fullScreen: true }
},
{ path: '/tools', name: 'tools', component: Tools },
{ path: '/profile', name: 'profile', component: Profile },
{ path: '/settings', name: 'settings', component: Settings }
];
export const router = createRouter({
history: createWebHashHistory(),
routes
});
export function initRouter(app) {
app.use(router);
}