You've already forked Nano-Banana-AI-Image-Editor
新增 历史记录删除功能
This commit is contained in:
10
src/App.tsx
10
src/App.tsx
@@ -22,7 +22,7 @@ const queryClient = new QueryClient({
|
||||
function AppContent() {
|
||||
useKeyboardShortcuts();
|
||||
|
||||
const { showPromptPanel, setShowPromptPanel, setShowHistory } = useAppStore();
|
||||
const { showPromptPanel, setShowPromptPanel, showHistory, setShowHistory } = useAppStore();
|
||||
const [hoveredImage, setHoveredImage] = useState<{url: string, title: string, width?: number, height?: number} | null>(null);
|
||||
const [previewPosition, setPreviewPosition] = useState<{x: number, y: number} | null>(null);
|
||||
const [isPreviewVisible, setIsPreviewVisible] = useState(false);
|
||||
@@ -95,8 +95,8 @@ function AppContent() {
|
||||
</div>
|
||||
|
||||
<div className="flex-1 flex overflow-hidden p-4 gap-4 relative">
|
||||
<div className={cn("flex-shrink-0 transition-all duration-300 ease-in-out", !showPromptPanel && "w-8")}>
|
||||
<div className="h-full card card-lg">
|
||||
<div className={cn("flex-shrink-0 transition-all duration-300 ease-in-out overflow-hidden", showPromptPanel ? "w-72" : "w-8")}>
|
||||
<div className={cn("h-full", showPromptPanel ? "card card-lg" : "")}>
|
||||
<PromptComposer />
|
||||
</div>
|
||||
</div>
|
||||
@@ -105,8 +105,8 @@ function AppContent() {
|
||||
<ImageCanvas />
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex-shrink-0">
|
||||
<div className="h-full card card-lg">
|
||||
<div className={cn("flex-shrink-0 transition-all duration-300 ease-in-out overflow-hidden", showHistory ? "w-72" : "w-8")}>
|
||||
<div className={cn("h-full", showHistory ? "card card-lg" : "")}>
|
||||
<HistoryPanel setHoveredImage={setHoveredImage} setPreviewPosition={setPreviewPosition} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user