feat(ui): use shadcn switch for toggles and remove sidebar user footer

This commit is contained in:
syntaxbullet
2026-01-08 23:00:44 +01:00
parent bea6c33024
commit 713ea07040
5 changed files with 39 additions and 23 deletions

View File

@@ -4,6 +4,7 @@ import { Loader2, Save, RefreshCw, Smartphone, Coins, Trophy, Shield, Users, Ter
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { Card, CardContent } from "@/components/ui/card";
import { Switch } from "@/components/ui/switch";
// Types matching the backend response
interface RoleOption { id: string; name: string; color: string; }
@@ -231,11 +232,9 @@ export function Settings() {
/>
<div className="flex items-center justify-between p-4 rounded-lg bg-white/5 border border-white/5">
<span className="text-sm font-medium">Allow Self Transfer</span>
<input
type="checkbox"
<Switch
checked={config?.economy?.transfers?.allowSelfTransfer ?? false}
onChange={(e) => updateConfig("economy.transfers.allowSelfTransfer", e.target.checked)}
className="h-5 w-5 rounded border-white/10 bg-white/5"
onCheckedChange={(checked) => updateConfig("economy.transfers.allowSelfTransfer", checked)}
/>
</div>
</div>
@@ -425,11 +424,9 @@ export function Settings() {
{config?.commands?.[cmd.name] === false ? "Disabled" : "Enabled"}
</span>
</div>
<input
type="checkbox"
<Switch
checked={config?.commands?.[cmd.name] !== false}
onChange={(e) => updateConfig(`commands.${cmd.name}`, e.target.checked)}
className="h-4 w-4 rounded border-white/10 bg-white/5 accent-primary cursor-pointer"
onCheckedChange={(checked) => updateConfig(`commands.${cmd.name}`, checked)}
/>
</div>
))}