From 6634b4bbcb50e90c07e069a5df8609deefad5dd5 Mon Sep 17 00:00:00 2001 From: letr Date: Wed, 25 Feb 2026 14:14:18 +0800 Subject: [PATCH 1/2] fix(dashboard): preserve custom GitHub proxy setting on reload --- .../src/components/shared/ProxySelector.vue | 34 ++++++++++++++----- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/dashboard/src/components/shared/ProxySelector.vue b/dashboard/src/components/shared/ProxySelector.vue index 1eaf751210..81f4717048 100644 --- a/dashboard/src/components/shared/ProxySelector.vue +++ b/dashboard/src/components/shared/ProxySelector.vue @@ -72,6 +72,7 @@ export default { loadingTestingConnection: false, testingProxies: {}, proxyStatus: {}, + initializing: true, } }, methods: { @@ -118,25 +119,41 @@ export default { }, }, mounted() { - this.selectedGitHubProxy = localStorage.getItem('selectedGitHubProxy') || ""; - this.radioValue = localStorage.getItem('githubProxyRadioValue') || "0"; - this.githubProxyRadioControl = localStorage.getItem('githubProxyRadioControl') || "0"; - if (this.radioValue === "1") { - if (this.githubProxyRadioControl !== "-1") { - this.selectedGitHubProxy = this.githubProxies[this.githubProxyRadioControl] || ""; + this.initializing = true; + + const savedProxy = localStorage.getItem('selectedGitHubProxy') || ""; + const savedRadio = localStorage.getItem('githubProxyRadioValue') || "0"; + const savedControl = localStorage.getItem('githubProxyRadioControl') || "0"; + + this.radioValue = savedRadio; + this.githubProxyRadioControl = savedControl; + + if (savedRadio === "1") { + if (savedControl !== "-1") { + this.selectedGitHubProxy = this.githubProxies[savedControl] || ""; + } else { + this.selectedGitHubProxy = savedProxy; } } else { this.selectedGitHubProxy = ""; } + + this.initializing = false; }, watch: { selectedGitHubProxy: function (newVal, oldVal) { + if (this.initializing) { + return; + } if (!newVal) { newVal = "" } localStorage.setItem('selectedGitHubProxy', newVal); }, radioValue: function (newVal) { + if (this.initializing) { + return; + } localStorage.setItem('githubProxyRadioValue', newVal); if (newVal === "0") { this.selectedGitHubProxy = ""; @@ -145,6 +162,9 @@ export default { } }, githubProxyRadioControl: function (newVal) { + if (this.initializing) { + return; + } localStorage.setItem('githubProxyRadioControl', newVal); if (this.radioValue !== "1") { this.selectedGitHubProxy = ""; @@ -152,8 +172,6 @@ export default { } if (newVal !== "-1") { this.selectedGitHubProxy = this.githubProxies[newVal] || ""; - } else { - this.selectedGitHubProxy = ""; } } } From 2c631d27fef13c11698723243e3807222810c9a3 Mon Sep 17 00:00:00 2001 From: letr Date: Wed, 25 Feb 2026 14:33:56 +0800 Subject: [PATCH 2/2] fix(dashboard): keep github proxy selection persisted in settings --- .../src/components/shared/ProxySelector.vue | 34 +++++++++++++------ 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/dashboard/src/components/shared/ProxySelector.vue b/dashboard/src/components/shared/ProxySelector.vue index 81f4717048..8cf69a542e 100644 --- a/dashboard/src/components/shared/ProxySelector.vue +++ b/dashboard/src/components/shared/ProxySelector.vue @@ -15,7 +15,7 @@
- + -