From 7bb51185aec153cd3a39775989ec62adbfa5dd60 Mon Sep 17 00:00:00 2001 From: QLHazyCoder <2825305047@qq.com> Date: Tue, 21 Apr 2026 18:11:07 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E8=B4=A1=E7=8C=AE?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=8F=90=E7=A4=BA=E5=B1=82=EF=BC=8C=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E8=B4=A1=E7=8C=AE=E6=A8=A1=E5=BC=8F=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E5=8F=8A=E7=9B=B8=E5=85=B3=E6=8F=90=E7=A4=BA=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sidepanel/sidepanel.css | 24 +++++----- sidepanel/sidepanel.html | 23 +++++----- sidepanel/sidepanel.js | 50 ++++++++++++++++++++- tests/sidepanel-contribution-button.test.js | 2 + 4 files changed, 75 insertions(+), 24 deletions(-) diff --git a/sidepanel/sidepanel.css b/sidepanel/sidepanel.css index 87558d9..06df28b 100644 --- a/sidepanel/sidepanel.css +++ b/sidepanel/sidepanel.css @@ -243,33 +243,35 @@ header { color: var(--orange); } -.contribution-entry { - display: flex; - flex-direction: column; - align-items: flex-start; - gap: 6px; - position: relative; +.contribution-update-layer { + position: fixed; + inset: 0; + pointer-events: none; + z-index: 1400; } .contribution-update-hint { - position: relative; + --contribution-update-arrow-left: 20px; + position: absolute; + top: 0; + left: 0; display: flex; align-items: flex-start; gap: 8px; - max-width: 220px; - margin-left: 6px; + max-width: min(220px, calc(100vw - 24px)); padding: 8px 10px; background: color-mix(in srgb, var(--amber) 10%, var(--bg-base)); border: 1px solid color-mix(in srgb, var(--amber) 34%, var(--border)); border-radius: 10px; box-shadow: var(--shadow-sm); + pointer-events: auto; } .contribution-update-hint::before { content: ''; position: absolute; top: -7px; - left: 14px; + left: calc(var(--contribution-update-arrow-left) - 6px); width: 12px; height: 12px; background: inherit; @@ -436,7 +438,7 @@ header { .run-group { display: flex; - align-items: flex-start; + align-items: center; gap: 4px; flex-wrap: wrap; } diff --git a/sidepanel/sidepanel.html b/sidepanel/sidepanel.html index b4f4081..5a66eb0 100644 --- a/sidepanel/sidepanel.html +++ b/sidepanel/sidepanel.html @@ -34,17 +34,8 @@
- 公告 / 使用教程有更新了,可点上方“贡献/使用”查看。 -
- -+ 公告 / 使用教程有更新了,可点上方“贡献/使用”查看。 +
+ +