Refine guest gallery UI and add multi-photo upload flow
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled

This commit is contained in:
Codex Agent
2026-02-09 18:01:01 +01:00
parent e3bb1642db
commit 1f9a43806a
9 changed files with 369 additions and 159 deletions

View File

@@ -11,6 +11,7 @@ import { useGuestThemeVariant } from '../lib/guestTheme';
import { useLocale } from '@/shared/guest/i18n/LocaleContext';
import { useEventData } from '../context/EventDataContext';
import { fetchPendingUploadsSummary, type PendingUpload } from '@/shared/guest/services/pendingUploadsApi';
import { useSearchParams } from 'react-router-dom';
type ProgressMap = Record<number, number>;
@@ -18,6 +19,7 @@ export default function UploadQueueScreen() {
const { t } = useTranslation();
const { locale } = useLocale();
const { token } = useEventData();
const [searchParams] = useSearchParams();
const { items, loading, retryAll, clearFinished, refresh, remove } = useUploadQueue();
const [progress, setProgress] = React.useState<ProgressMap>({});
const { isDark } = useGuestThemeVariant();
@@ -80,10 +82,21 @@ export default function UploadQueueScreen() {
const activeCount = items.filter((item) => item.status !== 'done').length;
const failedCount = items.filter((item) => item.status === 'error').length;
const showNetworkRetryNotice = searchParams.get('notice') === 'network-retry';
return (
<AppShell>
<YStack gap="$4">
{showNetworkRetryNotice ? (
<SurfaceCard backgroundColor={isDark ? 'rgba(56, 189, 248, 0.14)' : 'rgba(14, 165, 233, 0.12)'}>
<Text fontSize="$3" fontWeight="$7">
{t(
'uploadQueue.networkRetryNotice',
'Upload paused due to network connection. Your image will upload automatically as soon as you are back online.'
)}
</Text>
</SurfaceCard>
) : null}
<SurfaceCard glow>
<XStack alignItems="center" justifyContent="space-between">
<XStack alignItems="center" gap="$2">