Skip to content

Commit 9da06e0

Browse files
committed
我的站点默认展示今天;移动端适配 (v1.11.1)
- 「我的站点」默认范围从近 7 天改为今天 - ≤720px 移动端:整窗全屏(去边框圆角与红绿灯)、侧栏变为顶部横向 滚动导航(隐藏品牌区/分组标签/脚注)、内容边距收窄至 12px、 统计卡双列、站点行紧凑化、筛选与表单行自动换行、日报预览高度适配 - 修正 --content-padding 移动端覆盖被主题选择器优先级压制的问题 - 全页面验证无横向滚动;桌面布局不受影响
1 parent ae531cf commit 9da06e0

3 files changed

Lines changed: 41 additions & 3 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.0",
3+
"version": "1.11.1",
44
"private": true,
55
"description": "监控 sub2api / new-api 中转站余额的网页面板",
66
"type": "module",

public/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const state = {
2424
view: "dashboard", user: null, app: null,
2525
trendHours: 24, overview: null, // 总览趋势图的时间范围与数据缓存 {hours, series, at}
2626
usageRange: "today", usageStation: "all", usageData: null, // 用量统计页
27-
ownRange: "7d", ownData: null, // 我的站点分析页
27+
ownRange: "today", ownData: null, // 我的站点分析页(默认看今天)
2828
};
2929
let autoTimer = null;
3030

public/styles.css

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,48 @@ button { font-family: inherit; cursor: pointer; }
261261
@media (max-width: 1000px) {
262262
.stats.stats-5 { grid-template-columns: repeat(3, 1fr); }
263263
}
264+
265+
/* ---- 移动端适配 ---- */
264266
@media (max-width: 720px) {
265-
.stats, .stats.stats-5 { grid-template-columns: repeat(2, 1fr); }
267+
:root, :root[data-theme="light"], :root[data-theme="dark"] { --content-padding: 12px; }
268+
.window {
269+
width: 100vw; height: 100dvh; margin: 0; border-radius: 0; box-shadow: none;
270+
}
271+
.traffic { display: none; }
272+
.titlebar { padding: 0 10px; }
273+
.titlebar-title { position: static; transform: none; }
274+
275+
/* 侧栏变为顶部横向导航 */
276+
.shell { flex-direction: column; }
277+
.sidebar {
278+
width: 100%; flex-direction: row; align-items: center; gap: 2px;
279+
padding: 6px 8px; overflow-x: auto; -webkit-overflow-scrolling: touch;
280+
border-right: none; border-bottom: 1px solid var(--border); flex-shrink: 0;
281+
}
282+
.sidebar::-webkit-scrollbar { display: none; }
283+
.brand, .nav-label, .sidebar-foot { display: none; }
284+
.nav-item { width: auto; flex: 0 0 auto; height: 32px; padding: 0 12px; margin-bottom: 0; }
285+
286+
.page-header { padding: 12px var(--content-padding) 0; flex-wrap: wrap; }
287+
.page-header h1 { font-size: 17px; }
288+
.content { padding: 12px var(--content-padding) 20px; }
289+
290+
.stats, .stats.stats-5 { grid-template-columns: repeat(2, 1fr); gap: 8px; }
291+
.stat-card { padding: 10px 12px; }
292+
.stat-card .value { font-size: 18px; }
293+
266294
.st-bar { display: none; }
295+
.st-row { gap: 10px; padding: 11px 12px; }
296+
.st-plate { width: 32px; height: 32px; }
297+
.st-balance { min-width: 84px; }
298+
.st-balance .amt { font-size: 15px; }
299+
300+
.usage-filters { flex-wrap: wrap; }
301+
.dr-channels { max-width: 100%; justify-content: flex-start; }
302+
.purchase-row { flex-wrap: wrap; }
267303
.trend-stats { grid-template-columns: repeat(2, 1fr); }
304+
.set-row { flex-wrap: wrap; }
305+
.report-frame { height: 52vh; }
268306
}
269307

270308
/* ---- 登录屏 ---- */

0 commit comments

Comments
 (0)