diff --git a/src/components/SettingsViewer.tsx b/src/components/SettingsViewer.tsx index 0dadeb3..f60229f 100644 --- a/src/components/SettingsViewer.tsx +++ b/src/components/SettingsViewer.tsx @@ -1,153 +1,86 @@ -import { useState } from "react"; -import { Settings, Palette } from "lucide-react"; -import { Label } from "./ui/label"; +import { Tabs, TabsContent, TabsList, TabsTrigger } from "./ui/tabs"; import { Checkbox } from "./ui/checkbox"; -import { Button } from "./ui/button"; import { useSettings } from "@/hooks/useSettings"; -import { cn } from "@/lib/utils"; - -type SettingsTab = "post" | "appearance"; - -interface TabConfig { - id: SettingsTab; - label: string; - icon: React.ReactNode; -} - -const TABS: TabConfig[] = [ - { - id: "post", - label: "Post", - icon: , - }, - { - id: "appearance", - label: "Appearance", - icon: , - }, -]; export function SettingsViewer() { const { settings, updateSetting } = useSettings(); - const [activeTab, setActiveTab] = useState("post"); return ( -
- {/* Sidebar */} -
-
-

Settings

-
- {TABS.map((tab) => ( - - ))} -
+
+ +
+ + Post + Appearance +
-
- {/* Content */} -
-
- {activeTab === "post" && ( -
-
-

Post Settings

-

- Configure how your posts are published -

-
- -
-
- - updateSetting("post", "includeClientTag", checked) - } - /> -
- -

- Add Grimoire client tag to your published events (kind 1 - posts, spells, deletions) -

-
-
-
+
+ +
+

Post Settings

+

+ Configure event publishing +

- )} - {activeTab === "appearance" && ( -
-
-

- Appearance Settings -

-

- Customize how Grimoire looks -

-
- -
-
- -
- {(["light", "dark", "system"] as const).map((theme) => ( - - ))} -
+
+
+ + updateSetting("post", "includeClientTag", checked) + } + /> +
+

- Choose your preferred color scheme + Add Grimoire tag to posts, spells, and deletions

+
+
+ -
- - updateSetting("appearance", "showClientTags", checked) - } - /> -
- -

- Display "via Grimoire" and other client tags in event UI -

-
+ +
+

Appearance

+

+ Customize display preferences +

+
+ +
+
+ + updateSetting("appearance", "showClientTags", checked) + } + /> +
+ +

+ Display "via Grimoire" and other client identifiers +

- )} +
-
+
); } diff --git a/src/components/nostr/user-menu.tsx b/src/components/nostr/user-menu.tsx index c9bb4fa..f7cb5ef 100644 --- a/src/components/nostr/user-menu.tsx +++ b/src/components/nostr/user-menu.tsx @@ -1,6 +1,5 @@ import { User, - Palette, Wallet, X, RefreshCw, @@ -27,9 +26,6 @@ import { DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, - DropdownMenuSub, - DropdownMenuSubTrigger, - DropdownMenuSubContent, } from "@/components/ui/dropdown-menu"; import { Dialog, @@ -45,7 +41,6 @@ import SettingsDialog from "@/components/SettingsDialog"; import LoginDialog from "./LoginDialog"; import ConnectWalletDialog from "@/components/ConnectWalletDialog"; import { useState } from "react"; -import { useTheme } from "@/lib/themes"; import { toast } from "sonner"; import { useWallet } from "@/hooks/useWallet"; import { Progress } from "@/components/ui/progress"; @@ -95,7 +90,6 @@ export default function UserMenu() { const [showLogin, setShowLogin] = useState(false); const [showConnectWallet, setShowConnectWallet] = useState(false); const [showWalletInfo, setShowWalletInfo] = useState(false); - const { themeId, setTheme, availableThemes } = useTheme(); // Calculate monthly donations reactively from DB (last 30 days) const monthlyDonations = @@ -489,34 +483,8 @@ export default function UserMenu() { )} - {/* App Preferences - Theme */} - - - - - Theme - - - {availableThemes.map((theme) => ( - setTheme(theme.id)} - > - - {theme.name} - - ))} - - - {/* Settings */} + addWindow("settings", {}, "Settings")}