chore: restructure project and add i18n support
- Reorganize project structure with new electron and shared directories - Add comprehensive i18n support with Chinese, English, and Japanese locales - Update build configurations and TypeScript paths for new structure - Add various UI components including chat interface and task management - Include Windows release binaries and localization files - Update dependencies and fix import paths throughout the codebase
This commit is contained in:
52
src/router/index.ts
Normal file
52
src/router/index.ts
Normal file
@@ -0,0 +1,52 @@
|
||||
import { createRouter, createMemoryHistory } from "vue-router";
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path: '/',
|
||||
redirect: '/home'
|
||||
},
|
||||
{
|
||||
path: "/login",
|
||||
component: () => import("@src/pages/login/index.vue"),
|
||||
name: "Login",
|
||||
meta: { requiresAuth: true },
|
||||
},
|
||||
{
|
||||
path: "/home",
|
||||
component: () => import("@src/pages/home/index.vue"),
|
||||
name: "Home",
|
||||
meta: { requiresAuth: true },
|
||||
},
|
||||
{
|
||||
path: "/task",
|
||||
component: () => import("@src/pages/task/index.vue"),
|
||||
name: "Task",
|
||||
meta: { requiresAuth: true },
|
||||
},
|
||||
{
|
||||
path: "/knowledge",
|
||||
component: () => import("@src/pages/knowledge/index.vue"),
|
||||
name: "Knowledge",
|
||||
meta: { requiresAuth: true },
|
||||
},
|
||||
{
|
||||
path: "/setting",
|
||||
component: () => import("@src/pages/setting/index.vue"),
|
||||
name: "Setting",
|
||||
meta: { requiresAuth: true },
|
||||
},
|
||||
];
|
||||
|
||||
const router = createRouter({
|
||||
history: createMemoryHistory(),
|
||||
routes,
|
||||
scrollBehavior(_to: any, _from: any, savedPosition: any) {
|
||||
if (savedPosition) {
|
||||
return savedPosition
|
||||
}
|
||||
|
||||
return { top: 0 }
|
||||
},
|
||||
});
|
||||
|
||||
export default router;
|
||||
Reference in New Issue
Block a user