settings refactor
This commit is contained in:
@@ -4,7 +4,7 @@ import { useServerSettings } from '@/state/useServerSettings';
|
||||
import { useInitialData } from '@/state/useInitialData';
|
||||
import { LandingPage, AuthLayout } from './Screens/LandingPage';
|
||||
import { Home } from './Screens/Dashboard/Home';
|
||||
import { Profile } from './Screens/Dashboard/Profile';
|
||||
import { ProfileSettings } from './Screens/Dashboard/Settings/ProfileSettings';
|
||||
import { ClaudeSessions, ClaudeChat, OpenCodeChat, NewChat } from './Screens/Dashboard/Chat';
|
||||
import { Plans } from './Screens/Dashboard/Plans';
|
||||
import { Skills } from './Screens/Dashboard/Skills';
|
||||
@@ -15,8 +15,8 @@ import { SignoutScreen } from './Screens/Dashboard/SignoutScreen';
|
||||
import { Screen as Files } from 'plugins/FileBrowser/client';
|
||||
import { Screen as Terminal } from 'plugins/Terminal/client';
|
||||
import { AISettings } from './Screens/Dashboard/Settings/AISettings';
|
||||
import { ServerSettings } from './Screens/Dashboard/ServerSettings';
|
||||
import { Applications } from './Screens/Dashboard/Applications';
|
||||
import { ServerSettings } from './Screens/Dashboard/Settings/ServerSettings';
|
||||
import { ResourceSettings } from './Screens/Dashboard/Settings/ResourceSettings';
|
||||
import { OnboardingAdmin } from './Screens/Dashboard/OnboardingAdmin';
|
||||
|
||||
export function App() {
|
||||
@@ -45,7 +45,10 @@ export function App() {
|
||||
{isAuthenticated && onboardingComplete && (
|
||||
<Routes>
|
||||
<Route path="/" element={<Home />} />
|
||||
<Route path="/settings/profile" element={<Profile />} />
|
||||
<Route path="/settings/profile" element={<ProfileSettings />} />
|
||||
<Route path="/settings/ai" element={<AISettings />} />
|
||||
<Route path="/settings/server" element={<ServerSettings />} />
|
||||
<Route path="/settings/resources" element={<ResourceSettings />} />
|
||||
<Route path="/chat" element={<ClaudeSessions />} />
|
||||
<Route path="/chat/new" element={<NewChat />} />
|
||||
<Route path="/chat/:sessionId" element={<ClaudeChat />} />
|
||||
@@ -53,9 +56,6 @@ export function App() {
|
||||
<Route path="/chat/opencode/:sessionId" element={<OpenCodeChat />} />
|
||||
{plugins?.FileBrowser !== false && <Route path="/files" element={<Files />} />}
|
||||
{plugins?.Terminal !== false && <Route path="/terminal" element={<Terminal />} />}
|
||||
<Route path="/settings/ai" element={<AISettings />} />
|
||||
<Route path="/settings/server" element={<ServerSettings />} />
|
||||
<Route path="/settings/applications" element={<Applications />} />
|
||||
<Route path="/plans" element={<Plans />} />
|
||||
<Route path="/skills" element={<Skills />} />
|
||||
<Route path="/tasks" element={<Tasks />} />
|
||||
|
||||
@@ -114,9 +114,9 @@ export function DashboardLayout({ children, mobileFull }: DashboardLayoutProps)
|
||||
</Link>
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem asChild className="cursor-pointer">
|
||||
<Link to="/settings/applications">
|
||||
<Link to="/settings/resources">
|
||||
<Package className="mr-2 h-4 w-4" />
|
||||
Applications
|
||||
Resources
|
||||
</Link>
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem asChild className="cursor-pointer">
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@ import { Search, User, Lock, Globe, ListChecks } from 'lucide-react';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from '@/components/ui/accordion';
|
||||
import { Card } from '@/components/Card';
|
||||
import { DashboardLayout } from '../Layout';
|
||||
import { DashboardLayout } from '../../Layout';
|
||||
import { UserData } from './UserData';
|
||||
import { ChangePassword } from './ChangePassword';
|
||||
import { Languages } from './Languages';
|
||||
@@ -42,7 +42,7 @@ const sections = [
|
||||
|
||||
const allKeys = sections.map((s) => s.key);
|
||||
|
||||
export const Profile = () => {
|
||||
export const ProfileSettings = () => {
|
||||
const [search, setSearch] = useState('');
|
||||
const [expanded, setExpanded] = useState<string[]>([]);
|
||||
const sectionRefs = useRef<Record<string, HTMLDivElement | null>>({});
|
||||
+2
-2
@@ -5,7 +5,7 @@ import { toast } from 'sonner';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Card } from '@/components/Card';
|
||||
import { useClient } from 'hooks/useClient';
|
||||
import { DashboardLayout } from '../Layout';
|
||||
import { DashboardLayout } from '../../Layout';
|
||||
|
||||
type AppStatus = {
|
||||
id: string;
|
||||
@@ -43,7 +43,7 @@ const CopyCommand = ({ command }: { command: string }) => {
|
||||
);
|
||||
};
|
||||
|
||||
export const Applications = () => {
|
||||
export const ResourceSettings = () => {
|
||||
const client = useClient();
|
||||
const queryClient = useQueryClient();
|
||||
const [actionInProgress, setActionInProgress] = useState<string | null>(null);
|
||||
+1
-1
@@ -3,7 +3,7 @@ import { Search, Terminal, Puzzle, Shield } from 'lucide-react';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from '@/components/ui/accordion';
|
||||
import { Card } from '@/components/Card';
|
||||
import { DashboardLayout } from '../Layout';
|
||||
import { DashboardLayout } from '../../Layout';
|
||||
import { AIHarnessesSection } from './AIHarnessesSection';
|
||||
import { PluginsSection } from './PluginsSection';
|
||||
import { TerminalSection } from './TerminalSection';
|
||||
Reference in New Issue
Block a user