|
33 | 33 | background: transparent !important; |
34 | 34 | overflow: hidden; |
35 | 35 | } |
36 | | - /* Electron 独立窗口模式:React Chat 覆盖全窗口 */ |
| 36 | + /* Electron 独立窗口:overlay 充满窗口、当透明容器;内部 #react-chat-window-shell |
| 37 | + 走与首页共用的 compact 胶囊样式(static/css/index.css 里 |
| 38 | + body.subtitle-web-host #react-chat-window-shell[data-chat-surface-mode="compact"] |
| 39 | + 规则集,chat.html 的 <body> 带 subtitle-web-host 故自动命中)。 */ |
37 | 40 | #react-chat-window-overlay { |
38 | 41 | position: fixed; inset: 0; |
39 | 42 | display: block !important; |
40 | 43 | background: transparent !important; |
41 | 44 | } |
42 | 45 | #react-chat-window-backdrop { display: none !important; } |
43 | | - #react-chat-window-shell:not(.is-minimized):not(.is-collapsing):not(.is-expanding) { |
44 | | - position: fixed !important; |
45 | | - inset: 40px 25px 25px 20px !important; |
46 | | - width: auto !important; height: auto !important; |
47 | | - max-width: none !important; max-height: none !important; |
48 | | - transform: none !important; |
49 | | - border-radius: 22px !important; |
50 | | - background: transparent !important; |
51 | | - /* 液态边缘反光 — 顶部最亮,左次之,模拟顶光 */ |
52 | | - border-top: 2px solid rgba(255, 255, 255, 0.7) !important; |
53 | | - border-left: 1px solid rgba(255, 255, 255, 0.35) !important; |
54 | | - border-right: 1px solid rgba(255, 255, 255, 0.15) !important; |
55 | | - border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important; |
56 | | - /* 外阴影 + 内高光带 */ |
57 | | - box-shadow: |
58 | | - 0 4px 16px rgba(12, 20, 34, 0.18), |
59 | | - 0 1px 4px rgba(12, 20, 34, 0.1), |
60 | | - inset 0 2px 4px rgba(255, 255, 255, 0.5), |
61 | | - inset 0 -1px 2px rgba(255, 255, 255, 0.08) !important; |
62 | | - } |
63 | | - /* 顶栏:降低透明度 + 减小高度(原 min-height:54px + padding:10px 14px 8px) */ |
64 | | - .window-topbar { |
65 | | - background: rgba(255, 255, 255, 0.35) !important; |
66 | | - min-height: 45px !important; |
67 | | - height: 45px !important; |
68 | | - padding: 0 12px !important; |
69 | | - box-sizing: border-box !important; |
70 | | - } |
71 | | - .window-topbar-actions, |
72 | | - .window-topbar-actions > * { |
73 | | - display: flex !important; |
74 | | - align-items: center !important; |
75 | | - } |
76 | | - /* 右上角四个按钮居中对齐 topbar(原 top:10px 基于 54px 高度,现适配 45px) */ |
77 | | - #react-chat-window-header-actions { |
78 | | - top: 5px !important; |
79 | | - } |
80 | | - #reactChatWindowCloseButton { |
81 | | - position: relative !important; |
82 | | - top: -2px !important; |
83 | | - } |
| 46 | + /* ────────────────────────────────────────────────────────────────────── |
| 47 | + full 形态(覆盖全窗口的玻璃面板)已退环境,仅在此留档: |
| 48 | + 旧版在这里把 #react-chat-window-shell 钉成 inset:40px 的全窗口玻璃面板 |
| 49 | + (磨砂背景 / 四边反光边框 / 外阴影 + ::before 静态高光 + ::after 流光动画 |
| 50 | + + 顶栏 chrome + #react-chat-window-root 四边渐隐 mask)。因为这些规则不带 |
| 51 | + data-chat-surface-mode 门槛、且 overlay 又不是 hidden,页面一加载、React 还 |
| 52 | + 没挂载时就会先画出这块空的全窗口玻璃面板,挂载后才塌成 compact —— 就是 |
| 53 | + "先 full 再 compact" 的那一帧。现在 shell 直接复用 index.css 的 compact 胶囊 |
| 54 | + 规则(透明壳 + 隐藏顶栏按钮 + 去掉 ::before/::after 玻璃层),不再注入任何 |
| 55 | + full 形态样式/动画/mask 资源。 |
| 56 | + ────────────────────────────────────────────────────────────────────── */ |
84 | 57 | body.yui-guide-chat-buttons-disabled #react-chat-window-shell button, |
85 | 58 | body.yui-guide-chat-buttons-disabled #toggle-chat-btn { |
86 | 59 | pointer-events: none !important; |
|
282 | 255 | 'Hiragino Sans', 'Malgun Gothic', sans-serif !important; |
283 | 256 | font-weight: 400 !important; |
284 | 257 | } |
285 | | - [data-theme="dark"] .window-topbar { |
286 | | - background: rgba(50, 50, 72, 0.35) !important; |
287 | | - } |
288 | | - /* 四边透明度渐变带:窄边(~10px),让边缘内容淡出露出高光 */ |
289 | | - #react-chat-window-root { |
290 | | - -webkit-mask-image: |
291 | | - linear-gradient(to bottom, rgba(0,0,0,0.3) 0px, black 10px, black calc(100% - 10px), rgba(0,0,0,0.6) 100%), |
292 | | - linear-gradient(to right, rgba(0,0,0,0.4) 0px, black 8px, black calc(100% - 8px), rgba(0,0,0,0.4) 100%) !important; |
293 | | - -webkit-mask-composite: source-in !important; |
294 | | - } |
295 | | - body.electron-chat-window.subtitle-web-host #react-chat-window-shell[data-chat-surface-mode="compact"] #react-chat-window-root { |
296 | | - -webkit-mask-image: none !important; |
297 | | - mask-image: none !important; |
298 | | - -webkit-mask-composite: initial !important; |
299 | | - mask-composite: initial !important; |
300 | | - } |
301 | | - @keyframes liquidFlow { |
302 | | - 0% { background-position: 0% 0%, 80% 10%, 40% 30%, 90% 50%, 20% 70%, 60% 85%, 95% 90%; } |
303 | | - 12% { background-position: 50% 15%, 20% 60%, 80% 10%, 40% 80%, 70% 5%, 10% 50%, 55% 35%; } |
304 | | - 25% { background-position: 90% 55%, 50% 90%, 15% 65%, 75% 20%, 45% 85%, 85% 15%, 20% 70%; } |
305 | | - 38% { background-position: 30% 85%, 85% 30%, 60% 95%, 10% 45%, 90% 40%, 40% 70%, 70% 10%; } |
306 | | - 50% { background-position: 70% 40%, 10% 75%, 95% 20%, 55% 90%, 15% 30%, 75% 55%, 35% 80%; } |
307 | | - 63% { background-position: 15% 70%, 65% 15%, 30% 50%, 85% 65%, 55% 95%, 25% 25%, 80% 50%; } |
308 | | - 75% { background-position: 80% 25%, 35% 85%, 70% 40%, 20% 10%, 85% 60%, 50% 90%, 10% 30%; } |
309 | | - 88% { background-position: 45% 90%, 90% 45%, 10% 75%, 60% 35%, 30% 50%, 80% 10%, 50% 65%; } |
310 | | - 100% { background-position: 0% 0%, 80% 10%, 40% 30%, 90% 50%, 20% 70%, 60% 85%, 95% 90%; } |
311 | | - } |
312 | | - /* 对角光带扫过 */ |
313 | | - @keyframes lightSweep { |
314 | | - 0% { background-position: -150% -150%; } |
315 | | - 100% { background-position: 250% 250%; } |
316 | | - } |
317 | | - /* 静态边缘高光层 — 在内容之下 */ |
318 | | - #react-chat-window-shell:not(.is-minimized)::before { |
319 | | - content: '' !important; |
320 | | - position: absolute !important; |
321 | | - inset: 0 !important; |
322 | | - border-radius: 22px !important; |
323 | | - pointer-events: none !important; |
324 | | - z-index: 0 !important; |
325 | | - /* 边缘高光 */ |
326 | | - box-shadow: |
327 | | - inset 0 2px 6px rgba(255, 255, 255, 0.5), |
328 | | - inset 0 -1px 3px rgba(255, 255, 255, 0.1), |
329 | | - inset 2px 0 4px rgba(255, 255, 255, 0.15), |
330 | | - inset -2px 0 4px rgba(255, 255, 255, 0.08) !important; |
331 | | - /* 顶部弧形高光(静态) */ |
332 | | - background: linear-gradient( |
333 | | - 180deg, |
334 | | - rgba(255, 255, 255, 0.25) 0%, |
335 | | - rgba(255, 255, 255, 0.08) 8%, |
336 | | - transparent 20%, |
337 | | - transparent 85%, |
338 | | - rgba(255, 255, 255, 0.04) 100% |
339 | | - ) !important; |
340 | | - } |
341 | | - /* 流动光斑层 — 三色径向渐变缓慢漂移,模拟玻璃折射 |
342 | | - 用 background-image 而非 background 简写,避免 !important 锁死 background-position */ |
343 | | - #react-chat-window-shell:not(.is-minimized)::after { |
344 | | - content: '' !important; |
345 | | - position: absolute !important; |
346 | | - inset: 0 !important; |
347 | | - border-radius: 22px !important; |
348 | | - pointer-events: none !important; |
349 | | - z-index: 10 !important; |
350 | | - background-image: |
351 | | - radial-gradient(circle at 15% 10%, rgba(100,180,255,0.14) 0%, transparent 22%), |
352 | | - radial-gradient(circle at 75% 15%, rgba(180,140,255,0.11) 0%, transparent 20%), |
353 | | - radial-gradient(circle at 40% 35%, rgba(220,140,240,0.12) 0%, transparent 18%), |
354 | | - radial-gradient(circle at 85% 50%, rgba(120,200,255,0.13) 0%, transparent 20%), |
355 | | - radial-gradient(circle at 25% 65%, rgba(200,160,255,0.10) 0%, transparent 19%), |
356 | | - radial-gradient(circle at 60% 80%, rgba(100,190,255,0.12) 0%, transparent 21%), |
357 | | - radial-gradient(circle at 90% 85%, rgba(240,150,200,0.10) 0%, transparent 17%) !important; |
358 | | - background-size: 200% 200%, 200% 200%, 200% 200%, 200% 200%, 200% 200%, 200% 200%, 200% 200% !important; |
359 | | - background-repeat: no-repeat !important; |
360 | | - animation: liquidFlow 20s ease-in-out infinite !important; |
361 | | - } |
362 | | - /* 折叠/展开动画期间:允许 JS 控制 position/size/transform */ |
363 | | - #react-chat-window-shell.is-collapsing, |
364 | | - #react-chat-window-shell.is-expanding { |
365 | | - inset: auto !important; |
366 | | - max-width: none !important; max-height: none !important; |
367 | | - border-radius: 22px !important; |
368 | | - } |
369 | | - /* 最小化态 */ |
370 | | - #react-chat-window-shell.is-minimized { |
371 | | - inset: auto !important; |
372 | | - max-width: none !important; max-height: none !important; |
373 | | - } |
| 258 | + /* full 形态的暗色顶栏底、#react-chat-window-root 四边渐隐 mask、liquidFlow / |
| 259 | + lightSweep 玻璃流光关键帧、以及 shell 的 ::before/::after 玻璃层、 |
| 260 | + is-collapsing/is-expanding/is-minimized 全窗口几何复位,均随 full 形态一并 |
| 261 | + 退环境。compact 态的最小化/折叠/展开几何由 index.css 的 subtitle-web-host |
| 262 | + 规则统一负责,这里不再注入 full 形态资源。 */ |
374 | 263 | /* 输入区提到光晕层之上,保持原始不透明度 */ |
375 | 264 | .composer-panel { |
376 | 265 | position: relative !important; |
|
659 | 548 | </div> |
660 | 549 |
|
661 | 550 | <!-- React Chat(与 index.html 完全相同的 DOM 结构)--> |
662 | | - <div id="react-chat-window-overlay"> |
| 551 | + <!-- overlay 默认 hidden(与 index.html 一致):在 React 挂载完成、shell 已带 |
| 552 | + data-chat-surface-mode="compact" 之前不渲染任何东西,避免先闪一帧 full 形态。 |
| 553 | + app-react-chat-window.js 的 openWindow() 会在 mountWindow() 之后置 hidden=false。 --> |
| 554 | + <div id="react-chat-window-overlay" hidden> |
663 | 555 | <div id="react-chat-window-backdrop"></div> |
664 | 556 | <div id="react-chat-window-shell" role="dialog" aria-modal="true" aria-labelledby="react-chat-window-title"> |
665 | 557 | <div id="react-chat-window-drag-handle" aria-hidden="true"></div> |
|
0 commit comments