Decrease max width of all Settings pages

This commit is contained in:
Alex Gleason committed 2025-12-30 22:07:33 -06:00
1 parent 26945e3b84
commit 47820048dc
4 files changed
+764 -769

No files matched your search

+3 -2
View File
@@ -4,6 +4,7 @@ import { Button } from '@/components/ui/button';
import { useIsMobile } from '@/hooks/useIsMobile';
import { useNavigate } from 'react-router-dom';
import type { ReactNode } from 'react';
import { cn } from '@/lib/utils';
interface SettingsPageLayoutProps {
/** The icon component to display next to the title */
@@ -27,7 +28,7 @@ export function SettingsPageLayout({
titleKey,
descriptionKey,
children,
className = 'space-y-6',
className,
}: SettingsPageLayoutProps) {
const { t } = useTranslation();
const isMobile = useIsMobile();
@@ -70,7 +71,7 @@ export function SettingsPageLayout({
</div>
)}
<div className={className}>
<div className={cn('space-y-6 max-w-xl', className)}>
{children}
</div>
</div>
+103 -105
View File
@@ -46,114 +46,112 @@ export function AboutSettings() {
descriptionKey="aboutShakespeareDescription"
>
<div className="space-y-6 max-w-xl">
{/* Email Updates */}
<EmailSubscription />
{/* Email Updates */}
<EmailSubscription />
<div className="space-y-3">
{/* Mirrors */}
<Accordion type="single" collapsible className="w-full">
<AccordionItem value="mirrors">
<AccordionTrigger className="px-4 py-3 hover:no-underline">
<div className="flex items-center gap-2">
<Globe className="size-5 text-muted-foreground" />
{t('mirrors')}
<div className="space-y-3">
{/* Mirrors */}
<Accordion type="single" collapsible className="w-full">
<AccordionItem value="mirrors">
<AccordionTrigger className="px-4 py-3 hover:no-underline">
<div className="flex items-center gap-2">
<Globe className="size-5 text-muted-foreground" />
{t('mirrors')}
</div>
</AccordionTrigger>
<AccordionContent className="px-4 pb-4">
<p className="text-sm text-muted-foreground mb-3">{t('mirrorsDescription')}</p>
<div className="space-y-2">
<Button
variant="outline"
className="w-full h-10 flex items-center gap-2 justify-start"
asChild
>
<a href="https://shakespeare.diy" target="_blank" rel="noopener noreferrer">
<span className="font-mono text-sm">shakespeare.diy</span>
<ExternalLink className="ml-auto h-4 w-4 text-muted-foreground" />
</a>
</Button>
<Button
variant="outline"
className="w-full h-10 flex items-center gap-2 justify-start"
asChild
>
<a href="https://shakespeare-diy.github.io" target="_blank" rel="noopener noreferrer">
<span className="font-mono text-sm">shakespeare-diy.github.io</span>
<ExternalLink className="ml-auto h-4 w-4 text-muted-foreground" />
</a>
</Button>
<Button
variant="outline"
className="w-full h-10 flex items-center gap-2 justify-start"
asChild
>
<a href="https://shakespeare-b0b9c8.gitlab.io" target="_blank" rel="noopener noreferrer">
<span className="font-mono text-sm">shakespeare-b0b9c8.gitlab.io</span>
<ExternalLink className="ml-auto h-4 w-4 text-muted-foreground" />
</a>
</Button>
</div>
</AccordionContent>
</AccordionItem>
</Accordion>
{/* Project Information */}
<Card>
<CardContent className="p-0">
<Button
variant="ghost"
className="w-full h-12 flex items-center gap-2 justify-start text-base"
asChild
>
<a href="https://gitlab.com/soapbox-pub/shakespeare" target="_blank">
<Code className="!size-5 text-muted-foreground" />
{t('sourceCode')}
<ExternalLink className="ml-auto" />
</a>
</Button>
</CardContent>
</Card>
{/* License */}
<Accordion type="single" collapsible className="w-full">
<AccordionItem value="license-text">
<AccordionTrigger className="px-4 py-3 hover:no-underline">
<div className="flex items-center gap-2">
<Info className="size-5 text-muted-foreground" />
{t('license')}
</div>
</AccordionTrigger>
<AccordionContent className="px-4 pb-4">
{isLoading ? (
<div className="flex items-center gap-2 text-muted-foreground py-4">
<Loader2 className="h-4 w-4 animate-spin" />
<span className="text-sm">{t('loadingLicense')}</span>
</div>
</AccordionTrigger>
<AccordionContent className="px-4 pb-4">
<p className="text-sm text-muted-foreground mb-3">{t('mirrorsDescription')}</p>
<div className="space-y-2">
<Button
variant="outline"
className="w-full h-10 flex items-center gap-2 justify-start"
asChild
>
<a href="https://shakespeare.diy" target="_blank" rel="noopener noreferrer">
<span className="font-mono text-sm">shakespeare.diy</span>
<ExternalLink className="ml-auto h-4 w-4 text-muted-foreground" />
</a>
</Button>
<Button
variant="outline"
className="w-full h-10 flex items-center gap-2 justify-start"
asChild
>
<a href="https://shakespeare-diy.github.io" target="_blank" rel="noopener noreferrer">
<span className="font-mono text-sm">shakespeare-diy.github.io</span>
<ExternalLink className="ml-auto h-4 w-4 text-muted-foreground" />
</a>
</Button>
<Button
variant="outline"
className="w-full h-10 flex items-center gap-2 justify-start"
asChild
>
<a href="https://shakespeare-b0b9c8.gitlab.io" target="_blank" rel="noopener noreferrer">
<span className="font-mono text-sm">shakespeare-b0b9c8.gitlab.io</span>
<ExternalLink className="ml-auto h-4 w-4 text-muted-foreground" />
</a>
</Button>
</div>
</AccordionContent>
</AccordionItem>
</Accordion>
{/* Project Information */}
<Card>
<CardContent className="p-0">
<Button
variant="ghost"
className="w-full h-12 flex items-center gap-2 justify-start text-base"
asChild
>
<a href="https://gitlab.com/soapbox-pub/shakespeare" target="_blank">
<Code className="!size-5 text-muted-foreground" />
{t('sourceCode')}
<ExternalLink className="ml-auto" />
</a>
</Button>
</CardContent>
</Card>
{/* License */}
<Accordion type="single" collapsible className="w-full">
<AccordionItem value="license-text">
<AccordionTrigger className="px-4 py-3 hover:no-underline">
<div className="flex items-center gap-2">
<Info className="size-5 text-muted-foreground" />
{t('license')}
</div>
</AccordionTrigger>
<AccordionContent className="px-4 pb-4">
{isLoading ? (
<div className="flex items-center gap-2 text-muted-foreground py-4">
<Loader2 className="h-4 w-4 animate-spin" />
<span className="text-sm">{t('loadingLicense')}</span>
</div>
) : error ? (
<Alert variant="destructive">
<AlertTriangle className="h-4 w-4" />
<AlertDescription>
{t('failedToLoadLicense')}: {error}
</AlertDescription>
</Alert>
) : license ? (
<div
className="prose text-sm dark:prose-invert mx-auto"
dangerouslySetInnerHTML={{ __html: license }}
/>
) : null}
</AccordionContent>
</AccordionItem>
</Accordion>
</div>
{import.meta.env.VERSION && (
<div className="text-center text-xs text-muted-foreground/60 pt-4">
v{import.meta.env.VERSION}
</div>
)}
) : error ? (
<Alert variant="destructive">
<AlertTriangle className="h-4 w-4" />
<AlertDescription>
{t('failedToLoadLicense')}: {error}
</AlertDescription>
</Alert>
) : license ? (
<div
className="prose text-sm dark:prose-invert mx-auto"
dangerouslySetInnerHTML={{ __html: license }}
/>
) : null}
</AccordionContent>
</AccordionItem>
</Accordion>
</div>
{import.meta.env.VERSION && (
<div className="text-center text-xs text-muted-foreground/60 pt-4">
v{import.meta.env.VERSION}
</div>
)}
</SettingsPageLayout>
);
}
-1
View File
@@ -106,7 +106,6 @@ export function NostrSettings() {
icon={Wifi}
titleKey="nostrSettings"
descriptionKey="nostrSettingsDescription"
className="space-y-6 max-w-xl"
>
{/* Account Management */}
<div className="space-y-4">
File diff suppressed because it is too large. Load diff