Alter sync checks
This commit is contained in:
parent
eea8f94eea
commit
a2a0c30e87
@ -24,6 +24,7 @@ import IconGrSync from '@/components/icons/IconGrSync';
|
||||
import InsightsIndicatorDot from './insights/InsightsIndicatorDot';
|
||||
import IconFavs from '@/components/icons/IconFavs';
|
||||
import IconEdit from '@/components/icons/IconEdit';
|
||||
import { photoNeedsToBeSynced } from '@/photo/sync';
|
||||
|
||||
export default function AdminPhotoMenu({
|
||||
photo,
|
||||
@ -78,7 +79,7 @@ export default function AdminPhotoMenu({
|
||||
label: 'Sync',
|
||||
labelComplex: <span className="inline-flex items-center gap-2">
|
||||
<span>Sync</span>
|
||||
{(photo.syncStatus.isOutdated || photo.syncStatus.isMissingAiText) &&
|
||||
{photoNeedsToBeSynced(photo) &&
|
||||
<InsightsIndicatorDot
|
||||
colorOverride="blue"
|
||||
className="translate-y-[1.5px]"
|
||||
|
||||
@ -16,7 +16,7 @@ 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';
|
||||
import { photoNeedsToBeSynced, photoSyncStatusText } from '@/photo/sync';
|
||||
|
||||
export default function AdminPhotosTable({
|
||||
photos,
|
||||
@ -94,7 +94,7 @@ export default function AdminPhotosTable({
|
||||
)}>
|
||||
{<>
|
||||
<PhotoDate {...{ photo, dateType, timezone }} />
|
||||
{photoHasSyncStatusText(photo) &&
|
||||
{photoNeedsToBeSynced(photo) &&
|
||||
<Tooltip
|
||||
content={photoSyncStatusText(photo)}
|
||||
classNameTrigger={clsx(
|
||||
|
||||
@ -44,7 +44,7 @@ export const generatePhotoSyncStatus = (photo: PhotoDb): PhotoSyncStatus => ({
|
||||
missingAiTextFields: getMissingAiTextFields(photo),
|
||||
});
|
||||
|
||||
export const photoHasSyncStatusText = (photo: Photo) =>
|
||||
export const photoNeedsToBeSynced = (photo: Photo) =>
|
||||
photo.syncStatus.isOutdated ||
|
||||
photo.syncStatus.missingAiTextFields.length > 0;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user