style: add shared content width constraint to AI provider edit pages

This commit is contained in:
LTbinglingfeng
2026-01-30 23:35:41 +08:00
parent 129d89cf67
commit 3d83d0bfe2
8 changed files with 22 additions and 4 deletions

View File

@@ -14,6 +14,7 @@ import type { AmpcodeConfig } from '@/types';
import { maskApiKey } from '@/utils/format';
import { buildAmpcodeFormState, entriesToAmpcodeMappings } from '@/components/providers/utils';
import type { AmpcodeFormState } from '@/components/providers';
import layoutStyles from './AiProvidersEditLayout.module.scss';
type LocationState = { fromAiProviders?: boolean } | null;
@@ -97,8 +98,9 @@ export function AiProvidersAmpcodeEditPage() {
if (!mountedRef.current) return;
setError(getErrorMessage(err) || t('notification.refresh_failed'));
} finally {
if (!mountedRef.current) return;
setLoading(false);
if (mountedRef.current) {
setLoading(false);
}
}
})();
}, [clearCache, t, updateConfigValue]);
@@ -220,6 +222,7 @@ export function AiProvidersAmpcodeEditPage() {
return (
<SecondaryScreenShell
ref={swipeRef}
contentClassName={layoutStyles.content}
title={title}
onBack={handleBack}
backLabel={t('common.back')}