实现项目真机预览与待审版本扫码验收
需求:接管客户端未提交 WIP,保留真机预览,移除旧登录原型并维持 2.0.0。 实现:由 Main 核对项目与精确 Release,签发短时 Owner preview;补充一键提交映射能力及 Windows ZIP 预检兼容。
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { useCallback, useMemo, useState } from 'react';
|
||||
import { Archive, ChevronRight, Pin, Plus, RotateCcw, Settings as SettingsIcon, Trash2 } from 'lucide-react';
|
||||
import { Archive, ChevronRight, Pin, Plus, RotateCcw, Settings as SettingsIcon, Smartphone, Trash2 } from 'lucide-react';
|
||||
import { toast } from 'sonner';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { Button } from '@/components/ui/button';
|
||||
@@ -47,6 +47,7 @@ type AgentConversationSidebarProps = {
|
||||
onRestoreSession: (sessionId: string) => Promise<void>;
|
||||
onDeleteSession: (sessionId: string) => Promise<void>;
|
||||
onTogglePinAgent: (agent: ProjectAgentConfig) => Promise<void>;
|
||||
onOpenDevicePreview?: () => void;
|
||||
onOpenProjectSettings?: () => void;
|
||||
};
|
||||
|
||||
@@ -120,6 +121,7 @@ export function AgentConversationSidebar({
|
||||
onRestoreSession,
|
||||
onDeleteSession,
|
||||
onTogglePinAgent,
|
||||
onOpenDevicePreview,
|
||||
onOpenProjectSettings,
|
||||
}: AgentConversationSidebarProps) {
|
||||
const [createOpen, setCreateOpen] = useState(false);
|
||||
@@ -263,11 +265,16 @@ export function AgentConversationSidebar({
|
||||
|
||||
return (
|
||||
<aside className="flex h-full min-h-0 w-full shrink-0 flex-col overflow-hidden rounded-none border-r border-border/80 bg-surface-tertiary text-foreground lg:w-[19rem]" data-testid="agent-conversation-sidebar">
|
||||
<div className="relative flex shrink-0 items-center border-b border-border/70 bg-background/70 px-3 py-3 pr-24">
|
||||
<div className="relative flex shrink-0 items-center border-b border-border/70 bg-background/70 px-3 py-3 pr-28">
|
||||
<h2 className="min-w-0 truncate text-left text-base font-semibold">我的项目空间</h2>
|
||||
<div className="absolute right-3 flex items-center gap-1">
|
||||
{onOpenDevicePreview ? (
|
||||
<Button type="button" size="icon" variant="ghost" className="h-10 w-10 rounded-full text-muted-foreground hover:bg-surface-subtle hover:text-foreground active:scale-[0.96]" aria-label="真机预览" title="真机预览" onClick={onOpenDevicePreview}>
|
||||
<Smartphone className="h-4 w-4" />
|
||||
</Button>
|
||||
) : null}
|
||||
{onOpenProjectSettings ? (
|
||||
<Button type="button" size="icon" variant="ghost" className="h-8 w-8 rounded-full text-muted-foreground hover:bg-surface-subtle hover:text-foreground" aria-label="项目设置" title="项目设置" onClick={onOpenProjectSettings}>
|
||||
<Button type="button" size="icon" variant="ghost" className="h-10 w-10 rounded-full text-muted-foreground hover:bg-surface-subtle hover:text-foreground active:scale-[0.96]" aria-label="项目设置" title="项目设置" onClick={onOpenProjectSettings}>
|
||||
<SettingsIcon className="h-4 w-4" />
|
||||
</Button>
|
||||
) : null}
|
||||
|
||||
Reference in New Issue
Block a user