Refine guest gallery UI and add multi-photo upload flow
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user