mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
ProjectDetailsDialog
This commit is contained in:
3 files changed
+32
-18
No files matched your search
@@ -11,6 +11,7 @@ import {
|
||||
MoreHorizontal,
|
||||
MessageSquarePlus,
|
||||
History,
|
||||
Folder,
|
||||
} from 'lucide-react';
|
||||
import { GitHistoryDialog } from '@/components/ai/GitHistoryDialog';
|
||||
import { GitDialog } from '@/components/GitDialog';
|
||||
@@ -19,6 +20,7 @@ interface ActionsMenuProps {
|
||||
projectId: string;
|
||||
projectName: string;
|
||||
onNewChat: () => void;
|
||||
onProjectDetails?: () => void;
|
||||
isLoading?: boolean;
|
||||
isBuildLoading?: boolean;
|
||||
disabled?: boolean;
|
||||
@@ -29,6 +31,7 @@ export function ActionsMenu({
|
||||
projectId,
|
||||
projectName: _projectName,
|
||||
onNewChat,
|
||||
onProjectDetails,
|
||||
isLoading = false,
|
||||
isBuildLoading = false,
|
||||
disabled = false,
|
||||
@@ -65,6 +68,15 @@ export function ActionsMenu({
|
||||
New Chat
|
||||
</DropdownMenuItem>
|
||||
|
||||
<DropdownMenuItem
|
||||
onClick={() => setGitHistoryOpen(true)}
|
||||
disabled={isAnyLoading}
|
||||
className="gap-2"
|
||||
>
|
||||
<History className="h-4 w-4" />
|
||||
Rollback
|
||||
</DropdownMenuItem>
|
||||
|
||||
<DropdownMenuItem
|
||||
onClick={() => setGitDialogOpen(true)}
|
||||
disabled={isAnyLoading}
|
||||
@@ -75,12 +87,12 @@ export function ActionsMenu({
|
||||
</DropdownMenuItem>
|
||||
|
||||
<DropdownMenuItem
|
||||
onClick={() => setGitHistoryOpen(true)}
|
||||
onClick={onProjectDetails}
|
||||
disabled={isAnyLoading}
|
||||
className="gap-2"
|
||||
>
|
||||
<History className="h-4 w-4" />
|
||||
Rollback
|
||||
<Folder className="h-4 w-4" />
|
||||
Project Details
|
||||
</DropdownMenuItem>
|
||||
|
||||
|
||||
|
||||
@@ -36,14 +36,14 @@ import {
|
||||
import JSZip from 'jszip';
|
||||
import { Separator } from './ui/separator';
|
||||
|
||||
interface ProjectInfoDialogProps {
|
||||
interface ProjectDetailsDialogProps {
|
||||
project: Project;
|
||||
open: boolean;
|
||||
onOpenChange: (open: boolean) => void;
|
||||
onProjectDeleted?: () => void;
|
||||
}
|
||||
|
||||
export function ProjectInfoDialog({ project, open, onOpenChange, onProjectDeleted }: ProjectInfoDialogProps) {
|
||||
export function ProjectDetailsDialog({ project, open, onOpenChange, onProjectDeleted }: ProjectDetailsDialogProps) {
|
||||
const [isExporting, setIsExporting] = useState(false);
|
||||
const [isDeleting, setIsDeleting] = useState(false);
|
||||
const [isRenaming, setIsRenaming] = useState(false);
|
||||
@@ -212,7 +212,7 @@ export function ProjectInfoDialog({ project, open, onOpenChange, onProjectDelete
|
||||
<DialogHeader>
|
||||
<DialogTitle className="flex items-center gap-2">
|
||||
<Folder className="h-5 w-5" />
|
||||
Project Info
|
||||
{project.name}
|
||||
</DialogTitle>
|
||||
</DialogHeader>
|
||||
|
||||
+14
-12
@@ -6,7 +6,7 @@ import { useProjectsManager } from '@/hooks/useProjectsManager';
|
||||
import { ChatPane, type ChatPaneRef } from '@/components/Shakespeare/ChatPane';
|
||||
import { PreviewPane } from '@/components/Shakespeare/PreviewPane';
|
||||
import { ProjectSidebar } from '@/components/ProjectSidebar';
|
||||
import { ProjectInfoDialog } from '@/components/ProjectInfoDialog';
|
||||
import { ProjectDetailsDialog } from '@/components/ProjectDetailsDialog';
|
||||
import { ResizablePanelGroup, ResizablePanel, ResizableHandle } from '@/components/ui/resizable';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Skeleton } from '@/components/ui/skeleton';
|
||||
@@ -29,7 +29,7 @@ export function ProjectView() {
|
||||
const [activeTab, setActiveTab] = useState<'preview' | 'code'>('preview');
|
||||
const [mobileView, setMobileView] = useState<'chat' | 'preview' | 'code'>('chat');
|
||||
const [isAILoading, setIsAILoading] = useState(false);
|
||||
const [isProjectInfoOpen, setIsProjectInfoOpen] = useState(false);
|
||||
const [isProjectDetailsOpen, setIsProjectDetailsOpen] = useState(false);
|
||||
const projectsManager = useProjectsManager();
|
||||
const chatPaneRef = useRef<ChatPaneRef>(null);
|
||||
const navigate = useNavigate();
|
||||
@@ -162,7 +162,7 @@ export function ProjectView() {
|
||||
<Button
|
||||
variant="ghost"
|
||||
className="block p-0 h-auto text-sm font-semibold truncate hover:bg-transparent hover:text-primary"
|
||||
onClick={() => setIsProjectInfoOpen(true)}
|
||||
onClick={() => setIsProjectDetailsOpen(true)}
|
||||
>
|
||||
{project.name}
|
||||
</Button>
|
||||
@@ -184,6 +184,7 @@ export function ProjectView() {
|
||||
projectId={project.id}
|
||||
projectName={project.name}
|
||||
onNewChat={handleNewChat}
|
||||
onProjectDetails={() => setIsProjectDetailsOpen(true)}
|
||||
isLoading={isAILoading}
|
||||
isBuildLoading={build.isPending}
|
||||
onFirstInteraction={handleFirstInteraction}
|
||||
@@ -305,12 +306,12 @@ export function ProjectView() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Project Info Dialog */}
|
||||
{/* Project Details Dialog */}
|
||||
{project && (
|
||||
<ProjectInfoDialog
|
||||
<ProjectDetailsDialog
|
||||
project={project}
|
||||
open={isProjectInfoOpen}
|
||||
onOpenChange={setIsProjectInfoOpen}
|
||||
open={isProjectDetailsOpen}
|
||||
onOpenChange={setIsProjectDetailsOpen}
|
||||
onProjectDeleted={handleProjectDeleted}
|
||||
/>
|
||||
)}
|
||||
@@ -367,7 +368,7 @@ export function ProjectView() {
|
||||
<Button
|
||||
variant="ghost"
|
||||
className="block p-0 h-auto font-semibold text-lg truncate hover:bg-transparent hover:text-primary"
|
||||
onClick={() => setIsProjectInfoOpen(true)}
|
||||
onClick={() => setIsProjectDetailsOpen(true)}
|
||||
>
|
||||
{project.name}
|
||||
</Button>
|
||||
@@ -390,6 +391,7 @@ export function ProjectView() {
|
||||
projectId={project.id}
|
||||
projectName={project.name}
|
||||
onNewChat={handleNewChat}
|
||||
onProjectDetails={() => setIsProjectDetailsOpen(true)}
|
||||
isLoading={isAILoading}
|
||||
isBuildLoading={build.isPending}
|
||||
onFirstInteraction={handleFirstInteraction}
|
||||
@@ -457,12 +459,12 @@ export function ProjectView() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Project Info Dialog */}
|
||||
{/* Project Details Dialog */}
|
||||
{project && (
|
||||
<ProjectInfoDialog
|
||||
<ProjectDetailsDialog
|
||||
project={project}
|
||||
open={isProjectInfoOpen}
|
||||
onOpenChange={setIsProjectInfoOpen}
|
||||
open={isProjectDetailsOpen}
|
||||
onOpenChange={setIsProjectDetailsOpen}
|
||||
onProjectDeleted={handleProjectDeleted}
|
||||
/>
|
||||
)}
|
||||
|
||||
Reference in new issue
Block a user