fix(settings): move content padding inside scroll areas to keep inner borders visible
The settings shell wrapped children in an outer section with p-3/p-4 padding. With OverlayScrollbars replacing native scroll, the overlay scrollbar sat at the viewport's right edge and covered the right border of inner cards. Drop the outer padding (and the now-redundant overflow-auto) from the shell and apply p-3 md:p-4 inside each settings page instead, so the scrollbar aligns with the column edge while inner sections stay within the padded area.
This commit is contained in:
@@ -5039,7 +5039,7 @@ export function AcpAgentSettings() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="h-full flex flex-col">
|
<div className="h-full flex flex-col p-3 md:p-4">
|
||||||
<div className="flex items-center justify-between gap-3 pb-4">
|
<div className="flex items-center justify-between gap-3 pb-4">
|
||||||
<div>
|
<div>
|
||||||
<h2 className="text-base font-semibold">{t("title")}</h2>
|
<h2 className="text-base font-semibold">{t("title")}</h2>
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ export function AppearanceSettings() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<ScrollArea className="h-full">
|
<ScrollArea className="h-full">
|
||||||
<div className="w-full space-y-4">
|
<div className="w-full space-y-4 p-3 md:p-4">
|
||||||
{/* ===== Theme Mode (existing) ===== */}
|
{/* ===== Theme Mode (existing) ===== */}
|
||||||
<section className="rounded-xl border bg-card p-4 space-y-4">
|
<section className="rounded-xl border bg-card p-4 space-y-4">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ export function ChatChannelSettings() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<ScrollArea className="h-full">
|
<ScrollArea className="h-full">
|
||||||
<Tabs defaultValue="channels" className="w-full space-y-4">
|
<Tabs defaultValue="channels" className="w-full space-y-4 p-3 md:p-4">
|
||||||
<section className="space-y-3">
|
<section className="space-y-3">
|
||||||
<div>
|
<div>
|
||||||
<h1 className="text-sm font-semibold">{t("sectionTitle")}</h1>
|
<h1 className="text-sm font-semibold">{t("sectionTitle")}</h1>
|
||||||
|
|||||||
@@ -410,7 +410,7 @@ export function ExpertsSettings() {
|
|||||||
const SelectedIcon = selectedIcon
|
const SelectedIcon = selectedIcon
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="h-full flex flex-col">
|
<div className="h-full flex flex-col p-3 md:p-4">
|
||||||
<div className="flex items-center justify-between gap-3 pb-4">
|
<div className="flex items-center justify-between gap-3 pb-4">
|
||||||
<div>
|
<div>
|
||||||
<h2 className="text-base font-semibold">{t("title")}</h2>
|
<h2 className="text-base font-semibold">{t("title")}</h2>
|
||||||
|
|||||||
@@ -893,7 +893,7 @@ export function McpSettings() {
|
|||||||
</DialogContent>
|
</DialogContent>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
|
||||||
<div className="h-full min-h-0 grid grid-cols-1 gap-4 lg:grid-cols-[360px_1fr]">
|
<div className="h-full min-h-0 grid grid-cols-1 gap-4 p-3 md:p-4 lg:grid-cols-[360px_1fr]">
|
||||||
<section className="min-h-0 rounded-xl border bg-card p-3">
|
<section className="min-h-0 rounded-xl border bg-card p-3">
|
||||||
<Tabs
|
<Tabs
|
||||||
value={leftTab}
|
value={leftTab}
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ export function ModelProviderSettings() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<ScrollArea className="h-full">
|
<ScrollArea className="h-full">
|
||||||
<section className="space-y-3">
|
<section className="space-y-3 px-3 pt-3 md:px-4 md:pt-4">
|
||||||
<div>
|
<div>
|
||||||
<h1 className="text-sm font-semibold">{t("sectionTitle")}</h1>
|
<h1 className="text-sm font-semibold">{t("sectionTitle")}</h1>
|
||||||
<p className="text-sm text-muted-foreground">
|
<p className="text-sm text-muted-foreground">
|
||||||
@@ -102,7 +102,7 @@ export function ModelProviderSettings() {
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section className="mt-4 space-y-2">
|
<section className="mt-4 space-y-2 px-3 pb-3 md:px-4 md:pb-4">
|
||||||
<div className="flex items-center justify-between gap-2">
|
<div className="flex items-center justify-between gap-2">
|
||||||
<Select
|
<Select
|
||||||
value={filter ?? "__all__"}
|
value={filter ?? "__all__"}
|
||||||
|
|||||||
@@ -236,12 +236,7 @@ export function SettingsShell({ children }: SettingsShellProps) {
|
|||||||
</Sheet>
|
</Sheet>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<section
|
<section className="flex-1 min-w-0 min-h-0 overflow-hidden">
|
||||||
className={cn(
|
|
||||||
"flex-1 min-w-0 min-h-0 overflow-auto",
|
|
||||||
isMobile ? "p-3" : "p-4"
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
{children}
|
{children}
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ export function ShortcutSettings() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<ScrollArea className="h-full">
|
<ScrollArea className="h-full">
|
||||||
<div className="w-full space-y-4">
|
<div className="w-full space-y-4 p-3 md:p-4">
|
||||||
<section className="rounded-xl border bg-card p-4 space-y-4">
|
<section className="rounded-xl border bg-card p-4 space-y-4">
|
||||||
<div className="flex items-center justify-between gap-3">
|
<div className="flex items-center justify-between gap-3">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
|
|||||||
@@ -775,7 +775,7 @@ export function SkillsSettings() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="h-full flex flex-col">
|
<div className="h-full flex flex-col p-3 md:p-4">
|
||||||
<div className="flex items-center justify-between gap-3 pb-4">
|
<div className="flex items-center justify-between gap-3 pb-4">
|
||||||
<div>
|
<div>
|
||||||
<h2 className="text-base font-semibold">{t("title")}</h2>
|
<h2 className="text-base font-semibold">{t("title")}</h2>
|
||||||
|
|||||||
@@ -343,7 +343,7 @@ export function SystemNetworkSettings() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<ScrollArea className="h-full">
|
<ScrollArea className="h-full">
|
||||||
<div className="w-full space-y-4">
|
<div className="w-full space-y-4 p-3 md:p-4">
|
||||||
<section className="space-y-1">
|
<section className="space-y-1">
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<h1 className="text-sm font-semibold">{t("sectionTitle")}</h1>
|
<h1 className="text-sm font-semibold">{t("sectionTitle")}</h1>
|
||||||
|
|||||||
@@ -346,7 +346,7 @@ export function VersionControlSettings() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<ScrollArea className="h-full">
|
<ScrollArea className="h-full">
|
||||||
<div className="w-full space-y-4">
|
<div className="w-full space-y-4 p-3 md:p-4">
|
||||||
<section className="space-y-1">
|
<section className="space-y-1">
|
||||||
<h1 className="text-sm font-semibold">{t("sectionTitle")}</h1>
|
<h1 className="text-sm font-semibold">{t("sectionTitle")}</h1>
|
||||||
<p className="text-xs text-muted-foreground">
|
<p className="text-xs text-muted-foreground">
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ export function WebServiceSettings() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<ScrollArea className="h-full">
|
<ScrollArea className="h-full">
|
||||||
<div className="space-y-6">
|
<div className="space-y-6 p-3 md:p-4">
|
||||||
<div>
|
<div>
|
||||||
<h3 className="text-lg font-medium">{t("sectionTitle")}</h3>
|
<h3 className="text-lg font-medium">{t("sectionTitle")}</h3>
|
||||||
<p className="text-sm text-muted-foreground">
|
<p className="text-sm text-muted-foreground">
|
||||||
|
|||||||
Reference in New Issue
Block a user