refactor(config): reload editor and auth files via events

This commit is contained in:
hkfires
2025-11-21 10:36:04 +08:00
parent e58d462153
commit 323485445d
4 changed files with 39 additions and 5 deletions

7
app.js
View File

@@ -150,6 +150,9 @@ class CLIProxyManager {
this.initializeTheme();
this.registerSettingsListeners();
this.registerUsageListeners();
if (typeof this.registerConfigEditorListeners === 'function') {
this.registerConfigEditorListeners();
}
this.checkLoginStatus();
this.bindEvents();
this.setupNavigation();
@@ -161,6 +164,10 @@ class CLIProxyManager {
this.updateLoginConnectionInfo();
// 检查主机名,如果不是 localhost 或 127.0.0.1,则隐藏 OAuth 登录框
this.checkHostAndHideOAuth();
if (typeof this.registerAuthFilesListeners === 'function') {
this.registerAuthFilesListeners();
}
}
// 检查主机名并隐藏 OAuth 登录框