ZhaoShanGeng commited on
Commit
7b437ea
·
1 Parent(s): cda8be4

fix: 修复页面闪烁和UI布局问题

Browse files

## 修复内容

### 1. public/index.html
- 修复 CSS 注释未闭合导致登录状态样式失效的问题(第33行 * -> */)
- 将「透传签名」开关从「模型参数」移动到「轮询与性能」区块

### 2. public/style.css
- 修复宽屏下设置页面底部出现不必要的水平滚动条
- 添加 @media (min-width: 769px) 规则隐藏宽屏水平滚动条
- 优化字体大小控制组件的溢出处理
- 添加超窄屏幕(320px以下)header 换行布局
- 多处添加 overflow-x: hidden 防止内容溢出

### 3. 构建更新
- 重新构建 Linux x64 二进制文件
- 更新 dist/public 目录

Files changed (2) hide show
  1. public/index.html +10 -8
  2. public/style.css +34 -2
public/index.html CHANGED
@@ -30,7 +30,7 @@
30
  /* 防止闪烁的关键样式 - 来自 binary-build */
31
  html:not(.auth-ready) #loginForm,
32
  html:not(.auth-ready) #mainContent { visibility: hidden; }
33
- /* 登录状态显示控制 - 合并两个分支 *
34
  .logged-in #loginForm { display: none !important; }
35
  .logged-in #mainContent { display: flex !important; }
36
  html:not(.logged-in) #mainContent { display: none !important; }
@@ -214,13 +214,6 @@ html.tab-settings .tab[data-tab="settings"] {
214
  <span class="slider"></span>
215
  </label>
216
  </div>
217
- <div class="form-group compact switch-group">
218
- <label>透传签名 <span class="help-tip" data-tooltip="将响应中的thoughtSignature透传到客户端">?</span></label>
219
- <label class="switch">
220
- <input type="checkbox" name="PASS_SIGNATURE_TO_CLIENT">
221
- <span class="slider"></span>
222
- </label>
223
- </div>
224
  </div>
225
  <div class="form-group compact">
226
  <label>系统提示词</label>
@@ -231,6 +224,15 @@ html.tab-settings .tab[data-tab="settings"] {
231
  <!-- 轮询策略与性能优化 -->
232
  <div class="config-section">
233
  <h4>🔄 轮询与性能</h4>
 
 
 
 
 
 
 
 
 
234
  <div class="form-row-inline">
235
  <div class="form-group compact">
236
  <label>策略模式 <span class="help-tip" data-tooltip="均衡负载:每次请求切换Token&#10;额度耗尽:用完额度才切换&#10;自定义次数:指定次数后切换">?</span></label>
 
30
  /* 防止闪烁的关键样式 - 来自 binary-build */
31
  html:not(.auth-ready) #loginForm,
32
  html:not(.auth-ready) #mainContent { visibility: hidden; }
33
+ /* 登录状态显示控制 - 合并两个分支 */
34
  .logged-in #loginForm { display: none !important; }
35
  .logged-in #mainContent { display: flex !important; }
36
  html:not(.logged-in) #mainContent { display: none !important; }
 
214
  <span class="slider"></span>
215
  </label>
216
  </div>
 
 
 
 
 
 
 
217
  </div>
218
  <div class="form-group compact">
219
  <label>系统提示词</label>
 
224
  <!-- 轮询策略与性能优化 -->
225
  <div class="config-section">
226
  <h4>🔄 轮询与性能</h4>
227
+ <div class="form-row-inline switch-row">
228
+ <div class="form-group compact switch-group">
229
+ <label>透传签名 <span class="help-tip" data-tooltip="将响应中的thoughtSignature透传到客户端">?</span></label>
230
+ <label class="switch">
231
+ <input type="checkbox" name="PASS_SIGNATURE_TO_CLIENT">
232
+ <span class="slider"></span>
233
+ </label>
234
+ </div>
235
+ </div>
236
  <div class="form-row-inline">
237
  <div class="form-group compact">
238
  <label>策略模式 <span class="help-tip" data-tooltip="均衡负载:每次请求切换Token&#10;额度耗尽:用完额度才切换&#10;自定义次数:指定次数后切换">?</span></label>
public/style.css CHANGED
@@ -87,6 +87,7 @@ body::before {
87
  }
88
  html {
89
  font-size: var(--font-size-base);
 
90
  }
91
  body {
92
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Ubuntu Mono', 'MiSans';
@@ -95,6 +96,7 @@ body {
95
  line-height: 1.5;
96
  height: 100vh;
97
  overflow: hidden;
 
98
  font-size: 1rem;
99
  /* 字体渲染优化 */
100
  -webkit-font-smoothing: antialiased;
@@ -124,6 +126,7 @@ code, pre, .mono, .token-display {
124
  padding: 0.5rem;
125
  height: 100vh;
126
  overflow: hidden;
 
127
  display: flex;
128
  justify-content: center;
129
  align-items: flex-start;
@@ -232,6 +235,7 @@ button.loading::after {
232
  flex-direction: column;
233
  border: 1px solid rgba(255, 255, 255, 0.5);
234
  overflow: hidden;
 
235
  }
236
  @media (prefers-color-scheme: dark) {
237
  .main-content {
@@ -292,6 +296,7 @@ button.loading::after {
292
  padding: 1rem;
293
  flex: 1;
294
  overflow: hidden;
 
295
  display: flex;
296
  flex-direction: column;
297
  }
@@ -308,9 +313,17 @@ button.loading::after {
308
  flex: 1;
309
  min-height: 0;
310
  overflow-y: auto;
 
311
  padding-right: 4px;
312
  }
313
 
 
 
 
 
 
 
 
314
  /* 顶部栏 - 统计+操作 */
315
  .top-bar {
316
  display: flex;
@@ -640,6 +653,7 @@ button.loading::after {
640
  display: flex;
641
  gap: 0.5rem;
642
  justify-content: flex-start;
 
643
  }
644
  .config-actions .btn { width: auto; }
645
 
@@ -648,12 +662,15 @@ button.loading::after {
648
  display: flex;
649
  align-items: center;
650
  gap: 0.5rem;
 
 
651
  }
652
  .font-size-control input[type="range"] {
653
  flex: 1;
 
654
  min-height: auto;
655
  height: 6px;
656
- padding: 0;
657
  cursor: pointer;
658
  }
659
  .font-size-control input[type="number"] {
@@ -1289,7 +1306,22 @@ input:checked + .slider:before {
1289
  flex: 1;
1290
  min-width: 0;
1291
  }
1292
- .tab { flex: 1; font-size: 0.7rem; padding: 0.375rem 0.5rem; min-height: 32px; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1293
  .content { padding: 0.75rem; }
1294
 
1295
  .top-bar { flex-direction: column; gap: 0.5rem; align-items: stretch; padding: 0.5rem 0.75rem; }
 
87
  }
88
  html {
89
  font-size: var(--font-size-base);
90
+ overflow-x: hidden;
91
  }
92
  body {
93
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Ubuntu Mono', 'MiSans';
 
96
  line-height: 1.5;
97
  height: 100vh;
98
  overflow: hidden;
99
+ overflow-x: hidden;
100
  font-size: 1rem;
101
  /* 字体渲染优化 */
102
  -webkit-font-smoothing: antialiased;
 
126
  padding: 0.5rem;
127
  height: 100vh;
128
  overflow: hidden;
129
+ overflow-x: hidden;
130
  display: flex;
131
  justify-content: center;
132
  align-items: flex-start;
 
235
  flex-direction: column;
236
  border: 1px solid rgba(255, 255, 255, 0.5);
237
  overflow: hidden;
238
+ overflow-x: hidden;
239
  }
240
  @media (prefers-color-scheme: dark) {
241
  .main-content {
 
296
  padding: 1rem;
297
  flex: 1;
298
  overflow: hidden;
299
+ overflow-x: hidden;
300
  display: flex;
301
  flex-direction: column;
302
  }
 
313
  flex: 1;
314
  min-height: 0;
315
  overflow-y: auto;
316
+ overflow-x: auto;
317
  padding-right: 4px;
318
  }
319
 
320
+ /* 宽屏时隐藏水平滚动条 */
321
+ @media (min-width: 769px) {
322
+ #settingsPage {
323
+ overflow-x: hidden;
324
+ }
325
+ }
326
+
327
  /* 顶部栏 - 统计+操作 */
328
  .top-bar {
329
  display: flex;
 
653
  display: flex;
654
  gap: 0.5rem;
655
  justify-content: flex-start;
656
+ flex-wrap: wrap;
657
  }
658
  .config-actions .btn { width: auto; }
659
 
 
662
  display: flex;
663
  align-items: center;
664
  gap: 0.5rem;
665
+ max-width: 100%;
666
+ overflow: hidden;
667
  }
668
  .font-size-control input[type="range"] {
669
  flex: 1;
670
+ min-width: 0;
671
  min-height: auto;
672
  height: 6px;
673
+ padding: 0 !important;
674
  cursor: pointer;
675
  }
676
  .font-size-control input[type="number"] {
 
1306
  flex: 1;
1307
  min-width: 0;
1308
  }
1309
+ .tab { flex: 1; font-size: 0.7rem; padding: 0.375rem 0.5rem; min-height: 32px; white-space: nowrap; }
1310
+ }
1311
+
1312
+ /* 超窄屏幕 - header 换行 */
1313
+ @media (max-width: 320px) {
1314
+ .header {
1315
+ flex-wrap: wrap;
1316
+ }
1317
+ .tabs {
1318
+ order: 2;
1319
+ flex: 1 1 100%;
1320
+ }
1321
+ .header-right {
1322
+ order: 1;
1323
+ margin-left: auto;
1324
+ }
1325
  .content { padding: 0.75rem; }
1326
 
1327
  .top-bar { flex-direction: column; gap: 0.5rem; align-items: stretch; padding: 0.5rem 0.75rem; }