feat: refine web analytics and history views

This commit is contained in:
Wyndham ARR
2026-08-02 12:56:22 +08:00
parent a891c0ae7a
commit 7e7470821b
37 changed files with 2088 additions and 361 deletions

View File

@@ -10,19 +10,22 @@
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--bg); font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; -webkit-font-smoothing: antialiased; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--bg); font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Thai", "Leelawadee UI", Tahoma, "PingFang SC", "Microsoft YaHei", sans-serif; -webkit-font-smoothing: antialiased; }
button, select { font: inherit; }
.mobile-header { height: 58px; padding: env(safe-area-inset-top) 18px 0; display: flex; align-items: center; justify-content: space-between; color: #fff; background: #172033; }
.brand { display: flex; align-items: center; font-size: 17px; font-weight: 750; letter-spacing: -.03em; }
.brand-name { display: block; }
.mobile-header-actions { display: flex; align-items: center; gap: 11px; }
.mobile-header .locale-switcher select { min-height: 30px; max-width: 72px; padding: 0 19px 0 7px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 8px; color: #eef3f9; background: rgba(255, 255, 255, .08); font-size: 10px; }
.connection { display: inline-flex; align-items: center; gap: 7px; color: #c8d0dd; font-size: 11px; }
.connection i { width: 7px; height: 7px; border-radius: 50%; background: #f79009; }
.connection.ready i { background: #35c895; }
.connection.error i { background: #f97066; }
.mobile-logout { min-height: 32px; padding: 0 10px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 8px; color: #e8edf5; background: rgba(255, 255, 255, .07); font-size: 10px; font-weight: 700; cursor: pointer; }
.mobile-logout:disabled { cursor: wait; opacity: .5; }
.mobile-logout { display: inline-flex; align-items: center; min-height: 24px; padding: 0 1px; border-bottom: 1px solid transparent; color: #c8d0dd; background: transparent; font-size: 10px; font-weight: 650; line-height: 1.2; text-decoration: none; cursor: pointer; transition: color .16s ease, border-color .16s ease, opacity .16s ease, transform .16s ease; }
.mobile-logout:hover { color: #fff; border-bottom-color: rgba(255, 255, 255, .48); }
.mobile-logout:active { transform: translateY(1px); }
.mobile-logout[aria-disabled="true"] { cursor: wait; opacity: .5; pointer-events: none; }
main { width: min(100% - 24px, 620px); margin: 0 auto; padding: 23px 0 calc(34px + env(safe-area-inset-bottom)); }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 4px 19px; }
@@ -31,6 +34,9 @@ main { width: min(100% - 24px, 620px); margin: 0 auto; padding: 23px 0 calc(34px
.hero small { color: var(--muted); font-size: 10px; }
.hero label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 9px; font-weight: 700; }
.hero select { min-height: 38px; max-width: 122px; padding: 0 29px 0 10px; border: 1px solid #d1d9e6; border-radius: 9px; color: var(--ink); background: #fff; outline: none; }
.bi-hero { justify-content: flex-end; margin-bottom: 12px; }
.bi-hero label { gap: 2px; font-size: 8px; }
.bi-hero select { width: 92px; min-height: 26px; max-width: 92px; padding: 0 20px 0 7px; border-radius: 7px; font-size: 9px; }
.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.kpi-grid article { min-height: 105px; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: 0 8px 24px rgba(16, 24, 40, .045); }
@@ -43,6 +49,7 @@ main { width: min(100% - 24px, 620px); margin: 0 auto; padding: 23px 0 calc(34px
.mobile-card { margin-top: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: 0 9px 26px rgba(16, 24, 40, .05); }
.card-title { padding: 18px 18px 0; }
.card-title h2 { margin: 3px 0 0; font-size: 16px; letter-spacing: -.025em; }
.card-title .data-range { margin: 6px 0 0; color: var(--muted); font-size: 9px; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.mobile-donut-row { padding: 22px 18px 17px; display: grid; grid-template-columns: 138px 1fr; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); }
.mobile-donut { width: 138px; height: 138px; display: grid; place-items: center; border-radius: 50%; background: #d8e0ec; }
.mobile-donut > div { width: 86px; height: 86px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 50%; background: #fff; }
@@ -78,6 +85,13 @@ main { width: min(100% - 24px, 620px); margin: 0 auto; padding: 23px 0 calc(34px
:focus-visible { outline: 3px solid rgba(37, 99, 235, .35); outline-offset: 2px; }
@media (max-width: 380px) {
.mobile-header { padding-left: 12px; padding-right: 12px; }
.mobile-header-actions { gap: 6px; }
.mobile-header .locale-switcher select { max-width: 58px; padding-left: 5px; padding-right: 15px; font-size: 9px; }
.connection { max-width: 76px; overflow: hidden; white-space: nowrap; font-size: 10px; }
}
@media (max-width: 370px) {
.mobile-donut-row { grid-template-columns: 118px 1fr; gap: 12px; }
.mobile-donut { width: 118px; height: 118px; }