Update: TTS settings modal and settings types

This commit is contained in:
likingcode
2026-03-18 15:18:47 +08:00
parent 71232cf489
commit 4ea96243c2
13 changed files with 1393 additions and 149 deletions

View File

@@ -7,26 +7,76 @@ export default defineConfig({
react(),
VitePWA({
registerType: 'autoUpdate',
workbox: {
globPatterns: ['**/*.{js,css,html,ico,png,svg,woff2}'],
runtimeCaching: [
{
urlPattern: /^https:\/\/fonts\.googleapis\.com\/.*/i,
handler: 'CacheFirst',
options: {
cacheName: 'google-fonts-cache',
expiration: {
maxEntries: 10,
maxAgeSeconds: 60 * 60 * 24 * 365 // 1 year
},
cacheableResponse: {
statuses: [0, 200]
}
}
}
]
},
manifest: {
name: 'French Vocabulary',
short_name: 'FrenchVocab',
description: 'Master French with spaced repetition',
name: '法语词汇学习',
short_name: '法语词汇',
description: '使用间隔重复系统高效学习法语单词',
theme_color: '#3b82f6',
background_color: '#ffffff',
display: 'standalone',
orientation: 'portrait',
scope: '/',
start_url: '/',
icons: [
{
src: '/icon-192.png',
sizes: '192x192',
type: 'image/png'
type: 'image/png',
purpose: 'any maskable'
},
{
src: '/icon-512.png',
sizes: '512x512',
type: 'image/png'
type: 'image/png',
purpose: 'any maskable'
}
]
],
categories: ['education', 'productivity'],
lang: 'zh-CN',
dir: 'ltr'
}
})
],
build: {
rollupOptions: {
output: {
manualChunks: {
vendor: ['react', 'react-dom'],
db: ['dexie'],
state: ['zustand']
}
}
},
target: 'esnext',
minify: 'terser',
terserOptions: {
compress: {
drop_console: true,
drop_debugger: true
}
}
},
server: {
port: 3000,
host: true
}
})