feat: 更新配置和组件以支持构建时间显示功能, 修复读弹幕的问题

- 在vite.config.mts中添加__BUILD_TIME__常量以记录构建时间
- 在AboutView.vue中显示构建时间及其相对时间
- 在ReadDanmaku.vue中重构语音合成状态管理,优化礼物合并逻辑
- 更新相关类型定义,增强代码可读性和可维护性
This commit is contained in:
Megghy
2025-06-25 10:55:27 +08:00
parent a8b4e2fbad
commit f57c856c3b
5 changed files with 411 additions and 202 deletions

View File

@@ -93,7 +93,11 @@ export default defineConfig({
],
server: { port: 51000 },
resolve: { alias: { '@': path.resolve(__dirname, 'src') } },
define: { 'process.env': {}, global: 'window' },
define: {
'process.env': {},
global: 'window',
__BUILD_TIME__: JSON.stringify(new Date().toISOString())
},
optimizeDeps: {
include: ['@vicons/fluent', '@vicons/ionicons5', 'vue', 'vue-router']
},