Skip to content

Commit ff7b9b3

Browse files
esmcelroyCopilot
andcommitted
fix: move photo grid below upload area with sticky settings sidebar
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent eb31507 commit ff7b9b3

1 file changed

Lines changed: 47 additions & 44 deletions

File tree

src/App.tsx

Lines changed: 47 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ export default function App() {
189189
</header>
190190

191191
<main className="max-w-6xl mx-auto px-4 py-6 space-y-6">
192-
{/* Upload + Settings */}
193192
<div className="grid grid-cols-1 md:grid-cols-[1fr_320px] gap-6 items-start">
193+
{/* Left column: Upload, Preview, Grid */}
194194
<div className="space-y-4">
195195
<PhotoUpload onPhotosAdded={handlePhotosAdded} currentCount={photos.length} />
196196

@@ -203,54 +203,57 @@ export default function App() {
203203
</button>
204204
</div>
205205
)}
206-
</div>
207206

208-
<PaddingSettingsPanel
209-
settings={settings}
210-
onChange={s => { setSettings(s); setIsProcessed(false); }}
211-
onProcess={handleProcess}
212-
isProcessing={isProcessing}
213-
hasPhotos={photos.length > 0}
214-
/>
215-
</div>
207+
{/* Progress */}
208+
{isProcessing && (
209+
<div className="space-y-2">
210+
<div className="flex justify-between text-xs text-gray-600 dark:text-gray-400">
211+
<span>Processing images…</span>
212+
<span>{progress}%</span>
213+
</div>
214+
<div className="h-2 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden">
215+
<div
216+
className="h-full bg-indigo-500 rounded-full transition-all duration-200"
217+
style={{ width: `${progress}%` }}
218+
/>
219+
</div>
220+
</div>
221+
)}
216222

217-
{/* Progress */}
218-
{isProcessing && (
219-
<div className="space-y-2">
220-
<div className="flex justify-between text-xs text-gray-600 dark:text-gray-400">
221-
<span>Processing images…</span>
222-
<span>{progress}%</span>
223-
</div>
224-
<div className="h-2 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden">
225-
<div
226-
className="h-full bg-indigo-500 rounded-full transition-all duration-200"
227-
style={{ width: `${progress}%` }}
228-
/>
229-
</div>
230-
</div>
231-
)}
223+
{/* Download all */}
224+
{isProcessed && photos.some(p => p.paddedDataUrl) && (
225+
<div className="flex justify-end">
226+
<button
227+
onClick={handleDownloadAll}
228+
className="flex items-center gap-2 bg-emerald-600 hover:bg-emerald-700 text-white font-medium py-2 px-5 rounded-lg text-sm transition-colors"
229+
>
230+
<Download className="w-4 h-4" />
231+
Download All as ZIP
232+
</button>
233+
</div>
234+
)}
232235

233-
{/* Download all */}
234-
{isProcessed && photos.some(p => p.paddedDataUrl) && (
235-
<div className="flex justify-end">
236-
<button
237-
onClick={handleDownloadAll}
238-
className="flex items-center gap-2 bg-emerald-600 hover:bg-emerald-700 text-white font-medium py-2 px-5 rounded-lg text-sm transition-colors"
239-
>
240-
<Download className="w-4 h-4" />
241-
Download All as ZIP
242-
</button>
236+
{/* Photo grid */}
237+
<PhotoGrid
238+
photos={photos}
239+
maxAspectRatio={maxAspectRatio}
240+
onRemove={handleRemove}
241+
isProcessed={isProcessed}
242+
outputFormat={settings.outputFormat}
243+
/>
243244
</div>
244-
)}
245245

246-
{/* Photo grid */}
247-
<PhotoGrid
248-
photos={photos}
249-
maxAspectRatio={maxAspectRatio}
250-
onRemove={handleRemove}
251-
isProcessed={isProcessed}
252-
outputFormat={settings.outputFormat}
253-
/>
246+
{/* Right column: Settings */}
247+
<div className="md:sticky md:top-4">
248+
<PaddingSettingsPanel
249+
settings={settings}
250+
onChange={s => { setSettings(s); setIsProcessed(false); }}
251+
onProcess={handleProcess}
252+
isProcessing={isProcessing}
253+
hasPhotos={photos.length > 0}
254+
/>
255+
</div>
256+
</div>
254257
</main>
255258

256259
<AppFooter />

0 commit comments

Comments
 (0)