From be8e2e25c2a9d0da2f2005c32ce1fc71d43bda08 Mon Sep 17 00:00:00 2001 From: QLHazyCoder <2825305047@qq.com> Date: Mon, 13 Apr 2026 00:15:50 +0800 Subject: [PATCH] =?UTF-8?q?feat(sidepanel):=20=E6=9B=B4=E6=96=B0=E9=82=AE?= =?UTF-8?q?=E7=AE=B1=E7=8A=B6=E6=80=81=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E5=B9=B6=E5=A2=9E=E5=BC=BA=E8=AE=BE=E7=BD=AE=E5=8D=A1=E7=89=87?= =?UTF-8?q?=E7=9A=84=E9=94=81=E5=AE=9A=E7=8A=B6=E6=80=81=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- background.js | 16 +++++++++- sidepanel/sidepanel.css | 22 ++++++++++++++ sidepanel/sidepanel.html | 20 ++++++++----- sidepanel/sidepanel.js | 64 ++++++++++++++++++++++++++++++++++++++-- 4 files changed, 111 insertions(+), 11 deletions(-) diff --git a/background.js b/background.js index 0da1ebb..ab1bf59 100644 --- a/background.js +++ b/background.js @@ -229,9 +229,13 @@ function broadcastDataUpdate(payload) { }).catch(() => { }); } -async function setEmailState(email) { +async function setEmailStateSilently(email) { await setState({ email }); broadcastDataUpdate({ email }); +} + +async function setEmailState(email) { + await setEmailStateSilently(email); if (email) { await resumeAutoRunIfWaitingForEmail(); } @@ -2539,6 +2543,16 @@ async function handleMessage(message, sender) { } // Side panel data updates + case 'SET_EMAIL_STATE': { + const state = await getState(); + if (isAutoRunLockedState(state)) { + throw new Error('自动流程运行中,当前不能手动修改邮箱。'); + } + const email = String(message.payload?.email || '').trim() || null; + await setEmailStateSilently(email); + return { ok: true, email }; + } + case 'SAVE_EMAIL': { const state = await getState(); if (isAutoRunLockedState(state)) { diff --git a/sidepanel/sidepanel.css b/sidepanel/sidepanel.css index 8324132..7b1a9a7 100644 --- a/sidepanel/sidepanel.css +++ b/sidepanel/sidepanel.css @@ -238,6 +238,20 @@ header { box-shadow: var(--shadow-sm); } +.data-card.is-locked { + position: relative; + overflow: hidden; +} + +.data-card.is-locked::after { + content: ''; + position: absolute; + inset: 0; + border-radius: inherit; + background: color-mix(in srgb, var(--bg-base) 18%, transparent); + pointer-events: none; +} + .section-mini-header { display: flex; align-items: center; @@ -283,6 +297,10 @@ header { min-width: 0; } +.data-value-actions { + justify-content: space-between; +} + .input-with-icon { position: relative; flex: 1; @@ -307,6 +325,10 @@ header { min-width: 0; } +.data-value-fill { + flex: 1; +} + .data-value.has-value { color: var(--text-primary); } .mono { diff --git a/sidepanel/sidepanel.html b/sidepanel/sidepanel.html index 049391f..04d6332 100644 --- a/sidepanel/sidepanel.html +++ b/sidepanel/sidepanel.html @@ -62,7 +62,7 @@
-
+
来源 +
+ + +
本地 CPA @@ -108,14 +112,11 @@
codex密码 -
-
- + -
-
@@ -186,7 +187,10 @@
回调 - 等待中... +
+ 等待中... + +