diff --git a/src/pages/VersionManagementPage.tsx b/src/pages/VersionManagementPage.tsx index 48c5d33..80ce15e 100644 --- a/src/pages/VersionManagementPage.tsx +++ b/src/pages/VersionManagementPage.tsx @@ -5,7 +5,6 @@ import { listen } from '@tauri-apps/api/event'; import { AlertCircle, Check, - Database, Download, ExternalLink, Info, @@ -39,10 +38,6 @@ export type CoreInstallTask = { result: CoreInstallResult | null; }; -export type CodexModelCatalogUpdateResult = { - outcome: 'updated' | 'unchanged'; -}; - export type VersionSourceSettings = { preferGitcodeDownloads: boolean; gitcodeAvailable: boolean; @@ -124,10 +119,6 @@ export function VersionManagementPage() { const [versionSourceSaving, setVersionSourceSaving] = useState(false); const [versionSourceError, setVersionSourceError] = useState(''); - const [catalogUpdating, setCatalogUpdating] = useState(false); - const [catalogUpdateError, setCatalogUpdateError] = useState(''); - const [catalogUpdateNotice, setCatalogUpdateNotice] = useState(''); - const [toastNotice, setToastNotice] = useState<{ message: string; tone: MessageType; @@ -316,26 +307,6 @@ export function VersionManagementPage() { } }; - const syncModelCatalog = async () => { - setCatalogUpdating(true); - setCatalogUpdateError(''); - setCatalogUpdateNotice(''); - try { - const result = await invoke('update_codex_model_catalog'); - const notice = result.outcome === 'updated' - ? t('appUpdate.catalog.updated') - : t('appUpdate.catalog.unchanged'); - setCatalogUpdateNotice(notice); - showToast(notice, 'success'); - } catch (error) { - const err = String(error); - setCatalogUpdateError(err); - showToast(err, 'error'); - } finally { - setCatalogUpdating(false); - } - }; - useEffect(() => { let disposed = false; let unlisten: (() => void) | null = null; @@ -677,51 +648,6 @@ export function VersionManagementPage() { -
-
-
-

{t('kernel.versions.catalogCardTitle')}

- {catalogUpdating || catalogUpdateError ? ( - - {catalogUpdating ? t('appUpdate.catalog.updating') : t('kernel.update.failed')} - - ) : null} -
- -

- {t('appUpdate.catalog.description')} -

- - {catalogUpdateError ? ( -
- - {catalogUpdateError} -
- ) : catalogUpdateNotice ? ( -
- - {catalogUpdateNotice} -
- ) : null} -
- -
- -
-
diff --git a/src/styles.css b/src/styles.css index 3a40df6..5c23537 100644 --- a/src/styles.css +++ b/src/styles.css @@ -1075,7 +1075,7 @@ textarea:focus-visible { .version-card-grid { display: grid; - grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr)); + grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 14px; } @@ -1083,7 +1083,7 @@ textarea:focus-visible { .version-list-item { display: grid; grid-template-rows: minmax(0, 1fr) auto; - min-height: 210px; + min-height: 220px; align-items: stretch; gap: 18px; padding: 20px; @@ -1154,6 +1154,7 @@ textarea:focus-visible { min-width: 0; gap: 2px; padding: 10px 12px; + border: 1px solid var(--theme-e8e5dc); border-radius: 8px; background: var(--theme-faf9f5); } @@ -1234,7 +1235,7 @@ textarea:focus-visible { align-items: center; justify-content: center; gap: 6px; - flex: 1 1 calc(50% - 4px); + flex: 1 1 112px; min-height: 33px; padding: 5px 10px; font-weight: 600; @@ -1242,14 +1243,6 @@ textarea:focus-visible { white-space: nowrap; } -.version-catalog-description { - margin: 5px 0 0; - color: var(--theme-7a746c); - font-size: var(--font-size-meta); - line-height: var(--line-height-body); -} - - .client-api-panel { margin-top: 0; } @@ -1624,6 +1617,10 @@ textarea:focus-visible { } @container workspace (max-width: 760px) { + .version-card-grid { + grid-template-columns: minmax(0, 1fr); + } + .version-list-item { min-height: 0; }