Preferences design improvements

This commit is contained in:
Alex Gleason committed 2025-12-01 16:26:19 -06:00
1 parent e8c3406e55
commit dfc372e1d4
1 file changed
+45 -40
+45 -40
View File
@@ -1,6 +1,7 @@
import { Settings2, ArrowLeft } from "lucide-react";
import { useTranslation } from 'react-i18next';
import { Button } from "@/components/ui/button";
import { Card, CardContent } from "@/components/ui/card";
import { ThemePicker } from "@/components/ThemePicker";
import { LanguagePicker } from "@/components/LanguagePicker";
import { Switch } from "@/components/ui/switch";
@@ -52,50 +53,54 @@ export function Preferences() {
</div>
)}
<div className="space-y-6 max-w-sm">
<div className="space-y-2">
<Label htmlFor="theme-picker">{t('theme')}</Label>
<div className="w-full">
<ThemePicker />
</div>
<p className="text-sm text-muted-foreground">
{t('themeDescription')}
</p>
</div>
<Card className="max-w-md">
<CardContent className="pt-6">
<div className="space-y-6">
<div className="space-y-2">
<Label htmlFor="theme-picker">{t('theme')}</Label>
<div className="w-full">
<ThemePicker />
</div>
<p className="text-sm text-muted-foreground">
{t('themeDescription')}
</p>
</div>
<div className="space-y-2">
<Label htmlFor="language-picker">{t('language')}</Label>
<div className="w-full">
<LanguagePicker />
</div>
<p className="text-sm text-muted-foreground">
{t('languageDescription')}
</p>
</div>
<div className="space-y-2">
<Label htmlFor="language-picker">{t('language')}</Label>
<div className="w-full">
<LanguagePicker />
</div>
<p className="text-sm text-muted-foreground">
{t('languageDescription')}
</p>
</div>
<div className="space-y-2">
<div className="flex items-center justify-between">
<div className="space-y-0.5">
<Label htmlFor="sentry-enabled" className="text-sm font-medium">
{t('shareErrorReports')}
</Label>
<div className="space-y-2">
<div className="flex items-center justify-between">
<div className="space-y-0.5">
<Label htmlFor="sentry-enabled" className="text-sm font-medium">
{t('shareErrorReports')}
</Label>
</div>
<Switch
id="sentry-enabled"
checked={config.sentryEnabled}
onCheckedChange={(checked) => {
updateConfig((current) => ({
...current,
sentryEnabled: checked,
}));
}}
/>
</div>
<p className="text-sm text-muted-foreground">
{t('shareErrorReportsDescription')}
</p>
</div>
<Switch
id="sentry-enabled"
checked={config.sentryEnabled}
onCheckedChange={(checked) => {
updateConfig((current) => ({
...current,
sentryEnabled: checked,
}));
}}
/>
</div>
<p className="text-sm text-muted-foreground">
{t('shareErrorReportsDescription')}
</p>
</div>
</div>
</CardContent>
</Card>
</div>
);
}