-
-
Notifications
You must be signed in to change notification settings - Fork 358
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature(web): Change the settings page to be tabbed
- Loading branch information
1 parent
03e938a
commit 3a8d197
Showing
4 changed files
with
55 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,60 @@ | ||
import Link from "next/link"; | ||
import AISettings from "@/components/dashboard/settings/AISettings"; | ||
import ApiKeySettings from "@/components/dashboard/settings/ApiKeySettings"; | ||
import { ChangePassword } from "@/components/dashboard/settings/ChangePassword"; | ||
import ImportExport from "@/components/dashboard/settings/ImportExport"; | ||
import UserDetails from "@/components/dashboard/settings/UserDetails"; | ||
import { ExternalLink } from "lucide-react"; | ||
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; | ||
import { Download, KeyRound, Sparkle, User } from "lucide-react"; | ||
|
||
export default async function Settings() { | ||
return ( | ||
<> | ||
<div className="rounded-md border bg-background p-4"> | ||
<UserDetails /> | ||
<ChangePassword /> | ||
</div> | ||
<div className="mt-4 rounded-md border bg-background p-4"> | ||
<Link | ||
className="flex items-center gap-2 text-lg font-medium" | ||
href="/dashboard/settings/ai" | ||
> | ||
<Tabs | ||
defaultValue="info" | ||
orientation="horizontal" | ||
className="flex flex-col gap-1" | ||
> | ||
<TabsList className="flex justify-start"> | ||
<TabsTrigger className="flex items-center gap-2 p-3" value="info"> | ||
<User className="size-4" /> | ||
User Info | ||
</TabsTrigger> | ||
<TabsTrigger className="flex items-center gap-2 p-3" value="ai"> | ||
<Sparkle className="size-4" /> | ||
AI Settings | ||
<ExternalLink /> | ||
</Link> | ||
</div> | ||
<div className="mt-4 rounded-md border bg-background p-4"> | ||
<ImportExport /> | ||
</div> | ||
<div className="mt-4 rounded-md border bg-background p-4"> | ||
<ApiKeySettings /> | ||
</TabsTrigger> | ||
<TabsTrigger | ||
className="flex items-center gap-2 p-3" | ||
value="importexport" | ||
> | ||
<Download className="size-4" /> | ||
Import / Export | ||
</TabsTrigger> | ||
<TabsTrigger className="flex items-center gap-2 p-3" value="apikeys"> | ||
<KeyRound className="size-4" /> | ||
API Keys | ||
</TabsTrigger> | ||
</TabsList> | ||
<div className="w-full"> | ||
<TabsContent value="info"> | ||
<div className="rounded-md border bg-background p-4"> | ||
<UserDetails /> | ||
<ChangePassword /> | ||
</div> | ||
</TabsContent> | ||
<TabsContent value="ai"> | ||
<AISettings /> | ||
</TabsContent> | ||
<TabsContent value="importexport"> | ||
<div className="rounded-md border bg-background p-4"> | ||
<ImportExport /> | ||
</div> | ||
</TabsContent> | ||
<TabsContent value="apikeys"> | ||
<div className="rounded-md border bg-background p-4"> | ||
<ApiKeySettings /> | ||
</div> | ||
</TabsContent> | ||
</div> | ||
</> | ||
</Tabs> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters