mirror of
https://github.com/lWolvesl/antigravity-usage-monitor.git
synced 2026-11-26 17:09:28 +08:00
fix(panel): refine context risk warning layout and prevent settings header status overlap
- Collapse locked context controls out of flow so the initial risk notice fits cleanly without extra vertical void or blur bleed, and soften the Modern UI notice and danger-confirm button surfaces - Lock settings panel header titles to flex: 0 0 auto and single-line truncate long status feedback (such as exported JSON paths) with hover tooltips
This commit is contained in:
@@ -27820,8 +27820,7 @@ const SettingsOtherTab = defineComponent({
|
|||||||
text: '',
|
text: '',
|
||||||
});
|
});
|
||||||
const maintStatusText = h('span', {
|
const maintStatusText = h('span', {
|
||||||
className: 'text-muted',
|
className: 'text-muted settings-panel-status',
|
||||||
style: 'font-size: var(--fs-md);',
|
|
||||||
text: '',
|
text: '',
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -27859,10 +27858,12 @@ const SettingsOtherTab = defineComponent({
|
|||||||
maintTimer = null;
|
maintTimer = null;
|
||||||
}
|
}
|
||||||
patchText(maintStatusText, text);
|
patchText(maintStatusText, text);
|
||||||
|
patchAttr(maintStatusText, 'title', text || null);
|
||||||
if (text && autoClearMs > 0) {
|
if (text && autoClearMs > 0) {
|
||||||
maintTimer = setTimeout(() => {
|
maintTimer = setTimeout(() => {
|
||||||
maintTimer = null;
|
maintTimer = null;
|
||||||
patchText(maintStatusText, '');
|
patchText(maintStatusText, '');
|
||||||
|
patchAttr(maintStatusText, 'title', null);
|
||||||
}, autoClearMs);
|
}, autoClearMs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -28041,7 +28042,10 @@ const SettingsOtherTab = defineComponent({
|
|||||||
const ctxModelLabel = h('span', { className: 'form-label' });
|
const ctxModelLabel = h('span', { className: 'form-label' });
|
||||||
const ctxWindowLabel = h('span', { className: 'form-label' });
|
const ctxWindowLabel = h('span', { className: 'form-label' });
|
||||||
const ctxHint = h('span', { className: 'settings-hint-text' });
|
const ctxHint = h('span', { className: 'settings-hint-text' });
|
||||||
const ctxStatus = h('span', { className: 'text-muted', role: 'status' });
|
const ctxStatus = h('span', {
|
||||||
|
className: 'text-muted settings-panel-status',
|
||||||
|
role: 'status',
|
||||||
|
});
|
||||||
const ctxModelSelect = CustomSelect({
|
const ctxModelSelect = CustomSelect({
|
||||||
className: 'settings-context-model',
|
className: 'settings-context-model',
|
||||||
searchable: true,
|
searchable: true,
|
||||||
@@ -28331,7 +28335,7 @@ const SettingsOtherTab = defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const baselinePanel = h('section', { className: 'panel' }, [
|
const baselinePanel = h('section', { className: 'panel' }, [
|
||||||
h('div', { className: 'panel-header' }, [
|
h('div', { className: 'panel-header settings-panel-header' }, [
|
||||||
h('span', { className: 'panel-title' }, [
|
h('span', { className: 'panel-title' }, [
|
||||||
createSvgIcon('layers', { size: 13 }),
|
createSvgIcon('layers', { size: 13 }),
|
||||||
baselineTitleEl,
|
baselineTitleEl,
|
||||||
@@ -28548,7 +28552,7 @@ const SettingsOtherTab = defineComponent({
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
const maintPanel = h('section', { className: 'panel' }, [
|
const maintPanel = h('section', { className: 'panel' }, [
|
||||||
h('div', { className: 'panel-header' }, [
|
h('div', { className: 'panel-header settings-panel-header' }, [
|
||||||
h('span', { className: 'panel-title' }, [
|
h('span', { className: 'panel-title' }, [
|
||||||
createSvgIcon('refresh', { size: 13 }),
|
createSvgIcon('refresh', { size: 13 }),
|
||||||
maintTitleEl,
|
maintTitleEl,
|
||||||
|
|||||||
@@ -4,11 +4,11 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<title>用量监控</title>
|
<title>用量监控</title>
|
||||||
<link rel="stylesheet" href="/styles.css?v=1795451677737">
|
<link rel="stylesheet" href="/styles.css?v=1795452753215">
|
||||||
<script src="/preload.js"></script>
|
<script src="/preload.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app-root"></div>
|
<div id="app-root"></div>
|
||||||
<script src="/app.js?v=1795451677737"></script>
|
<script src="/app.js?v=1795452753215"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -668,6 +668,21 @@ html[data-standalone="true"][data-modern-ui="true"] .app-shell {
|
|||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[data-modern-ui="true"] .ctx-risk-mask {
|
||||||
|
border-radius: var(--radius-sm);
|
||||||
|
background: color-mix(in srgb, var(--metric-warn) 8%, transparent);
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-modern-ui="true"] .btn-danger-confirm {
|
||||||
|
border: none !important;
|
||||||
|
background: color-mix(in srgb, var(--metric-danger) 14%, transparent) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-modern-ui="true"] .btn-danger-confirm:hover:not(:disabled) {
|
||||||
|
border: none !important;
|
||||||
|
background: color-mix(in srgb, var(--metric-danger) 22%, transparent) !important;
|
||||||
|
}
|
||||||
|
|
||||||
[data-modern-ui="true"] .number-input,
|
[data-modern-ui="true"] .number-input,
|
||||||
[data-modern-ui="true"] .dt-trigger,
|
[data-modern-ui="true"] .dt-trigger,
|
||||||
[data-modern-ui="true"] .dt-mini-step,
|
[data-modern-ui="true"] .dt-mini-step,
|
||||||
|
|||||||
@@ -733,8 +733,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.ctx-controls-body.is-locked {
|
.ctx-controls-body.is-locked {
|
||||||
filter: blur(4px);
|
height: 0;
|
||||||
opacity: 0.24;
|
overflow: hidden;
|
||||||
|
opacity: 0;
|
||||||
|
visibility: hidden;
|
||||||
|
filter: none;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
@@ -753,12 +756,12 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
justify-content: center;
|
justify-content: flex-start;
|
||||||
gap: var(--space-2);
|
gap: 8px;
|
||||||
padding: var(--space-3) var(--space-4);
|
padding: var(--space-3) var(--space-4);
|
||||||
border-radius: var(--radius-xs);
|
border-radius: var(--radius-sm);
|
||||||
border: 1px solid color-mix(in srgb, var(--metric-warn) 42%, var(--border-hairline));
|
border: 1px solid color-mix(in srgb, var(--metric-warn) 36%, var(--border-hairline));
|
||||||
background: color-mix(in srgb, var(--surface-panel) 88%, var(--metric-warn) 7%);
|
background: color-mix(in srgb, var(--surface-panel) 93%, var(--metric-warn) 7%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.ctx-risk-mask[hidden] {
|
.ctx-risk-mask[hidden] {
|
||||||
@@ -786,14 +789,29 @@
|
|||||||
.ctx-risk-desc {
|
.ctx-risk-desc {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: var(--fs-sm);
|
font-size: var(--fs-sm);
|
||||||
line-height: 1.5;
|
line-height: 1.55;
|
||||||
color: var(--text-primary);
|
color: var(--text-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.ctx-risk-accept-btn {
|
.ctx-risk-accept-btn {
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
min-height: calc(26px * var(--ui-font-scale, 1));
|
min-height: calc(28px * var(--ui-font-scale, 1));
|
||||||
padding: 2px var(--space-3);
|
padding: 4px var(--space-3);
|
||||||
|
font-size: var(--fs-md);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 设置页卡片头部右侧状态提示(长路径自动单行省略,防止把左侧标题挤成 0px 造成文字重叠) */
|
||||||
|
.settings-panel-header > .panel-title {
|
||||||
|
flex: 0 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-panel-status {
|
||||||
|
flex: 1 1 auto;
|
||||||
|
min-width: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-align: right;
|
||||||
font-size: var(--fs-md);
|
font-size: var(--fs-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -100,8 +100,7 @@ export const SettingsOtherTab = defineComponent({
|
|||||||
text: '',
|
text: '',
|
||||||
});
|
});
|
||||||
const maintStatusText = h('span', {
|
const maintStatusText = h('span', {
|
||||||
className: 'text-muted',
|
className: 'text-muted settings-panel-status',
|
||||||
style: 'font-size: var(--fs-md);',
|
|
||||||
text: '',
|
text: '',
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -139,10 +138,12 @@ export const SettingsOtherTab = defineComponent({
|
|||||||
maintTimer = null;
|
maintTimer = null;
|
||||||
}
|
}
|
||||||
patchText(maintStatusText, text);
|
patchText(maintStatusText, text);
|
||||||
|
patchAttr(maintStatusText, 'title', text || null);
|
||||||
if (text && autoClearMs > 0) {
|
if (text && autoClearMs > 0) {
|
||||||
maintTimer = setTimeout(() => {
|
maintTimer = setTimeout(() => {
|
||||||
maintTimer = null;
|
maintTimer = null;
|
||||||
patchText(maintStatusText, '');
|
patchText(maintStatusText, '');
|
||||||
|
patchAttr(maintStatusText, 'title', null);
|
||||||
}, autoClearMs);
|
}, autoClearMs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -321,7 +322,10 @@ export const SettingsOtherTab = defineComponent({
|
|||||||
const ctxModelLabel = h('span', { className: 'form-label' });
|
const ctxModelLabel = h('span', { className: 'form-label' });
|
||||||
const ctxWindowLabel = h('span', { className: 'form-label' });
|
const ctxWindowLabel = h('span', { className: 'form-label' });
|
||||||
const ctxHint = h('span', { className: 'settings-hint-text' });
|
const ctxHint = h('span', { className: 'settings-hint-text' });
|
||||||
const ctxStatus = h('span', { className: 'text-muted', role: 'status' });
|
const ctxStatus = h('span', {
|
||||||
|
className: 'text-muted settings-panel-status',
|
||||||
|
role: 'status',
|
||||||
|
});
|
||||||
const ctxModelSelect = CustomSelect({
|
const ctxModelSelect = CustomSelect({
|
||||||
className: 'settings-context-model',
|
className: 'settings-context-model',
|
||||||
searchable: true,
|
searchable: true,
|
||||||
@@ -611,7 +615,7 @@ export const SettingsOtherTab = defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const baselinePanel = h('section', { className: 'panel' }, [
|
const baselinePanel = h('section', { className: 'panel' }, [
|
||||||
h('div', { className: 'panel-header' }, [
|
h('div', { className: 'panel-header settings-panel-header' }, [
|
||||||
h('span', { className: 'panel-title' }, [
|
h('span', { className: 'panel-title' }, [
|
||||||
createSvgIcon('layers', { size: 13 }),
|
createSvgIcon('layers', { size: 13 }),
|
||||||
baselineTitleEl,
|
baselineTitleEl,
|
||||||
@@ -828,7 +832,7 @@ export const SettingsOtherTab = defineComponent({
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
const maintPanel = h('section', { className: 'panel' }, [
|
const maintPanel = h('section', { className: 'panel' }, [
|
||||||
h('div', { className: 'panel-header' }, [
|
h('div', { className: 'panel-header settings-panel-header' }, [
|
||||||
h('span', { className: 'panel-title' }, [
|
h('span', { className: 'panel-title' }, [
|
||||||
createSvgIcon('refresh', { size: 13 }),
|
createSvgIcon('refresh', { size: 13 }),
|
||||||
maintTitleEl,
|
maintTitleEl,
|
||||||
|
|||||||
+44
-11
@@ -6191,8 +6191,11 @@ html[data-standalone="true"] .app-shell {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.ctx-controls-body.is-locked {
|
.ctx-controls-body.is-locked {
|
||||||
filter: blur(4px);
|
height: 0;
|
||||||
opacity: 0.24;
|
overflow: hidden;
|
||||||
|
opacity: 0;
|
||||||
|
visibility: hidden;
|
||||||
|
filter: none;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
@@ -6211,12 +6214,12 @@ html[data-standalone="true"] .app-shell {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
justify-content: center;
|
justify-content: flex-start;
|
||||||
gap: var(--space-2);
|
gap: 8px;
|
||||||
padding: var(--space-3) var(--space-4);
|
padding: var(--space-3) var(--space-4);
|
||||||
border-radius: var(--radius-xs);
|
border-radius: var(--radius-sm);
|
||||||
border: 1px solid color-mix(in srgb, var(--metric-warn) 42%, var(--border-hairline));
|
border: 1px solid color-mix(in srgb, var(--metric-warn) 36%, var(--border-hairline));
|
||||||
background: color-mix(in srgb, var(--surface-panel) 88%, var(--metric-warn) 7%);
|
background: color-mix(in srgb, var(--surface-panel) 93%, var(--metric-warn) 7%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.ctx-risk-mask[hidden] {
|
.ctx-risk-mask[hidden] {
|
||||||
@@ -6244,14 +6247,29 @@ html[data-standalone="true"] .app-shell {
|
|||||||
.ctx-risk-desc {
|
.ctx-risk-desc {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: var(--fs-sm);
|
font-size: var(--fs-sm);
|
||||||
line-height: 1.5;
|
line-height: 1.55;
|
||||||
color: var(--text-primary);
|
color: var(--text-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.ctx-risk-accept-btn {
|
.ctx-risk-accept-btn {
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
min-height: calc(26px * var(--ui-font-scale, 1));
|
min-height: calc(28px * var(--ui-font-scale, 1));
|
||||||
padding: 2px var(--space-3);
|
padding: 4px var(--space-3);
|
||||||
|
font-size: var(--fs-md);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 设置页卡片头部右侧状态提示(长路径自动单行省略,防止把左侧标题挤成 0px 造成文字重叠) */
|
||||||
|
.settings-panel-header > .panel-title {
|
||||||
|
flex: 0 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-panel-status {
|
||||||
|
flex: 1 1 auto;
|
||||||
|
min-width: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-align: right;
|
||||||
font-size: var(--fs-md);
|
font-size: var(--fs-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8457,6 +8475,21 @@ html[data-standalone="true"][data-modern-ui="true"] .app-shell {
|
|||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[data-modern-ui="true"] .ctx-risk-mask {
|
||||||
|
border-radius: var(--radius-sm);
|
||||||
|
background: color-mix(in srgb, var(--metric-warn) 8%, transparent);
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-modern-ui="true"] .btn-danger-confirm {
|
||||||
|
border: none !important;
|
||||||
|
background: color-mix(in srgb, var(--metric-danger) 14%, transparent) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-modern-ui="true"] .btn-danger-confirm:hover:not(:disabled) {
|
||||||
|
border: none !important;
|
||||||
|
background: color-mix(in srgb, var(--metric-danger) 22%, transparent) !important;
|
||||||
|
}
|
||||||
|
|
||||||
[data-modern-ui="true"] .number-input,
|
[data-modern-ui="true"] .number-input,
|
||||||
[data-modern-ui="true"] .dt-trigger,
|
[data-modern-ui="true"] .dt-trigger,
|
||||||
[data-modern-ui="true"] .dt-mini-step,
|
[data-modern-ui="true"] .dt-mini-step,
|
||||||
|
|||||||
Reference in New Issue
Block a user