From 3ef29e246eebacdb90336608bd36d600cfea36cc Mon Sep 17 00:00:00 2001 From: Aidan Honor Date: Tue, 11 Mar 2025 15:31:07 -0400 Subject: [PATCH] chore/ui: lint, settings design unification --- app/account/dashboard/settings/page.tsx | 81 ++++++++++--------- .../dashboard/Settings/ChangePassword.tsx | 3 +- components/pages/main/FeatureCard.tsx | 1 + 3 files changed, 48 insertions(+), 37 deletions(-) diff --git a/app/account/dashboard/settings/page.tsx b/app/account/dashboard/settings/page.tsx index d9dd96b..02b8775 100644 --- a/app/account/dashboard/settings/page.tsx +++ b/app/account/dashboard/settings/page.tsx @@ -4,9 +4,10 @@ import { motion } from "framer-motion" import { SideMenu } from "@/components/pages/dashboard/SideMenu" import { Switch } from "@/components/ui/switch" import { Label } from "@/components/ui/label" -import { Card } from "@/components/ui/card" +import { Card, CardContent, CardHeader, CardTitle, CardDescription } from "@/components/ui/card" import { ChangePassword } from "@/components/cards/dashboard/Settings/ChangePassword" -import { useState, useEffect } from "react"; +import { useState, useEffect } from "react" +import { LayoutDashboard } from "lucide-react" const fadeIn = { initial: { opacity: 0, y: 20 }, @@ -26,7 +27,7 @@ export default function Settings() { const fetchSettings = async () => { try { setLoading(true); - const response = await fetch('/api/users/settings'); + const response = await feth2ch('/api/users/settings'); if (response.ok) { const data = await response.json(); setSettings(data); @@ -40,7 +41,7 @@ export default function Settings() { } }; - fetchSettings(); + fetchSettings() }, []); const updateSetting = async (settingName: string, value: boolean) => { @@ -93,39 +94,47 @@ export default function Settings() {

Settings

- -

UI Settings

-
-
- - updateSetting('hideGenAI', checked)} - /> + + + + + UI Settings + + + Modify your user experience here + + + +
+
+ + updateSetting('hideGenAI', checked)} + /> +
+
+ + updateSetting('hideUpgrades', checked)} + /> +
+
+ + updateSetting('hideCrypto', checked)} + /> +
- -
- - updateSetting('hideUpgrades', checked)} - /> -
- -
- - updateSetting('hideCrypto', checked)} - /> -
-
+
diff --git a/components/cards/dashboard/Settings/ChangePassword.tsx b/components/cards/dashboard/Settings/ChangePassword.tsx index 26e506f..24563cc 100644 --- a/components/cards/dashboard/Settings/ChangePassword.tsx +++ b/components/cards/dashboard/Settings/ChangePassword.tsx @@ -46,7 +46,7 @@ export function ChangePassword() { return ( - Change Email Password + Change Email Password Please note, this will NOT change your Authentik password. {/* TODO: please tell me you added password resets to authentik by now */} @@ -59,6 +59,7 @@ export function ChangePassword() { type="password" value={newPassword} onChange={(e) => setNewPassword(e.target.value)} + className="mt-1.5" />