Clarify guest upload completion and retry messages
This commit is contained in:
@@ -267,14 +267,14 @@ export function GuestUpload({
|
|||||||
<Card>
|
<Card>
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
<div className="flex items-center justify-between gap-4">
|
<div className="flex items-center justify-between gap-4">
|
||||||
<CardTitle>{busy ? "Uploading your photos" : progress.failed ? "Some photos need attention" : "Photos uploaded"}</CardTitle>
|
<CardTitle>{busy ? "Uploading your photos" : progress.failed ? "Some photos didn’t upload" : "Thanks for sharing your photos!"}</CardTitle>
|
||||||
<span className="text-2xl font-semibold tabular-nums">{progress.percent}%</span>
|
<span className="text-2xl font-semibold tabular-nums">{progress.percent}%</span>
|
||||||
</div>
|
</div>
|
||||||
<CardDescription role="status">{progress.completed} of {progress.total} photos uploaded{progress.failed ? ` · ${progress.failed} need retry` : ""}</CardDescription>
|
<CardDescription role="status">{progress.completed} of {progress.total} photos uploaded{progress.failed ? ` · ${progress.failed} to retry` : ""}</CardDescription>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardContent className="flex flex-col gap-4">
|
<CardContent className="flex flex-col gap-4">
|
||||||
<Progress value={progress.percent} aria-label="Overall upload progress" />
|
<Progress value={progress.percent} aria-label="Overall upload progress" />
|
||||||
<p className="text-sm text-muted-foreground">{busy ? "Keep this page open until uploading finishes." : progress.failed ? "Open file details below to retry unsuccessful uploads." : "Your originals are saved. Gallery previews may take a moment to appear."}</p>
|
<p role="status" className="text-sm text-muted-foreground">{busy ? "Keep this page open while your photos upload. We’ll let you know when you’re all done." : progress.failed ? "Your uploaded photos are saved. Open file details below and retry the ones that didn’t upload." : "Your photos are saved. You can close this page or add more photos whenever you like."}</p>
|
||||||
<details className="group">
|
<details className="group">
|
||||||
<summary className="flex min-h-11 cursor-pointer list-none items-center justify-between gap-3 text-sm font-medium [&::-webkit-details-marker]:hidden">File details<ChevronDownIcon className="size-4 transition-transform group-open:rotate-180" aria-hidden="true" /></summary>
|
<summary className="flex min-h-11 cursor-pointer list-none items-center justify-between gap-3 text-sm font-medium [&::-webkit-details-marker]:hidden">File details<ChevronDownIcon className="size-4 transition-transform group-open:rotate-180" aria-hidden="true" /></summary>
|
||||||
<ul className="flex max-h-80 flex-col gap-4 overflow-y-auto pt-3">
|
<ul className="flex max-h-80 flex-col gap-4 overflow-y-auto pt-3">
|
||||||
@@ -282,7 +282,7 @@ export function GuestUpload({
|
|||||||
<li key={item.id} className="flex flex-col gap-1">
|
<li key={item.id} className="flex flex-col gap-1">
|
||||||
<div className="flex justify-between gap-3 text-sm">
|
<div className="flex justify-between gap-3 text-sm">
|
||||||
<span className="truncate">{item.name}</span>
|
<span className="truncate">{item.name}</span>
|
||||||
<span className="shrink-0 text-muted-foreground">{item.status === "done" ? "Uploaded · processing for gallery" : item.status === "uploading" ? `${item.progress}% uploaded` : item.status === "error" ? "Needs retry" : "Waiting"}</span>
|
<span className="shrink-0 text-muted-foreground">{item.status === "done" ? "Uploaded" : item.status === "uploading" ? item.progress >= 100 ? "Confirming upload…" : `Uploading · ${item.progress}%` : item.status === "error" ? "Couldn’t upload" : "Up next"}</span>
|
||||||
</div>
|
</div>
|
||||||
<Progress value={item.progress} />
|
<Progress value={item.progress} />
|
||||||
{item.error ? (
|
{item.error ? (
|
||||||
|
|||||||
Reference in New Issue
Block a user