diff --git a/app/settings/core/ControlPanel.tsx b/app/settings/core/ControlPanel.tsx index 6394378d..46201395 100644 --- a/app/settings/core/ControlPanel.tsx +++ b/app/settings/core/ControlPanel.tsx @@ -10,21 +10,27 @@ import { useNotifications } from '~/shared/hooks/useNotifications'; import { useConnectionStatus } from '~/shared/hooks/useConnectionStatus'; import { tabConfigurationStore, resetTabConfiguration } from '~/settings/stores/settings'; import { profileStore } from '~/shared/stores/profile'; -import type { TabType, TabVisibilityConfig, Profile } from './types'; +import type { TabType, Profile } from './types'; import { TAB_LABELS, DEFAULT_TAB_CONFIG } from './constants'; import { DialogTitle } from '~/shared/components/ui/Dialog'; import { AvatarDropdown } from './AvatarDropdown'; import BackgroundRays from '~/shared/components/ui/BackgroundRays'; +// Import tab content components +import ProfileTab from '~/settings/tabs/profile/ProfileTab'; +import SettingsTab from '~/settings/tabs/settings/SettingsTab'; +import NotificationsTab from '~/settings/tabs/notifications/NotificationsTab'; +import FeaturesTab from '~/settings/tabs/features/FeaturesTab'; +import { DataTab } from '~/settings/tabs/data/DataTab'; +import ConnectionsTab from '~/settings/tabs/connections/ConnectionsTab'; +import LocalProvidersTab from '~/settings/tabs/providers/local/LocalProvidersTab'; +import CloudProvidersTab from '~/settings/tabs/providers/cloud/CloudProvidersTab'; + interface ControlPanelProps { open: boolean; onClose: () => void; } -interface TabWithDevType extends TabVisibilityConfig { - isExtraDevTab?: boolean; -} - const TAB_DESCRIPTIONS: Record = { profile: 'Manage your profile and account settings', settings: 'Configure application preferences', @@ -45,6 +51,30 @@ const BetaLabel = () => ( ); +// Add this function to render tab content +const renderTabContent = (activeTab: TabType) => { + switch (activeTab) { + case 'profile': + return ; + case 'settings': + return ; + case 'notifications': + return ; + case 'features': + return ; + case 'data': + return ; + case 'connection': + return ; + case 'cloud-providers': + return ; + case 'local-providers': + return ; + default: + return null; + } +}; + export const ControlPanel = ({ open, onClose }: ControlPanelProps) => { // State const [activeTab, setActiveTab] = useState(null); @@ -294,6 +324,8 @@ export const ControlPanel = ({ open, onClose }: ControlPanelProps) => { > {showTabManagement ? ( + ) : activeTab ? ( + renderTabContent(activeTab) ) : ( { animate="visible" > - {(visibleTabs as TabWithDevType[]).map((tab: TabWithDevType) => ( + {visibleTabs.map((tab) => (