diff --git a/01_content/src/client/locales.ts b/01_content/src/client/locales.ts index fee1d52..54a8699 100644 --- a/01_content/src/client/locales.ts +++ b/01_content/src/client/locales.ts @@ -63,6 +63,7 @@ export const zh = { 'pane.terminal': '终端', 'pane.custom': '自定义', 'pane.anim': '动画', + 'pane.refresh': '刷新', 'pane.animUrlPh': '粘贴动画站点地址后回车', 'custom.title': '自定义这个窗口', 'custom.hint': '发送后将自动新建一个会话,专门负责这个窗口的自定义设计。', @@ -196,6 +197,7 @@ export const en = { 'pane.terminal': 'Terminal', 'pane.custom': 'Custom', 'pane.anim': 'Animation', + 'pane.refresh': 'Refresh', 'pane.animUrlPh': 'Paste the animation site URL and press Enter', 'custom.title': 'Customize this pane', 'custom.hint': 'Sending will create a new conversation dedicated to designing this pane.', diff --git a/01_content/src/client/split.tsx b/01_content/src/client/split.tsx index 49e1860..f18772e 100644 --- a/01_content/src/client/split.tsx +++ b/01_content/src/client/split.tsx @@ -864,10 +864,11 @@ function makeDividerHandler(kind: 'left' | 'chat' | 'top' | 'pane' | 'topPane', } } -/** 浏览器内置窗:地址栏 + iframe */ +/** 浏览器内置窗:地址栏 + 刷新 + iframe(刷新 = 重新挂载 iframe,跨域也可靠) */ function BrowserPane() { 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') @@ -882,9 +883,10 @@ function BrowserPane() { onChange={(e) => setUrl(e.target.value)} onKeyDown={(e) => { if (e.key === 'Enter') go() }} /> + -