refactor: 重构项目后端

- 移除 .npmrc 中的镜像配置
- 移除 package.json 中未使用的依赖
- 大幅重构后端代码
This commit is contained in:
himeditator
2025-07-01 21:50:33 +08:00
parent e30124cb87
commit e77779b72a
13 changed files with 222 additions and 234 deletions

View File

@@ -1,8 +1,9 @@
import { app, BrowserWindow } from 'electron'
import { electronApp, optimizer } from '@electron-toolkit/utils'
import { controlWindow } from './control'
import { captionWindow } from './caption'
import { captionEngine, writeConfig } from './utils/config'
import { controlWindow } from './ControlWindow'
import { captionWindow } from './CaptionWindow'
import { allConfig } from './utils/AllConfig'
import { captionEngine } from './utils/CaptionEngine'
app.whenReady().then(() => {
electronApp.setAppUserModelId('com.himeditator.autocaption')
@@ -23,9 +24,9 @@ app.whenReady().then(() => {
})
})
app.on('will-quit', async () => {
app.on('will-quit', async () => {
captionEngine.stop()
writeConfig()
allConfig.writeConfig()
});
app.on('window-all-closed', () => {