From adec7498ae68f15a5104e42f12c9c1a7472db538 Mon Sep 17 00:00:00 2001 From: Aisland Date: Thu, 20 Aug 2026 22:44:19 +0800 Subject: [PATCH] refactor: unify refresh button at far left of web tab bar --- 01_content/src/client/split.tsx | 65 ++-- 01_content/src/client/styles.ts | 5 +- .../worklogs/2026-08-16_worktable-v2.md | 31 +- 04_test/probe-batch14.cjs | 97 ++++++ 04_test/test/test.txt | 293 ++++++++++++++++++ 5 files changed, 440 insertions(+), 51 deletions(-) create mode 100644 04_test/probe-batch14.cjs create mode 100644 04_test/test/test.txt diff --git a/01_content/src/client/split.tsx b/01_content/src/client/split.tsx index 692fc2e..60a933c 100644 --- a/01_content/src/client/split.tsx +++ b/01_content/src/client/split.tsx @@ -864,11 +864,10 @@ function makeDividerHandler(kind: 'left' | 'chat' | 'top' | 'pane' | 'topPane', } } -/** 浏览器内置窗:地址栏 + 刷新 + iframe(刷新 = 重新挂载 iframe,跨域也可靠) */ -function BrowserPane() { +/** 浏览器内置窗:地址栏 + 前往;刷新统一在标签栏最左(重挂载 iframe,跨域也可靠) */ +function BrowserPane(props: { reloadKey: number }) { const [url, setUrl] = useState('https://example.com') const [src, setSrc] = useState('https://example.com') - const [reloadKey, setReloadKey] = useState(0) const go = () => { const u = url.trim() setSrc(/^(\/|https?:\/\/)/i.test(u) ? u : 'about:blank') @@ -883,36 +882,22 @@ function BrowserPane() { onChange={(e) => setUrl(e.target.value)} onKeyDown={(e) => { if (e.key === 'Enter') go() }} /> - -