refactor clawx

This commit is contained in:
paisley
2026-03-07 15:51:44 +08:00
parent b41a8eedd9
commit 3c9cec9fb3
40 changed files with 2567 additions and 638 deletions

View File

@@ -331,12 +331,14 @@ class DeviceOAuthManager extends EventEmitter {
userCode: string;
expiresIn: number;
}) {
this.emit('oauth:code', data);
if (this.mainWindow && !this.mainWindow.isDestroyed()) {
this.mainWindow.webContents.send('oauth:code', data);
}
}
private emitError(message: string) {
this.emit('oauth:error', { message });
if (this.mainWindow && !this.mainWindow.isDestroyed()) {
this.mainWindow.webContents.send('oauth:error', { message });
}