重构项目,方便开发

This commit is contained in:
super
2026-03-19 13:15:47 +08:00
parent fb2e5ccea5
commit 1e63ab291b
38 changed files with 5940 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
export interface BootstrapState {
username?: string
userId?: string
isAdmin?: boolean
error?: string
}
declare global {
interface Window {
__BOOTSTRAP__?: BootstrapState
}
}
export function getBootstrapState(): BootstrapState {
return window.__BOOTSTRAP__ ?? {}
}