Complete Electron desktop application implementation

- Add backend auto-start functionality in main process
- Fix authentication token storage for Electron environment
- Implement localStorage-based token management in Electron
- Add proper Electron environment detection via preload script
- Fix WebSocket connections for terminal functionality
- Resolve font file loading issues in packaged application
- Update API endpoints to work with backend auto-start
- Streamline build scripts with unified electron:package command
- Fix better-sqlite3 native module compatibility issues
- Ensure all services start automatically in production mode

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
ZacharyZcR
2025-09-04 21:37:33 +08:00
parent 591309530d
commit d0b58acb1c
9 changed files with 3423 additions and 2214 deletions

View File

@@ -14,4 +14,5 @@ contextBridge.exposeInMainWorld('electronAPI', {
});
// 添加一个标识,让渲染进程知道这是 Electron 环境
window.IS_ELECTRON = true;
// 在上下文隔离环境中,使用 contextBridge 暴露
contextBridge.exposeInMainWorld('IS_ELECTRON', true);