mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-02-14 12:47:33 +00:00
refactor(sidebar): move VersionUpgradeModal into SidebarModals
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { useEffect } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import VersionUpgradeModal from './modals/VersionUpgradeModal';
|
||||
import { useDeviceSettings } from '../hooks/useDeviceSettings';
|
||||
import { useVersionCheck } from '../hooks/useVersionCheck';
|
||||
import { useUiPreferences } from '../hooks/useUiPreferences';
|
||||
@@ -196,6 +195,11 @@ function Sidebar({
|
||||
sessionDeleteConfirmation={sessionDeleteConfirmation}
|
||||
onCancelDeleteSession={() => setSessionDeleteConfirmation(null)}
|
||||
onConfirmDeleteSession={confirmDeleteSession}
|
||||
showVersionModal={showVersionModal}
|
||||
onCloseVersionModal={() => setShowVersionModal(false)}
|
||||
releaseInfo={releaseInfo}
|
||||
currentVersion={currentVersion}
|
||||
latestVersion={latestVersion}
|
||||
t={t}
|
||||
/>
|
||||
|
||||
@@ -234,13 +238,6 @@ function Sidebar({
|
||||
</>
|
||||
)}
|
||||
|
||||
<VersionUpgradeModal
|
||||
isOpen={showVersionModal}
|
||||
onClose={() => setShowVersionModal(false)}
|
||||
releaseInfo={releaseInfo}
|
||||
currentVersion={currentVersion}
|
||||
latestVersion={latestVersion}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,9 @@ import type { TFunction } from 'i18next';
|
||||
import { Button } from '../ui/button';
|
||||
import ProjectCreationWizard from '../ProjectCreationWizard';
|
||||
import Settings from '../Settings';
|
||||
import VersionUpgradeModal from '../modals/VersionUpgradeModal';
|
||||
import type { Project } from '../../types/app';
|
||||
import type { ReleaseInfo } from '../../types/sharedTypes';
|
||||
import type { DeleteProjectConfirmation, SessionDeleteConfirmation } from './types';
|
||||
|
||||
type SidebarModalsProps = {
|
||||
@@ -21,6 +23,11 @@ type SidebarModalsProps = {
|
||||
sessionDeleteConfirmation: SessionDeleteConfirmation | null;
|
||||
onCancelDeleteSession: () => void;
|
||||
onConfirmDeleteSession: () => void;
|
||||
showVersionModal: boolean;
|
||||
onCloseVersionModal: () => void;
|
||||
releaseInfo: ReleaseInfo | null;
|
||||
currentVersion: string;
|
||||
latestVersion: string | null;
|
||||
t: TFunction;
|
||||
};
|
||||
|
||||
@@ -38,6 +45,11 @@ export default function SidebarModals({
|
||||
sessionDeleteConfirmation,
|
||||
onCancelDeleteSession,
|
||||
onConfirmDeleteSession,
|
||||
showVersionModal,
|
||||
onCloseVersionModal,
|
||||
releaseInfo,
|
||||
currentVersion,
|
||||
latestVersion,
|
||||
t,
|
||||
}: SidebarModalsProps) {
|
||||
return (
|
||||
@@ -155,6 +167,14 @@ export default function SidebarModals({
|
||||
</div>,
|
||||
document.body,
|
||||
)}
|
||||
|
||||
<VersionUpgradeModal
|
||||
isOpen={showVersionModal}
|
||||
onClose={onCloseVersionModal}
|
||||
releaseInfo={releaseInfo}
|
||||
currentVersion={currentVersion}
|
||||
latestVersion={latestVersion}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user