- 单文件 index.html 拆分为 vnt-web/ui(pnpm+Vite+Vue3 SFC+Pinia+Tailwind v4),构建产物输出到 static/ - UI 重新设计:浅色简洁风(可切换深色模式)、顶部导航、新增总览仪表盘首页 - 自定义弹窗/toast/确认框替换全部原生 alert/confirm,交互与过渡统一 - 响应式布局:移动端汉堡导航,表格与卡片自适应 - 实例卡片移除日志按钮;启动组网默认选中第一个配置
22 lines
726 B
JavaScript
22 lines
726 B
JavaScript
import { createRouter, createWebHashHistory } from "vue-router";
|
|
import DashboardView from "../views/DashboardView.vue";
|
|
import InstancesView from "../views/InstancesView.vue";
|
|
import ConfigView from "../views/ConfigView.vue";
|
|
import PeersView from "../views/PeersView.vue";
|
|
import RoutesView from "../views/RoutesView.vue";
|
|
|
|
const routes = [
|
|
{ path: "/", component: DashboardView },
|
|
{ path: "/instances", component: InstancesView },
|
|
// 兼容旧路由
|
|
{ path: "/general", redirect: "/instances" },
|
|
{ path: "/config", component: ConfigView },
|
|
{ path: "/peers", component: PeersView },
|
|
{ path: "/routes", component: RoutesView },
|
|
];
|
|
|
|
export default createRouter({
|
|
history: createWebHashHistory(),
|
|
routes,
|
|
});
|