diff --git a/README.md b/README.md index 810bb866..1c03c07e 100644 --- a/README.md +++ b/README.md @@ -267,7 +267,7 @@ Vercel Postgres can be switched to another Postgres-compatible, pooling provider > There have been reports ([Issue 184](https://github.com/sambecker/exif-photo-blog/issues/184#issuecomment-2629474045) + [185](https://github.com/sambecker/exif-photo-blog/issues/185#issuecomment-2629478570)) that having large photos (over 30MB), or a CDN, e.g., Cloudflare in front of Vercel, may destabilize static optimization. #### Why don't my older photos look right? -> As the template has evolved, EXIF fields (such as lenses) have been added, blur data is generated through a different method, and AI/privacy features have been added. In order to bring older photos up to date, either click the 'sync' button next to a photo or use the outdated photo page (`/admin/outdated`) to make batch updates. +> As the template has evolved, EXIF fields (such as lenses) have been added, blur data is generated through a different method, and AI/privacy features have been added. In order to bring older photos up to date, either click the 'sync' button next to a photo or use the photo sync page (`/admin/photos/sync`) to make batch updates. #### Why don't my OG images load when I share a link? > Many services such as iMessage, Slack, and X, require near-instant responses when unfurling link-based content. In order to guarantee sufficient responsiveness, consider rendering pages and image assets ahead of time by enabling static optimization by setting `NEXT_PUBLIC_STATICALLY_OPTIMIZE_PHOTOS = 1` and `NEXT_PUBLIC_STATICALLY_OPTIMIZE_PHOTO_OG_IMAGES = 1`. Keep in mind that this will increase platform usage. diff --git a/app/admin/outdated/page.tsx b/app/admin/photos/sync/page.tsx similarity index 67% rename from app/admin/outdated/page.tsx rename to app/admin/photos/sync/page.tsx index 4f012dca..2b103ce0 100644 --- a/app/admin/outdated/page.tsx +++ b/app/admin/photos/sync/page.tsx @@ -1,15 +1,15 @@ -import AdminOutdatedClient from '@/admin/AdminOutdatedClient'; +import AdminPhotosSyncClient from '@/admin/AdminPhotosSyncClient'; import { AI_TEXT_GENERATION_ENABLED } from '@/app/config'; import { getOutdatedPhotos } from '@/photo/db/query'; export const maxDuration = 60; -export default async function AdminOutdatedPage() { +export default async function AdminSyncPage() { const photos = await getOutdatedPhotos() .catch(() => []); return ( - diff --git a/src/admin/AdminPhotosClient.tsx b/src/admin/AdminPhotosClient.tsx index 100567a8..734e53e2 100644 --- a/src/admin/AdminPhotosClient.tsx +++ b/src/admin/AdminPhotosClient.tsx @@ -5,7 +5,7 @@ import AppGrid from '@/components/AppGrid'; import AdminPhotosTable from '@/admin/AdminPhotosTable'; import AdminPhotosTableInfinite from '@/admin/AdminPhotosTableInfinite'; import PathLoaderButton from '@/components/primitives/PathLoaderButton'; -import { PATH_ADMIN_OUTDATED } from '@/app/paths'; +import { PATH_ADMIN_PHOTOS_SYNC } from '@/app/paths'; import { Photo } from '@/photo'; import { StorageListResponse } from '@/platforms/storage'; import { LiaBroomSolid } from 'react-icons/lia'; @@ -53,11 +53,13 @@ export default function AdminPhotosClient({ {photosCountOutdated > 0 && } + // TODO: Add tooltip + // TODO: Use LinkWithStatus title={`${photosCountOutdated} Outdated Photos`} className={clsx( 'text-blue-600 dark:text-blue-400', diff --git a/src/admin/AdminOutdatedClient.tsx b/src/admin/AdminPhotosSyncClient.tsx similarity index 89% rename from src/admin/AdminOutdatedClient.tsx rename to src/admin/AdminPhotosSyncClient.tsx index 512c65f1..dee1f686 100644 --- a/src/admin/AdminOutdatedClient.tsx +++ b/src/admin/AdminPhotosSyncClient.tsx @@ -15,7 +15,7 @@ import { LiaBroomSolid } from 'react-icons/lia'; const UPDATE_BATCH_SIZE_MAX = 4; -export default function AdminOutdatedClient({ +export default function AdminPhotosSyncClient({ photos, hasAiTextGeneration, }: { @@ -34,14 +34,9 @@ export default function AdminOutdatedClient({ - - Outdated ({photos.length}) - - - Outdated - - } + breadcrumb={ + Need Sync ({photos.length}) + } accessory={} @@ -84,9 +79,11 @@ export default function AdminOutdatedClient({ >
- {photos.length} outdated + {photos.length} {' '} - {photos.length === 1 ? 'photo' : 'photos'} found + {photos.length === 1 ? 'photo' : 'photos'} + {' '} + could benefit from being synced
Sync photos to import newer EXIF fields, improve blur data, {' '} diff --git a/src/admin/insights/AdminAppInsightsClient.tsx b/src/admin/insights/AdminAppInsightsClient.tsx index 9801b5ad..45e73690 100644 --- a/src/admin/insights/AdminAppInsightsClient.tsx +++ b/src/admin/insights/AdminAppInsightsClient.tsx @@ -28,7 +28,7 @@ import { import EnvVar from '@/components/EnvVar'; import { IoSyncCircle } from 'react-icons/io5'; import clsx from 'clsx/lite'; -import { PATH_ADMIN_OUTDATED } from '@/app/paths'; +import { PATH_ADMIN_PHOTOS_SYNC } from '@/app/paths'; import { LiaBroomSolid } from 'react-icons/lia'; import { IoMdGrid } from 'react-icons/io'; import { RiSpeedMiniLine } from 'react-icons/ri'; @@ -428,11 +428,11 @@ export default function AdminAppInsightsClient({ content={renderHighlightText( pluralize( photosCountOutdated || DEBUG_PHOTOS_COUNT_OUTDATED, - 'outdated photo', - ), + 'photo', + ) + ' need to be synced', 'blue', )} - expandPath={PATH_ADMIN_OUTDATED} + expandPath={PATH_ADMIN_PHOTOS_SYNC} />}