mirror of
https://github.com/lWolvesl/antigravity-usage-monitor.git
synced 2026-11-26 17:09:28 +08:00
feat(panel): restore IDE mount compatibility, add composer dock mode, and refine chart tooltips
This commit is contained in:
@@ -238,7 +238,7 @@
|
||||
|
||||
.trend-svg {
|
||||
width: 100%;
|
||||
height: 118px;
|
||||
height: 120px;
|
||||
display: block;
|
||||
overflow: visible;
|
||||
}
|
||||
@@ -304,9 +304,10 @@
|
||||
top: 0;
|
||||
left: var(--tip-x, 50%);
|
||||
transform: translateX(var(--tip-shift, -50%));
|
||||
min-width: 148px;
|
||||
max-width: 240px;
|
||||
padding: 5px 8px;
|
||||
width: max-content;
|
||||
min-width: 152px;
|
||||
max-width: min(300px, calc(100% - 8px));
|
||||
padding: 5px 9px;
|
||||
background: var(--surface-panel);
|
||||
border: 1px solid var(--border-strong);
|
||||
border-radius: var(--radius-sm);
|
||||
@@ -322,7 +323,7 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
gap: 10px;
|
||||
font-size: 10.5px;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
@@ -331,42 +332,62 @@
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.trend-tip-calls {
|
||||
font-size: 10px;
|
||||
color: var(--text-muted);
|
||||
white-space: nowrap;
|
||||
max-width: 190px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.trend-tip-main {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.trend-tip-tokens {
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
color: var(--accent-primary);
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.trend-tip-cost {
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.trend-tip-sub {
|
||||
font-size: 10px;
|
||||
color: var(--text-secondary);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
border-top: 1px solid var(--border-hairline);
|
||||
padding-top: 2px;
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.trend-tooltip.is-hm-top {
|
||||
top: 0;
|
||||
bottom: auto;
|
||||
}
|
||||
|
||||
.trend-tooltip.is-hm-bottom {
|
||||
top: auto;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.trend-x-axis {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
@@ -401,6 +422,177 @@
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* --- 4b. 类 GitHub 每日小格子热力图 (> 90 天自动启用,一格一天) --- */
|
||||
.trend-heatmap-stage {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
padding-top: 2px;
|
||||
width: 100%;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.trend-heatmap-body {
|
||||
--hm-weeks: 26;
|
||||
--hm-gap: 2px;
|
||||
--hm-cell: 9px;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 4px;
|
||||
width: 100%;
|
||||
container-type: inline-size;
|
||||
}
|
||||
|
||||
@supports (width: 1cqi) {
|
||||
.trend-heatmap-body {
|
||||
--hm-cell: clamp(
|
||||
6.5px,
|
||||
calc((100cqi - 18px - (var(--hm-weeks) - 1) * var(--hm-gap)) / var(--hm-weeks)),
|
||||
18px
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
.trend-hm-weekdays {
|
||||
display: grid;
|
||||
grid-template-rows: 15px repeat(7, var(--hm-cell));
|
||||
row-gap: var(--hm-gap);
|
||||
width: 14px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.trend-hm-month-spacer {
|
||||
height: 15px;
|
||||
}
|
||||
|
||||
.trend-hm-wday {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
font-size: 9px;
|
||||
line-height: 1;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.trend-hm-scroll {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.trend-hm-track {
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
gap: var(--hm-gap);
|
||||
min-width: max-content;
|
||||
}
|
||||
|
||||
.trend-hm-months {
|
||||
position: relative;
|
||||
height: 15px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.trend-hm-month {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: calc(var(--hm-col, 0) * (var(--hm-cell) + var(--hm-gap)));
|
||||
font-size: 9.5px;
|
||||
line-height: 14px;
|
||||
color: var(--text-muted);
|
||||
white-space: nowrap;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.trend-hm-grid {
|
||||
display: grid;
|
||||
grid-template-rows: repeat(7, var(--hm-cell));
|
||||
grid-auto-flow: column;
|
||||
grid-auto-columns: var(--hm-cell);
|
||||
gap: var(--hm-gap);
|
||||
}
|
||||
|
||||
.trend-hm-cell {
|
||||
width: var(--hm-cell);
|
||||
height: var(--hm-cell);
|
||||
border-radius: 2px;
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
transition: transform var(--dur-instant) var(--ease-fast);
|
||||
}
|
||||
|
||||
.trend-hm-cell.is-pad {
|
||||
visibility: hidden;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.trend-hm-cell.lv-0,
|
||||
.trend-hm-swatch.lv-0 {
|
||||
background: color-mix(in srgb, var(--text-primary) 6.5%, var(--surface-panel));
|
||||
border: 1px solid color-mix(in srgb, var(--border-hairline) 55%, transparent);
|
||||
}
|
||||
|
||||
.trend-hm-cell.lv-1,
|
||||
.trend-hm-swatch.lv-1 {
|
||||
background: color-mix(in srgb, var(--ctx-cached) 24%, var(--surface-panel));
|
||||
}
|
||||
|
||||
.trend-hm-cell.lv-2,
|
||||
.trend-hm-swatch.lv-2 {
|
||||
background: color-mix(in srgb, var(--ctx-cached) 46%, var(--surface-panel));
|
||||
}
|
||||
|
||||
.trend-hm-cell.lv-3,
|
||||
.trend-hm-swatch.lv-3 {
|
||||
background: color-mix(in srgb, var(--ctx-cached) 70%, var(--surface-panel));
|
||||
}
|
||||
|
||||
.trend-hm-cell.lv-4,
|
||||
.trend-hm-swatch.lv-4 {
|
||||
background: color-mix(in srgb, var(--ctx-cached) 94%, var(--surface-panel));
|
||||
}
|
||||
|
||||
.trend-hm-cell.is-hovered {
|
||||
outline: 1.5px solid var(--text-primary);
|
||||
outline-offset: 0.5px;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.trend-hm-footer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
font-size: 10px;
|
||||
color: var(--text-muted);
|
||||
min-height: 16px;
|
||||
}
|
||||
|
||||
.trend-hm-summary {
|
||||
color: var(--text-secondary);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.trend-hm-legend {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 3px;
|
||||
flex-shrink: 0;
|
||||
font-size: 9.5px;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.trend-hm-swatch {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 2px;
|
||||
display: inline-block;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* --- 5. 模型与数据来源明细行容器 (Popular Models & Sources Item Rows) --- */
|
||||
.cons-item-list {
|
||||
display: flex;
|
||||
@@ -423,6 +615,10 @@
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.cons-item-foot > .legend-left:last-child {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.cons-item-foot strong {
|
||||
color: var(--text-primary);
|
||||
font-weight: 600;
|
||||
|
||||
Reference in New Issue
Block a user