refactor(quota): consolidate quota sections into config-driven components

This commit is contained in:
Supra4E8C
2026-01-02 17:14:40 +08:00
parent 47f0042bf0
commit 82bf1806ed
19 changed files with 1073 additions and 1604 deletions

View File

@@ -8,9 +8,10 @@ import { Button } from '@/components/ui/Button';
import { useAuthStore } from '@/stores';
import { authFilesApi } from '@/services/api';
import {
AntigravitySection,
CodexSection,
GeminiCliSection
QuotaSection,
ANTIGRAVITY_CONFIG,
CODEX_CONFIG,
GEMINI_CLI_CONFIG
} from '@/components/quota';
import type { AuthFileItem } from '@/types';
import styles from './QuotaPage.module.scss';
@@ -57,9 +58,24 @@ export function QuotaPage() {
{error && <div className={styles.errorBox}>{error}</div>}
<AntigravitySection files={files} loading={loading} disabled={disableControls} />
<CodexSection files={files} loading={loading} disabled={disableControls} />
<GeminiCliSection files={files} loading={loading} disabled={disableControls} />
<QuotaSection
config={ANTIGRAVITY_CONFIG}
files={files}
loading={loading}
disabled={disableControls}
/>
<QuotaSection
config={CODEX_CONFIG}
files={files}
loading={loading}
disabled={disableControls}
/>
<QuotaSection
config={GEMINI_CLI_CONFIG}
files={files}
loading={loading}
disabled={disableControls}
/>
</div>
);
}