refactor(frontend): extract pool header and theme toggle

This commit is contained in:
elky
2026-06-30 17:01:39 +08:00
parent 9f138d09e6
commit d7411a3104
10 changed files with 620 additions and 499 deletions
+14
View File
@@ -44,6 +44,20 @@ function installStorage(name: 'localStorage' | 'sessionStorage') {
installStorage('localStorage')
installStorage('sessionStorage')
if (typeof globalThis.requestAnimationFrame !== 'function') {
Object.defineProperty(globalThis, 'requestAnimationFrame', {
value: (callback: FrameRequestCallback) => window.setTimeout(() => callback(Date.now()), 16),
configurable: true,
})
}
if (typeof globalThis.cancelAnimationFrame !== 'function') {
Object.defineProperty(globalThis, 'cancelAnimationFrame', {
value: (handle: number) => window.clearTimeout(handle),
configurable: true,
})
}
beforeEach(async () => {
localStorage.clear()
sessionStorage.clear()