diff --git a/README.md b/README.md index 00c9b0f2..73ca9c30 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 photo sync page (`/admin/photos/sync`) 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 go to photo updates (`/admin/photos/updates`) to sync all photos that need 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. @@ -315,7 +315,7 @@ Vercel Postgres can be switched to another Postgres-compatible, pooling provider > You may need to pre-purchase credits before accessing the OpenAI API. See [Issue #110](https://github.com/sambecker/exif-photo-blog/issues/110) for discussion. #### How do I generate AI text for preexisting photos? -> Once AI text generation is configured, photos missing text will show up on the photo sync page (`/admin/photos/sync`). +> Once AI text generation is configured, photos missing text will show up in photo updates (`/admin/photos/updates`). #### Will there be support for image storage providers beyond Vercel, AWS, and Cloudflare? > At this time, there are no plans to introduce support for new storage providers. While configuring a new, AWS-compatible provider (e.g., Cloudflare R2) should not be too difficult, there's nuance to consider surrounding details like IAM, CORS, and domain configuration, which can differ slightly from platform to platform. If you’d like to contribute an implementation for a new storage provider, please open a PR. diff --git a/app/admin/photos/sync/page.tsx b/app/admin/photos/updates/page.tsx similarity index 89% rename from app/admin/photos/sync/page.tsx rename to app/admin/photos/updates/page.tsx index 877a4f02..f0851e94 100644 --- a/app/admin/photos/sync/page.tsx +++ b/app/admin/photos/updates/page.tsx @@ -4,7 +4,7 @@ import { getPhotosInNeedOfSync } from '@/photo/db/query'; export const maxDuration = 60; -export default async function AdminSyncPage() { +export default async function AdminUpdatesPage() { const photos = await getPhotosInNeedOfSync() .catch(() => []); diff --git a/src/admin/AdminAppMenu.tsx b/src/admin/AdminAppMenu.tsx index 318041da..7e3e8024 100644 --- a/src/admin/AdminAppMenu.tsx +++ b/src/admin/AdminAppMenu.tsx @@ -5,7 +5,7 @@ import { PATH_ADMIN_CONFIGURATION, PATH_ADMIN_INSIGHTS, PATH_ADMIN_PHOTOS, - PATH_ADMIN_PHOTOS_SYNC, + PATH_ADMIN_PHOTOS_UPDATES, PATH_ADMIN_RECIPES, PATH_ADMIN_TAGS, PATH_ADMIN_UPLOADS, @@ -79,6 +79,17 @@ export default function AdminAppMenu({ href: PATH_ADMIN_UPLOADS, }); } + if (photosCountNeedSync) { + items.push({ + label: 'Updates', + annotation: `${photosCountNeedSync}`, + icon: , + href: PATH_ADMIN_PHOTOS_UPDATES, + }); + } if (photosCountTotal) { items.push({ label: 'Manage Photos', @@ -142,17 +153,6 @@ export default function AdminAppMenu({ shouldPreventDefault: false, }); } - if (photosCountNeedSync) { - items.push({ - label: 'To Sync', - annotation: `${photosCountNeedSync}`, - icon: , - href: PATH_ADMIN_PHOTOS_SYNC, - }); - } items.push({ label: showAppInsightsLink diff --git a/src/admin/AdminPhotosClient.tsx b/src/admin/AdminPhotosClient.tsx index 4e4cff08..524ad0a6 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_PHOTOS_SYNC } from '@/app/paths'; +import { PATH_ADMIN_PHOTOS_UPDATES } from '@/app/paths'; import { Photo } from '@/photo'; import { StorageListResponse } from '@/platforms/storage'; import AdminUploadsTable from './AdminUploadsTable'; @@ -14,6 +14,7 @@ import { useAppState } from '@/state/AppState'; import PhotoUploadWithStatus from '@/photo/PhotoUploadWithStatus'; import { pluralize } from '@/utility/string'; import IconBroom from '@/components/icons/IconBroom'; +import ResponsiveText from '@/components/primitives/ResponsiveText'; export default function AdminPhotosClient({ photos, @@ -54,10 +55,10 @@ export default function AdminPhotosClient({ {photosCountNeedsSync > 0 && } tooltip={( pluralize(photosCountNeedsSync, 'photo') + @@ -74,7 +75,9 @@ export default function AdminPhotosClient({ spinnerClassName="text-blue-200 dark:text-blue-600/40" hideTextOnMobile={false} > - {photosCountNeedsSync} + + {pluralize(photosCountNeedsSync, 'Update')} + } {blobPhotoUrls.length > 0 && diff --git a/src/admin/AdminPhotosSyncClient.tsx b/src/admin/AdminPhotosSyncClient.tsx index 78686b61..60466810 100644 --- a/src/admin/AdminPhotosSyncClient.tsx +++ b/src/admin/AdminPhotosSyncClient.tsx @@ -44,8 +44,8 @@ export default function AdminPhotosSyncClient({ - Needs Sync ({photos.length}) + breadcrumb={ + Updates ({photos.length}) } accessory={
- Photos found: {statusText} + Photo updates: {statusText}
Sync to capture new EXIF fields, improve blur data, {' '} diff --git a/src/admin/insights/AdminAppInsightsClient.tsx b/src/admin/insights/AdminAppInsightsClient.tsx index a62bfb39..dc71d4df 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_PHOTOS_SYNC } from '@/app/paths'; +import { PATH_ADMIN_PHOTOS_UPDATES } from '@/app/paths'; import { LiaBroomSolid } from 'react-icons/lia'; import { IoMdGrid } from 'react-icons/io'; import { RiSpeedMiniLine } from 'react-icons/ri'; @@ -440,12 +440,12 @@ export default function AdminAppInsightsClient({ 'blue', )} {' '} - to sync + with updates {renderTooltipContent(<> Missing data or AI‑generated text )} } - expandPath={PATH_ADMIN_PHOTOS_SYNC} + expandPath={PATH_ADMIN_PHOTOS_UPDATES} />}