feat(ui): use shadcn switch for toggles and remove sidebar user footer
This commit is contained in:
@@ -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>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user