fix: refactor layout containers for proxy and settings pages to ensure full height and unified scrolling (#102)
This commit is contained in:
1 parent
4dc4e4e5a7
commit
caaaaf5718
2 files changed
+6
-7
No files matched your search
@@ -192,21 +192,20 @@ print(response.choices[0].message.content)`;
|
|||||||
|
|
||||||
if (isLoading || !proxyConfig) {
|
if (isLoading || !proxyConfig) {
|
||||||
return (
|
return (
|
||||||
<div className="flex h-screen items-center justify-center">
|
<div className="flex h-full items-center justify-center">
|
||||||
<Loader2 className="animate-spin" />
|
<Loader2 className="animate-spin" />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="scrollbar-hide container mx-auto h-[calc(100vh-theme(spacing.16))] max-w-4xl space-y-6 overflow-y-auto p-6">
|
<div className="container mx-auto max-w-4xl space-y-5 p-6">
|
||||||
<div>
|
<div>
|
||||||
<h2 className="text-3xl font-bold tracking-tight">{t('proxy.title', 'API Proxy')}</h2>
|
<h2 className="text-3xl font-bold tracking-tight">{t('proxy.title', 'API Proxy')}</h2>
|
||||||
<p className="text-muted-foreground mt-1">
|
<p className="text-muted-foreground mt-1">
|
||||||
{t('proxy.description', 'Manage the local API proxy service.')}
|
{t('proxy.description', 'Manage the local API proxy service.')}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
{/* Local Access Info Banner */}
|
|
||||||
{/* Local Access Info Banner */}
|
{/* Local Access Info Banner */}
|
||||||
{proxyConfig?.enabled && (
|
{proxyConfig?.enabled && (
|
||||||
<div className="mt-4 flex flex-col gap-2 rounded-md border border-blue-100 bg-blue-50 p-3 text-sm text-blue-900 dark:border-blue-900/50 dark:bg-blue-950/30 dark:text-blue-200">
|
<div className="mt-4 flex flex-col gap-2 rounded-md border border-blue-100 bg-blue-50 p-3 text-sm text-blue-900 dark:border-blue-900/50 dark:bg-blue-950/30 dark:text-blue-200">
|
||||||
|
|||||||
@@ -66,14 +66,14 @@ function SettingsPage() {
|
|||||||
|
|
||||||
if (isLoading || !proxyConfig) {
|
if (isLoading || !proxyConfig) {
|
||||||
return (
|
return (
|
||||||
<div className="flex h-screen items-center justify-center">
|
<div className="flex h-full items-center justify-center">
|
||||||
<Loader2 className="animate-spin" />
|
<Loader2 className="animate-spin" />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="scrollbar-hide container mx-auto h-[calc(100vh-theme(spacing.16))] max-w-4xl space-y-8 overflow-y-auto p-6">
|
<div className="container mx-auto max-w-4xl space-y-5 p-6">
|
||||||
<div>
|
<div>
|
||||||
<h2 className="text-3xl font-bold tracking-tight">{t('settings.title')}</h2>
|
<h2 className="text-3xl font-bold tracking-tight">{t('settings.title')}</h2>
|
||||||
<p className="text-muted-foreground mt-1">{t('settings.description')}</p>
|
<p className="text-muted-foreground mt-1">{t('settings.description')}</p>
|
||||||
@@ -86,7 +86,7 @@ function SettingsPage() {
|
|||||||
</TabsList>
|
</TabsList>
|
||||||
|
|
||||||
{/* --- GENERAL TAB --- */}
|
{/* --- GENERAL TAB --- */}
|
||||||
<TabsContent value="general" className="space-y-4">
|
<TabsContent value="general" className="space-y-5">
|
||||||
<Card>
|
<Card>
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
<CardTitle>{t('settings.appearance.title')}</CardTitle>
|
<CardTitle>{t('settings.appearance.title')}</CardTitle>
|
||||||
@@ -298,7 +298,7 @@ function SettingsPage() {
|
|||||||
</TabsContent>
|
</TabsContent>
|
||||||
|
|
||||||
{/* --- PROXY TAB (Upstream Proxy Config Only) --- */}
|
{/* --- PROXY TAB (Upstream Proxy Config Only) --- */}
|
||||||
<TabsContent value="proxy" className="space-y-4">
|
<TabsContent value="proxy" className="space-y-5">
|
||||||
<Card>
|
<Card>
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
<CardTitle>{t('settings.proxy.title')}</CardTitle>
|
<CardTitle>{t('settings.proxy.title')}</CardTitle>
|
||||||
|
|||||||
Reference in new issue
Block a user