Skip to content

Commit 41bc9f1

Browse files
committed
修复移动端站点卡片走势图不显示 (v1.11.2)
移动端媒体查询里残留老进度条时代的 .st-bar{display:none}, 换成 sparkline 后整个图被隐藏。修复: - 移动端显示走势图,svg 改为宽度自适应(height:auto 等比缩放) - 站点卡片移动端改两行布局:首行 图标+名称/走势/预测(图占满宽度), 次行 余额(左)+ 操作按钮(右),互不挤压 - 走势图文字说明在移动端收起,预测行自动换行
1 parent 9da06e0 commit 41bc9f1

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "relay-monitor",
3-
"version": "1.11.1",
3+
"version": "1.11.2",
44
"private": true,
55
"description": "监控 sub2api / new-api 中转站余额的网页面板",
66
"type": "module",

public/styles.css

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,8 @@ button { font-family: inherit; cursor: pointer; }
175175
}
176176
.st-meta { font-size: 11.5px; color: var(--text-tertiary); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
177177
.st-bar { display: flex; align-items: center; gap: 10px; margin-top: 7px; }
178-
.spark { width: 170px; height: 30px; flex-shrink: 0; }
178+
/* 宽度自适应(移动端收窄),viewBox 等比缩放 */
179+
.spark { width: 100%; max-width: 170px; height: auto; flex-shrink: 1; }
179180
.spark-line { fill: none; stroke: var(--primary); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
180181
.spark-area { fill: var(--primary); opacity: .08; }
181182
.spark-dot { fill: var(--primary); stroke: var(--bg-surface); stroke-width: 1.5; }
@@ -291,11 +292,15 @@ button { font-family: inherit; cursor: pointer; }
291292
.stat-card { padding: 10px 12px; }
292293
.stat-card .value { font-size: 18px; }
293294

294-
.st-bar { display: none; }
295-
.st-row { gap: 10px; padding: 11px 12px; }
295+
/* 站点卡片两行布局:首行 图标+信息(走势图有完整宽度),次行 余额+操作 */
296+
.st-row { gap: 10px; row-gap: 8px; padding: 11px 12px; flex-wrap: wrap; }
296297
.st-plate { width: 32px; height: 32px; }
297-
.st-balance { min-width: 84px; }
298-
.st-balance .amt { font-size: 15px; }
298+
.st-main { flex: 1 1 calc(100% - 42px); }
299+
.st-balance { order: 3; text-align: left; min-width: 0; flex: 1; margin-left: 42px; }
300+
.st-balance .amt { font-size: 16px; }
301+
.st-actions { order: 4; margin-left: auto; align-self: center; }
302+
.st-usage { display: none; } /* 走势图的文字说明收起,图保留 */
303+
.st-predict { flex-wrap: wrap; }
299304

300305
.usage-filters { flex-wrap: wrap; }
301306
.dr-channels { max-width: 100%; justify-content: flex-start; }

0 commit comments

Comments
 (0)