feat(web): ui

This commit is contained in:
zhaoying
2026-04-22 14:16:44 +08:00
parent 749083bdbe
commit cda20ac3f1
7 changed files with 68 additions and 51 deletions

View File

@@ -11,6 +11,15 @@ import App from '@/App.tsx'
// Synchronously import i18n config to ensure initialization before component rendering
import './i18n'
// Fix autofill background color on focus
document.addEventListener('animationstart', (e) => {
if (e.animationName === 'onAutoFillStart') {
const input = e.target as HTMLInputElement
input.style.backgroundColor = 'transparent'
input.addEventListener('focus', () => { input.style.backgroundColor = 'transparent' }, { once: false })
}
})
// After a new release, old dynamic chunk files are deleted; force a page reload on preload error
window.addEventListener('vite:preloadError', () => {
console.warn('New version detected, reloading page to load latest assets...')