Sync photos to import newer EXIF fields, improve blur data,
{' '}
- and leverage AI-generated text where possible
+ and generate AI text when configured
@@ -95,7 +95,7 @@ export default function AdminPhotosSyncClient({
hasAiTextGeneration={hasAiTextGeneration}
canEdit={false}
canDelete={false}
- showUpdatedAt
+ dateType="updatedAt"
/>
diff --git a/src/admin/AdminPhotosTable.tsx b/src/admin/AdminPhotosTable.tsx
index 0c93e850..85e82acc 100644
--- a/src/admin/AdminPhotosTable.tsx
+++ b/src/admin/AdminPhotosTable.tsx
@@ -15,6 +15,8 @@ import PhotoSyncButton from './PhotoSyncButton';
import DeletePhotoButton from './DeletePhotoButton';
import { Timezone } from '@/utility/timezone';
import IconHidden from '@/components/icons/IconHidden';
+import Tooltip from '@/components/Tooltip';
+import { photoHasSyncStatusText, photoSyncStatusText } from '@/photo/sync';
export default function AdminPhotosTable({
photos,
@@ -22,7 +24,7 @@ export default function AdminPhotosTable({
revalidatePhoto,
photoIdsSyncing = [],
hasAiTextGeneration,
- showUpdatedAt,
+ dateType = 'createdAt',
canEdit = true,
canDelete = true,
timezone,
@@ -32,7 +34,7 @@ export default function AdminPhotosTable({
revalidatePhoto?: RevalidatePhoto
photoIdsSyncing?: string[]
hasAiTextGeneration: boolean
- showUpdatedAt?: boolean
+ dateType?: 'createdAt' | 'updatedAt'
canEdit?: boolean
canDelete?: boolean
timezone?: Timezone
@@ -90,11 +92,20 @@ export default function AdminPhotosTable({
'lg:w-[50%] uppercase',
'text-dim',
)}>
-
+ {<>
+
+ {photoHasSyncStatusText(photo) && }
+ >}
- {children ?? }
+ {children ?? }
);
}
diff --git a/src/components/icons/IconBroom.tsx b/src/components/icons/IconBroom.tsx
new file mode 100644
index 00000000..fbb7c29e
--- /dev/null
+++ b/src/components/icons/IconBroom.tsx
@@ -0,0 +1,6 @@
+import { IconBaseProps } from 'react-icons';
+import { LiaBroomSolid } from 'react-icons/lia';
+
+export default function IconBroom(props: IconBaseProps) {
+ return ;
+}
diff --git a/src/photo/sync.ts b/src/photo/sync.ts
index 4fb6d14e..d28dcbce 100644
--- a/src/photo/sync.ts
+++ b/src/photo/sync.ts
@@ -1,5 +1,5 @@
import { MAKE_FUJIFILM } from '@/platforms/fujifilm';
-import { PhotoDb } from '.';
+import { Photo, PhotoDb } from '.';
import { AI_TEXT_AUTO_GENERATED_FIELDS } from '@/app/config';
export interface PhotoSyncStatus {
@@ -34,3 +34,17 @@ export const generatePhotoSyncStatus = (photo: PhotoDb): PhotoSyncStatus => ({
isOutdated: isPhotoOutdated(photo),
isMissingAiText: doesPhotoNeedAiText(photo),
});
+
+export const photoHasSyncStatusText = (photo: Photo) =>
+ photo.syncStatus.isOutdated || photo.syncStatus.isMissingAiText;
+
+export const photoSyncStatusText = (photo: Photo) => {
+ const { isOutdated, isMissingAiText } = photo.syncStatus;
+ const text: string[] = [];
+ if (isOutdated) {
+ text.push('Outdated');
+ } else if (isMissingAiText) {
+ text.push('Missing AI Text');
+ }
+ return text.join(' and ');
+};