/workspaces refactor
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
import { Switch } from '@/components/ui/switch';
|
||||
import { useServerSettings } from '@/state/useServerSettings';
|
||||
|
||||
export const TerminalSection = () => {
|
||||
const { terminalSandboxed, saveSettings } = useServerSettings();
|
||||
|
||||
const toggleSandbox = (checked: boolean) => {
|
||||
saveSettings({ terminalSandboxed: checked });
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="flex items-center justify-between gap-4">
|
||||
<div>
|
||||
<div className="text-sm font-medium text-duck-dark">Sandbox terminal (Docker)</div>
|
||||
<div className="text-xs text-duck-dark/50">Restrict terminal access to the user's home directory.</div>
|
||||
</div>
|
||||
<Switch checked={terminalSandboxed === true} onCheckedChange={toggleSandbox} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -1,17 +1,15 @@
|
||||
import { useMemo } from 'react';
|
||||
import { Terminal, Shield, Server } from 'lucide-react';
|
||||
import { Terminal, Server } from 'lucide-react';
|
||||
import type { LayoutNode, PanelComponents } from '@/components/Workspace';
|
||||
import { WorkspaceLayout } from '@/components/Workspace';
|
||||
import { appRegistry } from '../../Workspaces/app-registry';
|
||||
import { createSettingsPanelComponents, type SettingsSection } from '../SettingsPanel';
|
||||
import { AIHarnessesSection } from './AIHarnessesSection';
|
||||
import { TerminalSection } from './TerminalSection';
|
||||
|
||||
const GLOBAL_KEY = 'SERVER_SETTINGS_SELECTED';
|
||||
|
||||
const sections: SettingsSection[] = [
|
||||
{ key: 'ai-harnesses', icon: Terminal, title: 'AI Harnesses', description: 'AI coding tools setup', content: <AIHarnessesSection /> },
|
||||
{ key: 'terminal', icon: Shield, title: 'Terminal', description: 'Sandbox and access controls', content: <TerminalSection /> },
|
||||
];
|
||||
|
||||
const { Sidebar, Content } = createSettingsPanelComponents({
|
||||
|
||||
Reference in New Issue
Block a user