mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-02-15 13:17:32 +00:00
refactor(sidebar): integrate settings modal into SidebarModals and update props
This commit is contained in:
@@ -3,9 +3,15 @@ import { AlertTriangle, Trash2 } from 'lucide-react';
|
||||
import type { TFunction } from 'i18next';
|
||||
import { Button } from '../ui/button';
|
||||
import ProjectCreationWizard from '../ProjectCreationWizard';
|
||||
import Settings from '../Settings';
|
||||
import type { Project } from '../../types/app';
|
||||
import type { DeleteProjectConfirmation, SessionDeleteConfirmation } from './types';
|
||||
|
||||
type SidebarModalsProps = {
|
||||
projects: Project[];
|
||||
showSettings: boolean;
|
||||
settingsInitialTab: string;
|
||||
onCloseSettings: () => void;
|
||||
showNewProject: boolean;
|
||||
onCloseNewProject: () => void;
|
||||
onProjectCreated: () => void;
|
||||
@@ -19,6 +25,10 @@ type SidebarModalsProps = {
|
||||
};
|
||||
|
||||
export default function SidebarModals({
|
||||
projects,
|
||||
showSettings,
|
||||
settingsInitialTab,
|
||||
onCloseSettings,
|
||||
showNewProject,
|
||||
onCloseNewProject,
|
||||
onProjectCreated,
|
||||
@@ -41,6 +51,13 @@ export default function SidebarModals({
|
||||
document.body,
|
||||
)}
|
||||
|
||||
<Settings
|
||||
isOpen={showSettings}
|
||||
onClose={onCloseSettings}
|
||||
projects={projects as any}
|
||||
initialTab={settingsInitialTab}
|
||||
/>
|
||||
|
||||
{deleteConfirmation &&
|
||||
ReactDOM.createPortal(
|
||||
<div className="fixed inset-0 bg-black/60 backdrop-blur-sm flex items-center justify-center z-50 p-4">
|
||||
|
||||
@@ -35,6 +35,9 @@ export type SidebarProps = {
|
||||
loadingProgress: LoadingProgress | null;
|
||||
onRefresh: () => Promise<void> | void;
|
||||
onShowSettings: () => void;
|
||||
showSettings: boolean;
|
||||
settingsInitialTab: string;
|
||||
onCloseSettings: () => void;
|
||||
isMobile: boolean;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user