From 3e3d92de7abf2cc8a072ef5898bfff61b194d00b Mon Sep 17 00:00:00 2001 From: QLHazyCoder <2825305047@qq.com> Date: Mon, 13 Apr 2026 00:24:30 +0800 Subject: [PATCH] =?UTF-8?q?feat(sidepanel):=20=E6=B7=BB=E5=8A=A0=20VPS=20?= =?UTF-8?q?=E5=AF=86=E7=A0=81=E5=88=87=E6=8D=A2=E6=8C=89=E9=92=AE=E5=8F=8A?= =?UTF-8?q?=E5=85=B6=E6=A0=87=E7=AD=BE=E5=90=8C=E6=AD=A5=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sidepanel/sidepanel.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sidepanel/sidepanel.js b/sidepanel/sidepanel.js index 6f45da9..8f9129b 100644 --- a/sidepanel/sidepanel.js +++ b/sidepanel/sidepanel.js @@ -19,6 +19,7 @@ const statusBar = document.getElementById('status-bar'); const inputEmail = document.getElementById('input-email'); const inputPassword = document.getElementById('input-password'); const btnToggleVpsUrl = document.getElementById('btn-toggle-vps-url'); +const btnToggleVpsPassword = document.getElementById('btn-toggle-vps-password'); const btnFetchEmail = document.getElementById('btn-fetch-email'); const btnTogglePassword = document.getElementById('btn-toggle-password'); const btnSaveSettings = document.getElementById('btn-save-settings'); @@ -1463,6 +1464,13 @@ function syncVpsUrlToggleLabel() { }); } +function syncVpsPasswordToggleLabel() { + syncToggleButtonLabel(btnToggleVpsPassword, inputVpsPassword, { + show: '显示管理密钥', + hide: '隐藏管理密钥', + }); +} + async function maybeTakeoverAutoRun(actionLabel) { if (!isAutoRunPausedPhase()) { return true; @@ -1799,6 +1807,11 @@ btnToggleVpsUrl.addEventListener('click', () => { syncVpsUrlToggleLabel(); }); +btnToggleVpsPassword.addEventListener('click', () => { + inputVpsPassword.type = inputVpsPassword.type === 'password' ? 'text' : 'password'; + syncVpsPasswordToggleLabel(); +}); + localCpaStep9ModeButtons.forEach((button) => { button.addEventListener('click', () => { const nextMode = button.dataset.localCpaStep9Mode; @@ -2279,6 +2292,7 @@ setLocalCpaStep9Mode(DEFAULT_LOCAL_CPA_STEP9_MODE); restoreState().then(() => { syncPasswordToggleLabel(); syncVpsUrlToggleLabel(); + syncVpsPasswordToggleLabel(); updatePanelModeUI(); updateButtonStates(); updateStatusDisplay(latestState);