feat: update dependencies and add new features

- Update package.json dependencies (@tanstack/react-query, @kevisual/*, etc.)
- Add openLink utility function in basename.ts
- Add stackQueryClient for React Query in query.ts
- Refactor auth store with serverData and query hooks
- Add demo route and auth hooks
- Add VitePWA plugin and env config
- Update AGENTS.md documentation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
xiongxiao
2026-03-19 01:15:03 +08:00
committed by cnb
parent fa527192c9
commit 64eabb7aa8
15 changed files with 349 additions and 64 deletions

View File

@@ -19,4 +19,14 @@ export const getDynamicBasename = (): string => {
}
// 默认使用构建时的 basename
return basename
}
export const openLink = (path: string, target: string = '_self') => {
if (path.startsWith('http://') || path.startsWith('https://')) {
window.open(path, target);
return;
}
const url = new URL(path, window.location.origin);
url.pathname = wrapBasename(url.pathname);
window.open(url.toString(), target);
}