mirror of
https://github.com/lWolvesl/antigravity-usage-monitor.git
synced 2026-11-26 17:09:28 +08:00
feat(panel): add formula-safe CSV/Markdown export, compact vertical action menus, and local file export with reveal toast
This commit is contained in:
@@ -1466,6 +1466,215 @@ html[data-standalone="true"] .app-shell {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/* --- 紧凑竖向三点操作菜单 (ActionMenu) --- */
|
||||
.action-menu {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.action-menu[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.action-menu-trigger {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
padding: 0;
|
||||
border: 1px solid transparent;
|
||||
border-radius: var(--radius-xs);
|
||||
background: transparent;
|
||||
color: var(--text-muted);
|
||||
cursor: pointer;
|
||||
transition:
|
||||
background-color var(--dur-instant) var(--ease-fast),
|
||||
color var(--dur-instant) var(--ease-fast),
|
||||
border-color var(--dur-instant) var(--ease-fast);
|
||||
}
|
||||
|
||||
.action-menu-trigger:hover,
|
||||
.action-menu.is-open .action-menu-trigger {
|
||||
background: var(--surface-hover);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.action-menu-popover {
|
||||
position: absolute;
|
||||
top: calc(100% + 4px);
|
||||
z-index: 45;
|
||||
min-width: 152px;
|
||||
padding: 4px;
|
||||
border-radius: var(--radius-sm);
|
||||
border: 1px solid var(--border-hairline);
|
||||
background: var(--surface-panel);
|
||||
box-shadow: var(--shadow-popover);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.action-menu-popover.align-right {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.action-menu-popover.align-left {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.action-menu-popover[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.action-menu-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 7px;
|
||||
width: 100%;
|
||||
padding: 6px 9px;
|
||||
border: none;
|
||||
border-radius: var(--radius-xs);
|
||||
background: transparent;
|
||||
color: var(--text-primary);
|
||||
font-family: var(--font-sans);
|
||||
font-size: var(--fs-sm);
|
||||
line-height: 1.25;
|
||||
text-align: left;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
transition:
|
||||
background-color var(--dur-instant) var(--ease-fast),
|
||||
color var(--dur-instant) var(--ease-fast);
|
||||
}
|
||||
|
||||
.action-menu-item:hover:not(:disabled) {
|
||||
background: var(--surface-hover);
|
||||
}
|
||||
|
||||
.action-menu-item:disabled {
|
||||
opacity: 0.45;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.action-menu-item-label {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
/* --- 全局底部轻量导出 / 复制提示条 (App Toast) --- */
|
||||
.app-toast {
|
||||
position: absolute;
|
||||
left: 12px;
|
||||
right: 12px;
|
||||
bottom: 12px;
|
||||
z-index: 60;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 10px;
|
||||
border-radius: var(--radius-sm);
|
||||
border: 1px solid var(--border-hairline);
|
||||
background: var(--surface-panel);
|
||||
box-shadow: var(--shadow-popover);
|
||||
color: var(--text-primary);
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.app-toast[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.app-toast-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.app-toast-msg {
|
||||
font-size: var(--fs-sm);
|
||||
font-weight: 600;
|
||||
line-height: 1.25;
|
||||
color: var(--text-primary);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.app-toast.tone-ok .app-toast-msg {
|
||||
color: var(--metric-ok);
|
||||
}
|
||||
|
||||
.app-toast.tone-warn .app-toast-msg {
|
||||
color: var(--metric-warn);
|
||||
}
|
||||
|
||||
.app-toast-detail {
|
||||
font-size: var(--fs-xs);
|
||||
line-height: 1.25;
|
||||
color: var(--text-muted);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.app-toast-detail[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.app-toast-action {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
flex-shrink: 0;
|
||||
height: 24px;
|
||||
padding: 0 9px;
|
||||
border: 1px solid var(--border-hairline);
|
||||
border-radius: var(--radius-xs);
|
||||
background: var(--accent-primary-soft);
|
||||
color: var(--accent-primary);
|
||||
font-family: var(--font-sans);
|
||||
font-size: var(--fs-xs);
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
transition: background-color var(--dur-instant) var(--ease-fast);
|
||||
}
|
||||
|
||||
.app-toast-action:hover {
|
||||
background: color-mix(in srgb, var(--accent-primary) 22%, transparent);
|
||||
}
|
||||
|
||||
.app-toast-action[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.app-toast-close {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
padding: 0;
|
||||
border: none;
|
||||
border-radius: var(--radius-xs);
|
||||
background: transparent;
|
||||
color: var(--text-muted);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.app-toast-close:hover {
|
||||
background: var(--surface-hover);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
/* --- src/styles/views-overview.css --- */
|
||||
/*
|
||||
* 实时概览视图与通用面板卡片样式表 (views-overview.css).
|
||||
@@ -2229,6 +2438,14 @@ html[data-standalone="true"] .app-shell {
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.cons-overview-controls {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
margin-left: auto;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.cons-overview-head .segmented {
|
||||
gap: 1px;
|
||||
}
|
||||
@@ -8310,6 +8527,8 @@ html[data-standalone="true"][data-modern-ui="true"] .app-shell {
|
||||
|
||||
/* --- 7. 全景悬浮窗与工具提示浮层:零边框 + 空气阴影 + 0.15s 平滑跟随过渡 --- */
|
||||
[data-modern-ui="true"] .select-menu,
|
||||
[data-modern-ui="true"] .action-menu-popover,
|
||||
[data-modern-ui="true"] .app-toast,
|
||||
[data-modern-ui="true"] .dt-popover,
|
||||
[data-modern-ui="true"] .sstep-tooltip {
|
||||
border: none;
|
||||
@@ -8318,6 +8537,16 @@ html[data-standalone="true"][data-modern-ui="true"] .app-shell {
|
||||
animation: anim-modern-tip-fade 120ms var(--ease-modern);
|
||||
}
|
||||
|
||||
[data-modern-ui="true"] .action-menu-trigger:hover,
|
||||
[data-modern-ui="true"] .action-menu.is-open .action-menu-trigger,
|
||||
[data-modern-ui="true"] .action-menu-item:hover:not(:disabled) {
|
||||
background: var(--modern-surface-hover);
|
||||
}
|
||||
|
||||
[data-modern-ui="true"] .app-toast-action {
|
||||
border: none;
|
||||
}
|
||||
|
||||
[data-modern-ui="true"] .select-search-wrap {
|
||||
border: none;
|
||||
background: var(--modern-surface-subtle);
|
||||
|
||||
Reference in New Issue
Block a user