From fdab512b734e310de336d033297b3812db9dd481 Mon Sep 17 00:00:00 2001 From: kicer Date: Sun, 18 Oct 2026 22:24:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E9=A2=84=E8=A7=88=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/server/public/css/style.css | 12 ++++++-- app/server/public/index.html | 34 ++++++++++++++++++---- app/server/public/js/preview.js | 15 ++++++++-- app/server/public/sw.js | 45 ++++++++++++++++++++++++------ app/server/routes/preview-proxy.js | 15 +++++++++- app/server/server.js | 4 +++ 6 files changed, 105 insertions(+), 20 deletions(-) diff --git a/app/server/public/css/style.css b/app/server/public/css/style.css index c75a527..4af6129 100644 --- a/app/server/public/css/style.css +++ b/app/server/public/css/style.css @@ -1274,8 +1274,16 @@ label.icon-btn { cursor: pointer; } body.pv-open.pv-max #app { width: 100%; margin-left: 0; } } .pv-head { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 14px; border-bottom: 1px solid var(--border); background: var(--drawer-bg); } -.pv-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; } -.pv-actions { flex: none; display: flex; align-items: center; gap: 6px; margin-left: 8px; } +/* 地址条胶囊:路径 input + 内嵌动作钮,模拟浏览器地址栏 */ +.pv-addr { flex: 1; min-width: 0; display: flex; align-items: center; gap: 2px; background: var(--surface); border: 1px solid transparent; border-radius: 10px; padding: 2px 2px 2px 4px; } +.pv-addr:focus-within { border-color: var(--border); background: var(--page); } +.pv-title { flex: 1; min-width: 0; padding: 5px 6px; font-size: 13px; font-weight: 600; cursor: text; } +.pv-addr .icon-btn { flex: none; width: 26px; height: 26px; border-radius: 7px; display: flex; align-items: center; justify-content: center; color: var(--gray); } +.pv-addr .icon-btn:hover { color: var(--ink); } +.pv-addr .icon-btn:active { background: rgba(0, 0, 0, .06); } +.pv-actions { flex: none; display: flex; align-items: center; gap: 10px; margin-left: 12px; padding-right: 2px; } +.pv-actions .icon-btn { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--ink); } +.pv-actions .icon-btn:active { background: var(--surface); } .pv-body { flex: 1; min-height: 0; position: relative; overflow: auto; display: flex; flex-direction: column; background: #fff; } .pv-frame { flex: 1; width: 100%; height: 100%; border: 0; background: #fff; } .pv-doc { width: 100%; max-width: 860px; margin: 0 auto; padding: 16px 20px 40px; } diff --git a/app/server/public/index.html b/app/server/public/index.html index 4ee0038..9a393be 100644 --- a/app/server/public/index.html +++ b/app/server/public/index.html @@ -404,19 +404,23 @@