refactor: switched routing mode to hash

This commit is contained in:
ayang
2025-08-20 11:38:14 +08:00
parent 5dae5d1cc1
commit 534e2dddab
3 changed files with 6 additions and 6 deletions

View File

@@ -15,7 +15,7 @@
{ {
"label": "main", "label": "main",
"title": "Coco AI", "title": "Coco AI",
"url": "/ui", "url": "index.html/#/ui",
"height": 590, "height": 590,
"width": 680, "width": 680,
"decorations": false, "decorations": false,
@@ -39,7 +39,7 @@
{ {
"label": "settings", "label": "settings",
"title": "Coco AI Settings", "title": "Coco AI Settings",
"url": "/ui/settings", "url": "index.html/#/ui/settings",
"width": 1000, "width": 1000,
"minWidth": 1000, "minWidth": 1000,
"height": 700, "height": 700,
@@ -59,7 +59,7 @@
{ {
"label": "check", "label": "check",
"title": "Coco AI Update", "title": "Coco AI Update",
"url": "/ui/check", "url": "index.html/#/ui/check",
"width": 340, "width": 340,
"minWidth": 340, "minWidth": 340,
"height": 260, "height": 260,

View File

@@ -524,7 +524,7 @@ export function useChatActions(
skipTaskbar: false, skipTaskbar: false,
decorations: true, decorations: true,
closable: true, closable: true,
url: "/ui/chat", url: "index.html/#/ui/chat",
}); });
} }
}, },

View File

@@ -1,4 +1,4 @@
import { createBrowserRouter } from "react-router-dom"; import { createHashRouter } from "react-router-dom";
import Layout from "./layout"; import Layout from "./layout";
import ErrorPage from "@/pages/error/index"; import ErrorPage from "@/pages/error/index";
@@ -16,7 +16,7 @@ const routerOptions = {
}, },
} as const; } as const;
export const router = createBrowserRouter( export const router = createHashRouter(
[ [
{ {
path: "/", path: "/",