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:
@@ -668,6 +668,21 @@ html[data-standalone="true"][data-modern-ui="true"] .app-shell {
|
||||
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"] .dt-trigger,
|
||||
[data-modern-ui="true"] .dt-mini-step,
|
||||
|
||||
@@ -733,8 +733,11 @@
|
||||
}
|
||||
|
||||
.ctx-controls-body.is-locked {
|
||||
filter: blur(4px);
|
||||
opacity: 0.24;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
filter: none;
|
||||
pointer-events: none;
|
||||
user-select: none;
|
||||
}
|
||||
@@ -753,12 +756,12 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
gap: var(--space-2);
|
||||
justify-content: flex-start;
|
||||
gap: 8px;
|
||||
padding: var(--space-3) var(--space-4);
|
||||
border-radius: var(--radius-xs);
|
||||
border: 1px solid color-mix(in srgb, var(--metric-warn) 42%, var(--border-hairline));
|
||||
background: color-mix(in srgb, var(--surface-panel) 88%, var(--metric-warn) 7%);
|
||||
border-radius: var(--radius-sm);
|
||||
border: 1px solid color-mix(in srgb, var(--metric-warn) 36%, var(--border-hairline));
|
||||
background: color-mix(in srgb, var(--surface-panel) 93%, var(--metric-warn) 7%);
|
||||
}
|
||||
|
||||
.ctx-risk-mask[hidden] {
|
||||
@@ -786,14 +789,29 @@
|
||||
.ctx-risk-desc {
|
||||
margin: 0;
|
||||
font-size: var(--fs-sm);
|
||||
line-height: 1.5;
|
||||
color: var(--text-primary);
|
||||
line-height: 1.55;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.ctx-risk-accept-btn {
|
||||
margin-top: 2px;
|
||||
min-height: calc(26px * var(--ui-font-scale, 1));
|
||||
padding: 2px var(--space-3);
|
||||
min-height: calc(28px * var(--ui-font-scale, 1));
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
@@ -100,8 +100,7 @@ export const SettingsOtherTab = defineComponent({
|
||||
text: '',
|
||||
});
|
||||
const maintStatusText = h('span', {
|
||||
className: 'text-muted',
|
||||
style: 'font-size: var(--fs-md);',
|
||||
className: 'text-muted settings-panel-status',
|
||||
text: '',
|
||||
});
|
||||
|
||||
@@ -139,10 +138,12 @@ export const SettingsOtherTab = defineComponent({
|
||||
maintTimer = null;
|
||||
}
|
||||
patchText(maintStatusText, text);
|
||||
patchAttr(maintStatusText, 'title', text || null);
|
||||
if (text && autoClearMs > 0) {
|
||||
maintTimer = setTimeout(() => {
|
||||
maintTimer = null;
|
||||
patchText(maintStatusText, '');
|
||||
patchAttr(maintStatusText, 'title', null);
|
||||
}, autoClearMs);
|
||||
}
|
||||
}
|
||||
@@ -321,7 +322,10 @@ export const SettingsOtherTab = defineComponent({
|
||||
const ctxModelLabel = h('span', { className: 'form-label' });
|
||||
const ctxWindowLabel = h('span', { className: 'form-label' });
|
||||
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({
|
||||
className: 'settings-context-model',
|
||||
searchable: true,
|
||||
@@ -611,7 +615,7 @@ export const SettingsOtherTab = defineComponent({
|
||||
}
|
||||
|
||||
const baselinePanel = h('section', { className: 'panel' }, [
|
||||
h('div', { className: 'panel-header' }, [
|
||||
h('div', { className: 'panel-header settings-panel-header' }, [
|
||||
h('span', { className: 'panel-title' }, [
|
||||
createSvgIcon('layers', { size: 13 }),
|
||||
baselineTitleEl,
|
||||
@@ -828,7 +832,7 @@ export const SettingsOtherTab = defineComponent({
|
||||
]);
|
||||
|
||||
const maintPanel = h('section', { className: 'panel' }, [
|
||||
h('div', { className: 'panel-header' }, [
|
||||
h('div', { className: 'panel-header settings-panel-header' }, [
|
||||
h('span', { className: 'panel-title' }, [
|
||||
createSvgIcon('refresh', { size: 13 }),
|
||||
maintTitleEl,
|
||||
|
||||
Reference in New Issue
Block a user