mirror of
https://github.com/lWolvesl/antigravity-usage-monitor.git
synced 2026-11-26 17:09:28 +08:00
feat(panel): graduate Modern UI as default, default language to system, and fix 5h quota boundary
This commit is contained in:
@@ -21,7 +21,7 @@ import {
|
||||
PANEL_SCALE_FACTORS,
|
||||
applyAppearanceToRoot,
|
||||
normalizeClientFontScale,
|
||||
normalizeClientModernUi,
|
||||
resolveSettingsModernUi,
|
||||
} from '../../core/appearance.js';
|
||||
import {
|
||||
h,
|
||||
@@ -1468,7 +1468,7 @@ export function mountWindowOverlay() {
|
||||
applyAppearanceToRoot(capsuleHost, settings, { includeFontScale: false });
|
||||
applyAppearanceToRoot(portalHost, settings, { includeFontScale: true });
|
||||
const scaleKey = normalizeClientFontScale(settings?.fontScale);
|
||||
const isModernUi = normalizeClientModernUi(settings?.experimentalModernUi);
|
||||
const isModernUi = resolveSettingsModernUi(settings);
|
||||
const colorScheme = portalHost.getAttribute?.('data-color-scheme') || 'light';
|
||||
for (const el of [popoverEl, hoverTipEl, multiPanelEl]) {
|
||||
if (el.getAttribute?.('data-font-scale') !== scaleKey) {
|
||||
|
||||
@@ -98,6 +98,7 @@ export function patchCapsuleOdometerText(
|
||||
|
||||
if (!isModern || !/\d/.test(nextStr)) {
|
||||
if (prev?.active) {
|
||||
el.textContent = '';
|
||||
while (el.firstChild) el.removeChild(el.firstChild);
|
||||
patchAttr(el, 'data-od-active', null);
|
||||
patchAttr(el, 'data-od-value', null);
|
||||
@@ -114,6 +115,7 @@ export function patchCapsuleOdometerText(
|
||||
|
||||
let nodes;
|
||||
if (!prev?.active || prev.resetKey !== resetKey || !(prev.nodes instanceof Map)) {
|
||||
el.textContent = '';
|
||||
while (el.firstChild) el.removeChild(el.firstChild);
|
||||
nodes = new Map();
|
||||
} else {
|
||||
@@ -472,10 +474,6 @@ export const CapsuleBarWidget = defineComponent({
|
||||
'div',
|
||||
{ className: 'preview-host-left is-composer', hidden: true },
|
||||
[
|
||||
h('span', { className: 'preview-composer-chip' }, [
|
||||
h('span', { text: 'Auto' }),
|
||||
createSvgIcon('chevron-down', { size: 10 }),
|
||||
]),
|
||||
h('span', { className: 'preview-composer-chip' }, [
|
||||
h('span', { text: 'Carbon (High)' }),
|
||||
createSvgIcon('chevron-down', { size: 10 }),
|
||||
|
||||
Reference in New Issue
Block a user