mirror of
https://github.com/lWolvesl/antigravity-usage-monitor.git
synced 2026-11-26 17:09:28 +08:00
feat(panel): upgrade consumption rankings, pointer-following breakdown popovers, full session search, sortable steps, and settings backup
This commit is contained in:
+467
-27
@@ -277,6 +277,10 @@ input[type="number"]::-webkit-outer-spin-button {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.app-shell:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
html[data-standalone="true"] .app-shell {
|
||||
max-width: 960px;
|
||||
margin: 0 auto;
|
||||
@@ -759,6 +763,100 @@ html[data-standalone="true"] .app-shell {
|
||||
animation: anim-popover-in var(--dur-instant) var(--ease-fast);
|
||||
}
|
||||
|
||||
.select-menu.has-search {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-height: 268px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.select-search-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
padding: 4px 7px;
|
||||
margin-bottom: 4px;
|
||||
border-radius: var(--radius-xs);
|
||||
border: 1px solid var(--border-hairline);
|
||||
background: var(--surface-bg);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.select-search-wrap[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.select-search-wrap:focus-within {
|
||||
border-color: var(--accent-primary);
|
||||
}
|
||||
|
||||
.select-search-icon {
|
||||
color: var(--text-muted);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.select-search-input {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: var(--text-primary);
|
||||
font-family: var(--font-sans);
|
||||
font-size: var(--fs-md);
|
||||
line-height: 1.3;
|
||||
outline: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.select-search-input::placeholder {
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.select-search-clear {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
padding: 0;
|
||||
border: none;
|
||||
border-radius: var(--radius-pill);
|
||||
background: transparent;
|
||||
color: var(--text-muted);
|
||||
cursor: pointer;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.select-search-clear:hover {
|
||||
color: var(--text-primary);
|
||||
background: var(--surface-hover);
|
||||
}
|
||||
|
||||
.select-search-clear[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.select-options-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.select-menu.has-search .select-options-list {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.select-empty {
|
||||
padding: 12px 8px;
|
||||
text-align: center;
|
||||
font-size: var(--fs-md);
|
||||
}
|
||||
|
||||
.select-empty[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.select-option {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -2375,6 +2473,44 @@ html[data-standalone="true"] .app-shell {
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
.cons-seg-bar[hidden],
|
||||
.cons-item-foot[hidden],
|
||||
.cons-share-pill[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.cons-metric-fill.tone-cost {
|
||||
background-color: var(--accent-primary);
|
||||
}
|
||||
|
||||
.cons-metric-fill.tone-speed {
|
||||
background-color: var(--metric-ok);
|
||||
}
|
||||
|
||||
.cons-metric-fill.tone-calls {
|
||||
background-color: var(--ctx-cached);
|
||||
}
|
||||
|
||||
.cons-model-focus-foot {
|
||||
justify-content: space-between;
|
||||
font-size: var(--fs-sm);
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.cons-model-focus-left {
|
||||
color: var(--text-muted);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.cons-model-focus-right {
|
||||
color: var(--text-secondary);
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
/* --- 4. 历史趋势交互式 SVG 平滑曲线图 (Interactive Historical Trend SVG Chart) --- */
|
||||
.trend-chart-wrap {
|
||||
position: relative;
|
||||
@@ -2391,6 +2527,10 @@ html[data-standalone="true"] .app-shell {
|
||||
cursor: crosshair;
|
||||
}
|
||||
|
||||
.trend-plot-stage.is-clickable {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.trend-svg {
|
||||
width: 100%;
|
||||
height: 184px;
|
||||
@@ -2806,6 +2946,29 @@ html[data-standalone="true"] .app-shell {
|
||||
}
|
||||
|
||||
/* --- 5. 模型与数据来源明细行容器 (Popular Models & Sources Item Rows) --- */
|
||||
.cons-ranking-head {
|
||||
flex-wrap: wrap;
|
||||
row-gap: 6px;
|
||||
}
|
||||
|
||||
.cons-ranking-sort-wrap {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.cons-ranking-sort-wrap .segmented[hidden],
|
||||
.cons-item-list[hidden],
|
||||
.cons-ranking-empty[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.cons-ranking-empty {
|
||||
padding: var(--space-4) 0;
|
||||
text-align: center;
|
||||
font-size: var(--fs-md);
|
||||
}
|
||||
|
||||
.cons-item-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -2818,6 +2981,37 @@ html[data-standalone="true"] .app-shell {
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.cons-top-conv-row {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 5px;
|
||||
width: 100%;
|
||||
container-type: inline-size;
|
||||
background: transparent;
|
||||
border-radius: var(--radius-xs);
|
||||
transition: opacity var(--dur-instant) var(--ease-fast);
|
||||
}
|
||||
|
||||
.cons-top-conv-row.is-jumpable {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.cons-top-conv-row.is-jumpable:hover .cons-top-conv-title {
|
||||
color: var(--accent-primary);
|
||||
}
|
||||
|
||||
.cons-top-conv-meta {
|
||||
font-size: var(--fs-md);
|
||||
color: var(--text-secondary);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.cons-top-conv-meta[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.cons-item-foot {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -2831,6 +3025,33 @@ html[data-standalone="true"] .app-shell {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.cons-model-perf-foot {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
font-size: var(--fs-sm);
|
||||
line-height: 1.3;
|
||||
color: var(--text-muted);
|
||||
margin-top: -1px;
|
||||
}
|
||||
|
||||
.cons-model-perf-foot[hidden],
|
||||
.cons-model-unit-cost[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.cons-model-perf-main {
|
||||
color: var(--text-muted);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cons-model-unit-cost {
|
||||
color: var(--text-secondary);
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.cons-view-stage {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
@@ -2963,7 +3184,7 @@ html[data-standalone="true"] .app-shell {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* --- 共享模型构成悬浮详情卡 (Client Sources & Monthly Breakdown Popover) --- */
|
||||
/* --- 共享模型构成悬浮详情卡 (Trend Heatmap / Client Sources / Sessions / Monthly Popover) --- */
|
||||
.cons-breakdown-popover {
|
||||
position: absolute;
|
||||
left: var(--pop-x, 8px);
|
||||
@@ -2983,44 +3204,126 @@ html[data-standalone="true"] .app-shell {
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.trend-tooltip.is-rich-breakdown {
|
||||
top: 0;
|
||||
bottom: auto;
|
||||
left: var(--tip-x, 0px);
|
||||
transform: translate3d(var(--tip-shift, 0px), var(--tip-y, 0px), 0);
|
||||
}
|
||||
|
||||
.trend-tooltip.is-rich-breakdown,
|
||||
.cons-breakdown-popover.is-rich-breakdown {
|
||||
min-width: 212px;
|
||||
max-width: min(276px, calc(100% - 10px));
|
||||
padding: 7px 9px;
|
||||
gap: 5px;
|
||||
}
|
||||
|
||||
.is-rich-breakdown .cons-tip-head {
|
||||
padding-bottom: 0;
|
||||
border-bottom: none;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.is-rich-breakdown .trend-tip-time {
|
||||
font-size: var(--fs-2xs);
|
||||
font-weight: 500;
|
||||
color: var(--text-secondary);
|
||||
min-width: 0;
|
||||
flex-shrink: 1;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.is-rich-breakdown .trend-tip-calls {
|
||||
font-size: var(--fs-2xs);
|
||||
color: var(--text-muted);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.is-rich-breakdown .cons-tip-main {
|
||||
align-items: baseline;
|
||||
margin-top: -2px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.is-rich-breakdown .cons-tip-hero {
|
||||
display: inline-flex;
|
||||
align-items: baseline;
|
||||
gap: 3px;
|
||||
color: var(--text-primary);
|
||||
line-height: 1.15;
|
||||
}
|
||||
|
||||
.cons-tip-hero-num {
|
||||
font-size: var(--fs-lg);
|
||||
font-weight: 700;
|
||||
letter-spacing: -0.02em;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.cons-tip-hero-unit {
|
||||
font-size: var(--fs-2xs);
|
||||
font-weight: 500;
|
||||
letter-spacing: 0.03em;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.is-rich-breakdown .trend-tip-cost {
|
||||
font-size: var(--fs-sm);
|
||||
font-weight: 600;
|
||||
color: var(--accent-primary);
|
||||
}
|
||||
|
||||
.cons-pop-models {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
border-top: 1px solid color-mix(in srgb, var(--border-hairline) 75%, transparent);
|
||||
padding-top: 6px;
|
||||
margin-top: 1px;
|
||||
gap: 5px;
|
||||
border-top: none;
|
||||
padding-top: 2px;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.cons-pop-models[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.trend-tip-sub:not([hidden]) + .cons-pop-models {
|
||||
border-top: none;
|
||||
padding-top: 2px;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.cons-pop-model-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 10px;
|
||||
flex-direction: column;
|
||||
gap: 3px;
|
||||
font-size: var(--fs-xs);
|
||||
line-height: 1.3;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.cons-pop-model-head {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.cons-pop-model-left {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
gap: 5px;
|
||||
min-width: 0;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.cons-pop-model-left .cons-model-dot {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
.cons-pop-model-left .cons-model-dot[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.cons-pop-model-name {
|
||||
max-width: 156px;
|
||||
max-width: 128px;
|
||||
font-size: var(--fs-xs);
|
||||
font-weight: 500;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
@@ -3034,21 +3337,74 @@ html[data-standalone="true"] .app-shell {
|
||||
.cons-pop-model-right {
|
||||
display: inline-flex;
|
||||
align-items: baseline;
|
||||
gap: 8px;
|
||||
gap: 6px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.cons-pop-model-tok {
|
||||
font-size: var(--fs-xs);
|
||||
color: var(--text-muted);
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.cons-pop-model-pct {
|
||||
min-width: 38px;
|
||||
min-width: 34px;
|
||||
text-align: right;
|
||||
font-size: var(--fs-xs);
|
||||
font-size: var(--fs-2xs);
|
||||
font-weight: 500;
|
||||
color: var(--text-secondary);
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.cons-pop-model-row .cons-seg-bar {
|
||||
height: 3px;
|
||||
border-radius: var(--radius-pill);
|
||||
}
|
||||
|
||||
.cons-pop-channels {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
gap: 4px;
|
||||
border-top: 1px solid color-mix(in srgb, var(--border-hairline) 65%, transparent);
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
.cons-pop-channels[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.cons-pop-chan {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.cons-pop-chan-head {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 3px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.cons-pop-chan-head .dot-swatch {
|
||||
width: 4px;
|
||||
height: 4px;
|
||||
}
|
||||
|
||||
.cons-pop-chan-label {
|
||||
font-size: var(--fs-2xs);
|
||||
font-weight: 500;
|
||||
line-height: 1.15;
|
||||
color: var(--text-muted);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cons-pop-chan-val {
|
||||
font-size: var(--fs-xs);
|
||||
font-weight: 600;
|
||||
line-height: 1.2;
|
||||
color: var(--text-primary);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* --- 6. 12 个月垂直堆叠柱状图 (12-Month Stacked Bar Chart) --- */
|
||||
@@ -3227,6 +3583,40 @@ html[data-standalone="true"] .app-shell {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.data-table th.is-sortable {
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
transition: color var(--dur-instant) var(--ease-fast);
|
||||
}
|
||||
|
||||
.data-table th.is-sortable:hover {
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.data-table th.is-sorted {
|
||||
color: var(--accent-primary);
|
||||
}
|
||||
|
||||
.step-th-inner {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.data-table th:last-child .step-th-inner {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.step-sort-icon {
|
||||
flex-shrink: 0;
|
||||
color: var(--accent-primary);
|
||||
}
|
||||
|
||||
.step-sort-icon[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.data-table tbody tr:not(.step-vspacer):not(.step-vsizer):hover {
|
||||
background: var(--surface-hover);
|
||||
}
|
||||
@@ -4231,13 +4621,13 @@ html[data-standalone="true"] .app-shell {
|
||||
}
|
||||
|
||||
.smodel-seg-bar {
|
||||
height: 3.5px;
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
.smodel-foot {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
justify-content: flex-start;
|
||||
flex-wrap: wrap;
|
||||
gap: 4px 10px;
|
||||
font-size: var(--fs-md);
|
||||
@@ -4257,11 +4647,34 @@ html[data-standalone="true"] .app-shell {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.smodel-perf-foot {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
font-size: var(--fs-sm);
|
||||
line-height: 1.3;
|
||||
color: var(--text-muted);
|
||||
margin-top: -1px;
|
||||
}
|
||||
|
||||
.smodel-perf {
|
||||
margin-left: auto;
|
||||
font-size: var(--fs-sm);
|
||||
color: var(--text-muted);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.smodel-unit-cost {
|
||||
font-size: var(--fs-sm);
|
||||
color: var(--text-secondary);
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.smodel-unit-cost[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* --- src/styles/views-settings.css --- */
|
||||
@@ -5251,6 +5664,18 @@ html[data-standalone="true"] .app-shell {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.settings-backup-actions {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--space-2);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.settings-hidden-file-input {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* --- src/styles/overlay.css --- */
|
||||
/*
|
||||
* 双栖模式顶栏胶囊与悬浮面板样式表 (overlay.css).
|
||||
@@ -6546,8 +6971,8 @@ html[data-standalone="true"][data-modern-ui="true"] .app-shell {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
[data-modern-ui="true"] .cons-pop-models {
|
||||
border-top-color: var(--modern-surface-hover);
|
||||
[data-modern-ui="true"] .cons-pop-channels {
|
||||
border-top-color: color-mix(in srgb, var(--text-primary) 8%, transparent);
|
||||
}
|
||||
|
||||
[data-modern-ui="true"] .cons-source-bar-hit:hover .cons-source-model-bar,
|
||||
@@ -6778,6 +7203,15 @@ html[data-standalone="true"][data-modern-ui="true"] .app-shell {
|
||||
animation: anim-modern-tip-fade 120ms var(--ease-modern);
|
||||
}
|
||||
|
||||
[data-modern-ui="true"] .select-search-wrap {
|
||||
border: none;
|
||||
background: var(--modern-surface-subtle);
|
||||
}
|
||||
|
||||
[data-modern-ui="true"] .select-search-wrap:focus-within {
|
||||
box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--accent-primary) 50%, transparent);
|
||||
}
|
||||
|
||||
[data-modern-ui="true"] .select-menu.is-above,
|
||||
[data-modern-ui="true"] .dt-popover.is-above {
|
||||
transform-origin: bottom right;
|
||||
@@ -6804,6 +7238,12 @@ html[data-standalone="true"][data-modern-ui="true"] .app-shell {
|
||||
transform: translate3d(var(--tip-shift, -50%), var(--tip-y, 0px), 0);
|
||||
}
|
||||
|
||||
[data-modern-ui="true"] .trend-tooltip.is-rich-breakdown {
|
||||
top: 0;
|
||||
bottom: auto;
|
||||
transform: translate3d(var(--tip-shift, 0px), var(--tip-y, 0px), 0);
|
||||
}
|
||||
|
||||
[data-modern-ui="true"] .trend-tooltip.is-tracking {
|
||||
transition:
|
||||
left 150ms var(--ease-modern),
|
||||
|
||||
Reference in New Issue
Block a user