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

@@ -32,7 +32,7 @@ body {
background:
radial-gradient(circle at 78% -20%, rgba(37, 99, 235, .08), transparent 32rem),
var(--bg);
font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Thai", "Leelawadee UI", Tahoma, "PingFang SC", "Microsoft YaHei", sans-serif;
font-size: 14px;
line-height: 1.5;
-webkit-font-smoothing: antialiased;
@@ -81,39 +81,44 @@ button { color: inherit; }
.brand-name { display: block; }
.header-meta { display: flex; align-items: center; gap: 20px; }
.system-status { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.system-status i { width: 8px; height: 8px; border-radius: 50%; background: #f79009; box-shadow: 0 0 0 4px #fff4e5; }
.system-status.is-ready i { background: var(--green); box-shadow: 0 0 0 4px #e8f7f1; }
.system-status.is-error i { background: var(--red); box-shadow: 0 0 0 4px #feeceb; }
.task-log-trigger {
min-height: 36px;
padding: 0 12px;
border: 1px solid var(--line-strong);
border-radius: 9px;
color: #344054;
background: #fff;
box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
font-size: 13px;
font-weight: 650;
cursor: pointer;
transition: color .16s ease, border-color .16s ease, background-color .16s ease, transform .16s ease;
}
.task-log-trigger:hover { color: var(--blue-dark); border-color: #a9c1f5; background: #f5f8ff; }
.task-log-trigger:active { transform: translateY(1px); }
.logout-button {
.locale-switcher { display: inline-flex; align-items: center; }
.locale-switcher select {
min-height: 34px;
padding: 0 12px;
max-width: 108px;
padding: 0 26px 0 9px;
border: 1px solid var(--line-strong);
border-radius: 9px;
color: var(--muted);
background: #fff;
font-size: 12px;
font-weight: 650;
cursor: pointer;
transition: color .16s ease, border-color .16s ease, background-color .16s ease;
outline: none;
}
.logout-button:hover:not(:disabled) { color: var(--ink); border-color: #b9c4d3; background: var(--surface-soft); }
.logout-button:disabled { cursor: wait; opacity: .55; }
.locale-switcher select:focus-visible { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.system-status { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.system-status i { width: 8px; height: 8px; border-radius: 50%; background: #f79009; box-shadow: 0 0 0 4px #fff4e5; }
.system-status.is-ready i { background: var(--green); box-shadow: 0 0 0 4px #e8f7f1; }
.system-status.is-error i { background: var(--red); box-shadow: 0 0 0 4px #feeceb; }
.system-status.is-ready > span { display: none; }
.task-log-link, .logout-link {
display: inline-flex;
align-items: center;
min-height: 24px;
padding: 0 2px;
border: 0;
border-bottom: 1px solid transparent;
color: var(--muted);
background: transparent;
font-size: 12px;
font-weight: 600;
line-height: 1.2;
text-decoration: none;
cursor: pointer;
transition: color .16s ease, border-color .16s ease, opacity .16s ease, transform .16s ease;
}
.task-log-link:hover, .logout-link:hover:not([aria-disabled="true"]) { color: var(--ink); border-bottom-color: #b7c2d2; }
.task-log-link:active, .logout-link:active:not([aria-disabled="true"]) { transform: translateY(1px); }
.logout-link[aria-disabled="true"] { cursor: wait; opacity: .48; pointer-events: none; }
.tab-bar { position: sticky; top: 0; z-index: 20; background: rgba(245, 247, 251, .92); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.tabs { height: 54px; display: flex; align-items: stretch; gap: 30px; overflow-x: auto; scrollbar-width: none; }
@@ -136,6 +141,7 @@ button { color: inherit; }
.page { padding-top: 38px; padding-bottom: 72px; }
.tabpanel { animation: panel-in .24s ease both; }
.tabpanel[hidden] { display: none; }
#panel-bi { margin-top: -20px; }
@keyframes panel-in { from { opacity: 0; transform: translateY(5px); } }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 24px; }
@@ -247,7 +253,19 @@ button { color: inherit; }
.accent-card::after { border-color: rgba(255, 255, 255, .08); }
.table-panel { overflow: hidden; }
.table-heading { align-items: center; padding-bottom: 18px; }
.table-heading { align-items: center; flex-wrap: wrap; padding-bottom: 18px; }
.history-heading-actions { min-width: 0; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px 12px; }
.history-month-control { min-width: 0; display: inline-flex; align-items: center; gap: 5px; }
.history-month-label { margin-right: 2px; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .035em; white-space: nowrap; }
.history-month-field { width: 128px; flex: 0 0 auto; }
.history-month-field input { width: 100%; min-height: 34px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--ink); background: #fff; font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; }
.history-month-step, .history-month-current, .history-empty-jump { min-height: 34px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--muted); background: #fff; font-size: 11px; font-weight: 700; cursor: pointer; }
.history-month-step { width: 32px; padding: 0; font-size: 18px; line-height: 1; }
.history-month-current { padding: 0 10px; }
.history-month-step:hover:not(:disabled), .history-month-current:hover:not(:disabled), .history-empty-jump:hover { color: var(--blue); border-color: #a9c1f5; background: var(--blue-soft); }
.history-month-step:disabled, .history-month-current:disabled { color: var(--subtle); background: #f3f5f8; cursor: not-allowed; opacity: .7; }
.history-empty-content { display: inline-flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 12px; }
.history-empty-jump { min-height: 30px; padding: 0 9px; color: var(--blue); }
.monthly-history-panel { border-color: #dbe3ef; box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 18px 44px rgba(31, 51, 82, .06); }
.monthly-panel-toolbar { min-height: 52px; padding: 12px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.monthly-panel-title { margin: 0; color: var(--ink); font-size: 18px; line-height: 1.3; letter-spacing: -.025em; }
@@ -297,8 +315,12 @@ tbody tr:hover td { background: #fafcff; }
input[type="month"], input[type="date"], select { min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--ink); background: #fff; outline: none; }
input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.month-picker { min-width: 164px; }
.bi-heading { justify-content: flex-end; align-items: flex-start; margin-bottom: 15px; }
.bi-heading .month-picker { width: 92px; min-width: 0; gap: 2px; font-size: 8px; letter-spacing: .02em; }
.bi-heading .month-picker select { width: 92px; min-height: 26px; padding: 0 20px 0 7px; border-radius: 7px; font-size: 9px; }
.chart-panel { margin-bottom: 20px; }
.chart-data-range { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.company-chart-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, .8fr); gap: 28px; padding: 24px; }
.ranking-chart { min-height: 300px; display: flex; flex-direction: column; gap: 15px; justify-content: center; }
.rank-row { display: grid; grid-template-columns: minmax(100px, 180px) minmax(110px, 1fr) 100px; align-items: center; gap: 12px; }
@@ -337,7 +359,8 @@ input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgb
.company-report-setup { overflow: hidden; }
.company-setup-heading { padding: 22px 24px 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.company-setup-heading h2 { margin: 0; font-size: 18px; line-height: 1.3; letter-spacing: -.025em; }
.company-month-field { width: clamp(120px, 14vw, 156px); flex: 0 0 auto; display: block; }
.company-month-field { width: clamp(150px, 16vw, 180px); flex: 0 0 auto; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; }
.company-month-field > span { color: var(--muted); font-size: 10px; font-weight: 750; white-space: nowrap; }
.company-month-field input { width: 100%; min-height: 38px; padding: 0 10px; border-radius: 9px; font-size: 12px; }
.company-report-card-row { display: grid; grid-template-columns: minmax(320px, 1.35fr) repeat(3, minmax(0, 1fr)); gap: 16px; padding: 18px 24px 24px; align-items: stretch; }
.company-report-card-row > * { min-width: 0; }
@@ -528,6 +551,8 @@ input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgb
.report-controls { width: 100%; }
.split-heading { align-items: flex-start; flex-direction: column; }
.company-report-card-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.monthly-panel-toolbar { align-items: flex-start; }
.monthly-panel-toolbar .history-heading-actions { max-width: calc(100% - 160px); }
}
@media (min-width: 701px) {
@@ -597,11 +622,13 @@ input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgb
.masthead { height: 64px; }
.system-status span { display: none; }
.header-meta { gap: 8px; }
.task-log-trigger { min-height: 36px; padding: 0 10px; }
.locale-switcher select { min-height: 32px; max-width: 78px; padding-left: 7px; padding-right: 20px; font-size: 10px; }
.task-log-dialog { width: calc(100% - 20px); max-height: calc(100dvh - 20px); }
.tabs { height: 50px; gap: 24px; }
.page { padding-top: 26px; padding-bottom: 50px; }
.section-heading { align-items: flex-start; flex-direction: column; }
.bi-heading { width: 100%; align-items: flex-end; flex-direction: row; margin-bottom: 13px; }
#panel-bi { margin-top: -10px; }
.daily-overview { grid-template-columns: 1fr; gap: 14px; margin-bottom: 16px; }
.upload-heading { padding: 20px 20px 0; }
.upload-heading h2 { font-size: 18px; }
@@ -620,7 +647,12 @@ input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgb
.rank-row { grid-template-columns: 105px minmax(80px, 1fr) 75px; gap: 8px; }
.company-chart-grid { padding: 18px; }
.panel-heading { padding-left: 18px; padding-right: 18px; }
.monthly-panel-toolbar { padding-left: 18px; padding-right: 18px; }
.table-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
.table-heading .history-heading-actions { width: 100%; justify-content: space-between; }
.monthly-panel-toolbar { padding-left: 18px; padding-right: 18px; align-items: stretch; flex-direction: column; gap: 10px; }
.monthly-panel-toolbar .history-heading-actions { width: 100%; max-width: none; justify-content: space-between; }
.history-month-control { max-width: 100%; }
.history-month-field { width: min(128px, 34vw); }
.monthly-table { min-width: 760px; }
.company-page-heading { gap: 14px; }
.company-refresh { width: 100%; }
@@ -651,7 +683,7 @@ input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgb
.company-review-pagination > div { justify-content: space-between; }
.company-review-confirm-dialog { width: calc(100% - 20px); }
.company-setup-heading { align-items: center; }
.company-month-field { width: 132px; }
.company-month-field { width: min(180px, 52vw); }
.company-report-card-row { grid-template-columns: 1fr; gap: 14px; padding-top: 16px; padding-bottom: 18px; }
.company-source-card, .company-period-button { min-height: 204px; }
.company-review-panel { margin-left: 18px; margin-right: 18px; }
@@ -690,6 +722,11 @@ input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgb
.trace-live-state { white-space: normal; overflow-wrap: anywhere; }
.trace-log-frame { margin-left: 14px; margin-right: 14px; }
.trace-log { min-height: 360px; padding: 13px; font-size: 10px; }
.history-heading-actions { align-items: flex-start; flex-direction: column; }
.history-month-control { width: 100%; }
.history-month-label { min-width: 48px; }
.history-month-field { min-width: 0; flex: 1 1 auto; width: auto; }
.monthly-panel-toolbar .history-heading-actions { align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {