chore: restructure project and add i18n support
- Reorganize project structure with new electron and shared directories - Add comprehensive i18n support with Chinese, English, and Japanese locales - Update build configurations and TypeScript paths for new structure - Add various UI components including chat interface and task management - Include Windows release binaries and localization files - Update dependencies and fix import paths throughout the codebase
This commit is contained in:
17
electron/utils/chrome/isPortInUse.ts
Normal file
17
electron/utils/chrome/isPortInUse.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import net from 'net';
|
||||
|
||||
// 检查端口占用
|
||||
export function isPortInUse (port: number) {
|
||||
return new Promise((resolve) => {
|
||||
const server = net.createServer();
|
||||
|
||||
server.once('error', (err: any) => resolve(true));
|
||||
|
||||
server.once('listening', () => {
|
||||
server.close();
|
||||
resolve(false);
|
||||
});
|
||||
|
||||
server.listen(port);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user