diff --git a/app/admin/photos/page.tsx b/app/admin/photos/page.tsx index 7b367166..9d5680bd 100644 --- a/app/admin/photos/page.tsx +++ b/app/admin/photos/page.tsx @@ -23,7 +23,7 @@ export default async function AdminPhotosPage() { const [ photos, photosCount, - photosCountOutdated, + photosCountNeedsSync, blobPhotoUrls, ] = await Promise.all([ getPhotos({ @@ -45,7 +45,7 @@ export default async function AdminPhotosPage() { { diff --git a/src/admin/AdminPhotosClient.tsx b/src/admin/AdminPhotosClient.tsx index 07d3e251..ac500d94 100644 --- a/src/admin/AdminPhotosClient.tsx +++ b/src/admin/AdminPhotosClient.tsx @@ -18,7 +18,7 @@ import IconBroom from '@/components/icons/IconBroom'; export default function AdminPhotosClient({ photos, photosCount, - photosCountOutdated, + photosCountNeedsSync, blobPhotoUrls, shouldResize, hasAiTextGeneration, @@ -29,7 +29,7 @@ export default function AdminPhotosClient({ }: { photos: Photo[] photosCount: number - photosCountOutdated: number + photosCountNeedsSync: number blobPhotoUrls: StorageListResponse shouldResize: boolean hasAiTextGeneration: boolean @@ -52,7 +52,7 @@ export default function AdminPhotosClient({ onLastUpload={onLastUpload} /> - {photosCountOutdated > 0 && + {photosCountNeedsSync > 0 && } tooltip={( - pluralize(photosCountOutdated, 'photo') + + pluralize(photosCountNeedsSync, 'photo') + ' needs sync' )} className={clsx( @@ -74,7 +74,7 @@ export default function AdminPhotosClient({ spinnerClassName="text-blue-200 dark:text-blue-600/40" hideTextOnMobile={false} > - {photosCountOutdated} + {photosCountNeedsSync} } {blobPhotoUrls.length > 0 && diff --git a/src/admin/AdminPhotosSyncClient.tsx b/src/admin/AdminPhotosSyncClient.tsx index 1e17068c..c9e89e4e 100644 --- a/src/admin/AdminPhotosSyncClient.tsx +++ b/src/admin/AdminPhotosSyncClient.tsx @@ -13,6 +13,7 @@ import ResponsiveText from '@/components/primitives/ResponsiveText'; import { LiaBroomSolid } from 'react-icons/lia'; import ProgressButton from '@/components/primitives/ProgressButton'; import ErrorNote from '@/components/ErrorNote'; +import { pluralize } from '@/utility/string'; const SYNC_BATCH_SIZE_MAX = 3; @@ -48,12 +49,13 @@ export default function AdminPhotosSyncClient({ icon={} hideTextOnMobile={false} progress={progress} + tooltip={`Sync data for all ${pluralize(photos.length, 'photo')}`} onClick={async () => { if (window.confirm([ 'Are you sure you want to sync', photos.length === 1 - ? '1 outdated photo?' - : `all ${photos.length} outdated photos?`, + ? '1 photo?' + : `all ${photos.length} photos?`, 'Browser must remain open while syncing.', 'This action cannot be undone.', ].join(' '))) {