diff --git a/frontend/index.html b/frontend/index.html index eceaed8..f5aa537 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -56,12 +56,11 @@ body.no-side .main-inner{gap:0} .modal-body{padding:14px 16px} .modal-body label{display:block;font-size:12px;color:var(--text2);margin-bottom:5px} .modal-foot{padding:10px 16px;border-top:1px solid var(--line2);display:flex;justify-content:flex-end} -/* 布局规则(响应式):宽<860 或 高≥1000 → 上下布局;其余(宽屏矮窗)→ 左右分屏 - 上下布局时去掉对话流下方小输入框(输入统一走底部编辑器),侧栏收起为抽屉 */ +/* 布局规则(响应式):宽<860 → 上下布局(预览置顶);宽≥860(含高屏)→ 左右分屏。宽度自适应:全部弹性收缩不遮挡 */ .main-inner{flex:1;display:flex;min-height:0;flex-direction:row} .chat{flex:1 1 46%;min-width:0;max-width:58%;overflow-x:hidden;border-right:1px solid var(--line);border-bottom:none;background:var(--card);display:flex;flex-direction:column;min-height:0} .editor{flex:1;min-height:0} -@media (max-width:859px), (min-height:1000px){ +@media (max-width:859px){ .main-inner{flex-direction:column} .chat{width:100%;min-width:0;max-width:none;border-right:none;border-bottom:1px solid var(--line);flex:5} .editor{flex:4;min-height:180px} @@ -144,7 +143,7 @@ body.no-side .main-inner{gap:0} .kbd{background:#fff;border:1px solid #c9d2dd;border-radius:4px;padding:1px 6px;font-size:11px;color:#667;font-family:var(--mono)} /* ===== 右:统一输入区 ===== */ .editor{flex:1;min-width:0;display:flex;flex-direction:column;background:var(--card);min-height:0} -@media (max-width:859px), (min-height:1000px){ +@media (max-width:859px){ .editor{flex:4;min-height:180px} .editor-body{flex-direction:column !important} .md-preview{width:100% !important;min-width:0 !important;max-height:40% !important;flex:none !important;order:-1 !important} @@ -154,7 +153,7 @@ body.no-side .main-inner{gap:0} .morph-tabs button{border:none;background:transparent;padding:4px 13px;border-radius:6px;cursor:pointer;color:var(--text2);font-size:12px;font-family:var(--sans);line-height:1.4} .morph-tabs button.on{background:var(--blue);color:#fff;font-weight:600} #codeLang{min-width:84px;border:1px solid var(--line);border-radius:6px;padding:3px 8px;font-size:12px;font-family:inherit;background:#fff;color:var(--text);cursor:pointer} -#codeLang:disabled,#judgeBtn:disabled{opacity:.45;cursor:not-allowed;filter:grayscale(1)} +#codeLang:disabled,#judgeBtn:disabled,#tbBtn:disabled{opacity:.45;cursor:not-allowed;filter:grayscale(1)} /* 统一输入区:宽屏左右分布(输入左、Markdown 预览右) */ .editor-body{flex:1;display:flex;flex-direction:row;min-height:0;padding:12px 14px;gap:10px} .md-editor{flex:1;min-width:0;display:flex;flex-direction:column} @@ -171,6 +170,7 @@ body.no-side .main-inner{gap:0} .md-preview .lg-desc{font-size:11px;color:var(--text3);flex:1;min-width:120px} .md-preview .lg-md{background:#f3f6f9;border:1px solid var(--line);border-radius:8px;padding:8px 12px;margin-top:6px;font-size:12px} /* 底部操作行(豆包式小按钮) */ +.hint{color:var(--text2);font-size:11.5px;opacity:.85} .send-dot{width:34px;height:34px;border-radius:50%;border:none;background:var(--blue);color:#fff;font-size:15px;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 6px rgba(43,91,132,.3);transition:transform .12s} .send-dot:active{transform:scale(.94)} .send-dot:disabled{opacity:.45;cursor:not-allowed} @@ -255,10 +255,8 @@ body.no-side .main-inner{gap:0} - + - Enter 发送并清空 -
@@ -277,7 +275,8 @@ body.no-side .main-inner{gap:0}
输入形态:代码 - 代码自动保留 ✓ + Enter 发送并清空 + @@ -637,7 +636,7 @@ function loadConvHistory(convId, isFirst){ /* 侧栏抽屉开关(窄屏时顶栏 ☰ 与遮罩点击) */ function toggleSide(){ var s=document.querySelector('.side'); if(!s) return; - var narrow = window.matchMedia('(max-width:859px), (min-height:1000px)').matches; + var narrow = window.matchMedia('(max-width:859px)').matches; if(narrow){ s.classList.toggle('open'); } else { document.body.classList.toggle('no-side'); } } @@ -696,7 +695,7 @@ function updateInputUI(){ var lw=document.getElementById('langWrap'); if(lw){ lw.style.display=''; lw.classList.toggle('lang-disabled', md); } var ls=document.getElementById('codeLang'); if(ls) ls.disabled=md; var jb=document.getElementById('judgeBtn'); if(jb){ jb.style.display=''; jb.disabled=md; } - var tb=document.getElementById('tbBtn'); if(tb){ tb.style.display = md ? '' : 'none'; } + var tb=document.getElementById('tbBtn'); if(tb){ tb.style.display=''; tb.disabled=!md; } var sm=document.getElementById('stMorph'); if(sm){ sm.textContent = '输入形态:'+(md?'Markdown':'代码'); } var ah=document.getElementById('actionHint'); if(ah){ ah.textContent = md ? 'Enter 发送 · 支持 # 标题 / - 列表 / $公式$ / | 表格 |' : 'Shift/Cmd+Enter 发给 AI 讨论 · 🧪 测评按钮才判题';