mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-24 02:39:42 +02:00
- Add CoreProvider to @multica/core/platform — single component for API/stores/WS/QueryClient init - Delete 13 platform files across web (6) and desktop (7), each app keeps only navigation.tsx - Extract AppSidebar + DashboardLayout to @multica/views/layout - Extract LoginPage to @multica/views/auth - Extract AgentsPage (1,279 lines) to @multica/views/agents (11 files) - Extract InboxPage (468 lines) to @multica/views/inbox (5 files) - Extract SettingsPage + 6 tabs (1,277 lines) to @multica/views/settings (9 files) - Fix AppLink to use forwardRef for Base UI render prop compatibility - Fix Tailwind @source to scan .ts files (status config with bg-info/bg-warning) - Suppress next-themes React 19 script tag warning - Add WebProviders wrapper for Server→Client function passing - Wire all desktop routes to shared views, remove PlaceholderPage - Net: +106 / -4,094 lines Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
72 lines
2.7 KiB
TypeScript
72 lines
2.7 KiB
TypeScript
"use client";
|
|
|
|
import { User, Palette, Key, Settings, Users, FolderGit2 } from "lucide-react";
|
|
import { Tabs, TabsList, TabsTrigger, TabsContent } from "@multica/ui/components/ui/tabs";
|
|
import { useWorkspaceStore } from "@multica/core/workspace";
|
|
import { AccountTab } from "./account-tab";
|
|
import { AppearanceTab } from "./appearance-tab";
|
|
import { TokensTab } from "./tokens-tab";
|
|
import { WorkspaceTab } from "./workspace-tab";
|
|
import { MembersTab } from "./members-tab";
|
|
import { RepositoriesTab } from "./repositories-tab";
|
|
|
|
const accountTabs = [
|
|
{ value: "profile", label: "Profile", icon: User },
|
|
{ value: "appearance", label: "Appearance", icon: Palette },
|
|
{ value: "tokens", label: "API Tokens", icon: Key },
|
|
];
|
|
|
|
const workspaceTabs = [
|
|
{ value: "workspace", label: "General", icon: Settings },
|
|
{ value: "repositories", label: "Repositories", icon: FolderGit2 },
|
|
{ value: "members", label: "Members", icon: Users },
|
|
];
|
|
|
|
export function SettingsPage() {
|
|
const workspaceName = useWorkspaceStore((s) => s.workspace?.name);
|
|
|
|
return (
|
|
<Tabs defaultValue="profile" orientation="vertical" className="flex-1 min-h-0 gap-0">
|
|
{/* Left nav */}
|
|
<div className="w-52 shrink-0 border-r overflow-y-auto p-4">
|
|
<h1 className="text-sm font-semibold mb-4 px-2">Settings</h1>
|
|
<TabsList variant="line" className="flex-col items-stretch">
|
|
{/* My Account group */}
|
|
<span className="px-2 pb-1 pt-2 text-xs font-medium text-muted-foreground">
|
|
My Account
|
|
</span>
|
|
{accountTabs.map((tab) => (
|
|
<TabsTrigger key={tab.value} value={tab.value}>
|
|
<tab.icon className="h-4 w-4" />
|
|
{tab.label}
|
|
</TabsTrigger>
|
|
))}
|
|
|
|
{/* Workspace group */}
|
|
<span className="px-2 pb-1 pt-4 text-xs font-medium text-muted-foreground truncate">
|
|
{workspaceName ?? "Workspace"}
|
|
</span>
|
|
{workspaceTabs.map((tab) => (
|
|
<TabsTrigger key={tab.value} value={tab.value}>
|
|
<tab.icon className="h-4 w-4" />
|
|
{tab.label}
|
|
</TabsTrigger>
|
|
))}
|
|
</TabsList>
|
|
</div>
|
|
|
|
{/* Right content */}
|
|
<div className="flex-1 min-w-0 overflow-y-auto">
|
|
<div className="w-full max-w-3xl mx-auto p-6">
|
|
<TabsContent value="profile"><AccountTab /></TabsContent>
|
|
<TabsContent value="appearance"><AppearanceTab /></TabsContent>
|
|
<TabsContent value="tokens"><TokensTab /></TabsContent>
|
|
<TabsContent value="workspace"><WorkspaceTab /></TabsContent>
|
|
<TabsContent value="repositories"><RepositoriesTab /></TabsContent>
|
|
<TabsContent value="members"><MembersTab /></TabsContent>
|
|
</div>
|
|
</div>
|
|
</Tabs>
|
|
);
|
|
}
|