Skip to content

Commit 09fb364

Browse files
committed
修复:自适应 UI — 消除右侧溢出和顶部空白区域
- App.svelte: 将 .app-shell 宽度从 100vw 改为 100% 避免滚动条溢出 - App.svelte: 重置 body 的上下左右内边距,消除全局样式造成的无用空白 - App.svelte: 添加 html 和 .app-header 的 overflow:hidden 容器约束 - ConfigPanel.svelte: 将 h2 标题截断规则(flex:1/min-width:0/overflow:hidden)从 ≤600px 提升到基础样式,避免长 Bot ID 挤出保存按钮 - ConfigPanel.svelte: 为 .config-header 添加 overflow:hidden+min-width:0,为 .save-btn 添加 flex-shrink:0 - 清理空的 @media (max-width: 1280px) 块
1 parent 854c64b commit 09fb364

2 files changed

Lines changed: 17 additions & 9 deletions

File tree

frontend/src/App.svelte

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,22 @@
121121
box-sizing: border-box;
122122
}
123123
124+
:global(html) {
125+
overflow: hidden;
126+
}
127+
124128
:global(body) {
125129
overflow: hidden;
130+
padding-top: 0;
131+
padding-left: 0;
132+
padding-right: 0;
126133
}
127134
128135
.app-shell {
129136
display: flex;
130137
flex-direction: column;
131138
height: 100vh;
132-
width: 100vw;
139+
width: 100%;
133140
overflow: hidden;
134141
}
135142
@@ -145,6 +152,7 @@
145152
z-index: 100;
146153
flex-shrink: 0;
147154
height: 46px;
155+
overflow: hidden;
148156
}
149157
150158
.header-left {

frontend/src/pages/ConfigPanel.svelte

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,6 +1106,8 @@ async function resetFont() {
11061106
align-items: center;
11071107
margin-bottom: 1rem;
11081108
flex-shrink: 0;
1109+
overflow: hidden;
1110+
min-width: 0;
11091111
}
11101112
11111113
.config-header h2 {
@@ -1117,6 +1119,11 @@ async function resetFont() {
11171119
background: linear-gradient(135deg, rgba(31, 139, 214, .1), rgba(24, 138, 81, .08));
11181120
border: 1px solid rgba(15, 23, 42, .08);
11191121
box-shadow: var(--shadow-soft);
1122+
flex: 1;
1123+
min-width: 0;
1124+
overflow: hidden;
1125+
text-overflow: ellipsis;
1126+
white-space: nowrap;
11201127
}
11211128
11221129
.save-btn {
@@ -1126,6 +1133,7 @@ async function resetFont() {
11261133
font-size: .95rem;
11271134
font-weight: 600;
11281135
border-radius: 10px;
1136+
flex-shrink: 0;
11291137
}
11301138
11311139
.save-btn:disabled {
@@ -1471,9 +1479,6 @@ async function resetFont() {
14711479
flex-wrap: wrap;
14721480
}
14731481
1474-
@media (max-width: 1280px) {
1475-
}
1476-
14771482
@media (max-width: 900px) {
14781483
.config-panel {
14791484
padding: .75rem 1rem;
@@ -1546,11 +1551,6 @@ async function resetFont() {
15461551
.config-header h2 {
15471552
font-size: .85rem;
15481553
padding: .35rem .6rem;
1549-
flex: 1;
1550-
min-width: 0;
1551-
overflow: hidden;
1552-
text-overflow: ellipsis;
1553-
white-space: nowrap;
15541554
}
15551555
15561556
.save-btn {

0 commit comments

Comments
 (0)