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:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user