Remove 'Untitled' fallback in key views
This commit is contained in:
parent
68a8568e9d
commit
e7690bdbce
@ -110,7 +110,6 @@ Application behavior can be changed by configuring the following environment var
|
|||||||
- `NEXT_PUBLIC_MATTE_PHOTOS = 1` constrains the size of each photo, and enables a surrounding border (potentially useful for photos with tall aspect ratios)
|
- `NEXT_PUBLIC_MATTE_PHOTOS = 1` constrains the size of each photo, and enables a surrounding border (potentially useful for photos with tall aspect ratios)
|
||||||
- `NEXT_PUBLIC_BLUR_DISABLED = 1` prevents image blur data being stored and displayed (potentially useful for limiting Postgres usage)
|
- `NEXT_PUBLIC_BLUR_DISABLED = 1` prevents image blur data being stored and displayed (potentially useful for limiting Postgres usage)
|
||||||
- `NEXT_PUBLIC_GEO_PRIVACY = 1` disables collection/display of location-based data (⚠️ re-compresses uploaded images in order to remove GPS information)
|
- `NEXT_PUBLIC_GEO_PRIVACY = 1` disables collection/display of location-based data (⚠️ re-compresses uploaded images in order to remove GPS information)
|
||||||
- `NEXT_PUBLIC_HIDE_TITLE_FALLBACK_TEXT = 1` prevents showing "Untitled" for photos without titles
|
|
||||||
- `NEXT_PUBLIC_IGNORE_PRIORITY_ORDER = 1` prevents `priority_order` field affecting photo order
|
- `NEXT_PUBLIC_IGNORE_PRIORITY_ORDER = 1` prevents `priority_order` field affecting photo order
|
||||||
- `NEXT_PUBLIC_PUBLIC_API = 1` enables public API available at `/api`
|
- `NEXT_PUBLIC_PUBLIC_API = 1` enables public API available at `/api`
|
||||||
- `NEXT_PUBLIC_HIDE_REPO_LINK = 1` removes footer link to repo
|
- `NEXT_PUBLIC_HIDE_REPO_LINK = 1` removes footer link to repo
|
||||||
|
|||||||
@ -25,10 +25,7 @@ import PhotoFilmSimulation from '@/simulation/PhotoFilmSimulation';
|
|||||||
import { sortTags } from '@/tag';
|
import { sortTags } from '@/tag';
|
||||||
import DivDebugBaselineGrid from '@/components/DivDebugBaselineGrid';
|
import DivDebugBaselineGrid from '@/components/DivDebugBaselineGrid';
|
||||||
import PhotoLink from './PhotoLink';
|
import PhotoLink from './PhotoLink';
|
||||||
import {
|
import { SHOULD_PREFETCH_ALL_LINKS } from '@/site/config';
|
||||||
SHOULD_PREFETCH_ALL_LINKS,
|
|
||||||
SHOW_PHOTO_TITLE_FALLBACK_TEXT,
|
|
||||||
} from '@/site/config';
|
|
||||||
import AdminPhotoMenuClient from '@/admin/AdminPhotoMenuClient';
|
import AdminPhotoMenuClient from '@/admin/AdminPhotoMenuClient';
|
||||||
import { RevalidatePhoto } from './InfinitePhotoScroll';
|
import { RevalidatePhoto } from './InfinitePhotoScroll';
|
||||||
import { useRef } from 'react';
|
import { useRef } from 'react';
|
||||||
@ -89,10 +86,9 @@ export default function PhotoLarge({
|
|||||||
|
|
||||||
const { arePhotosMatted, isUserSignedIn } = useAppState();
|
const { arePhotosMatted, isUserSignedIn } = useAppState();
|
||||||
|
|
||||||
const hasTitle = showTitle && (
|
const hasTitle =
|
||||||
Boolean(photo.title) ||
|
showTitle &&
|
||||||
SHOW_PHOTO_TITLE_FALLBACK_TEXT
|
Boolean(photo.title);
|
||||||
);
|
|
||||||
|
|
||||||
const hasTitleContent =
|
const hasTitleContent =
|
||||||
hasTitle ||
|
hasTitle ||
|
||||||
|
|||||||
@ -59,7 +59,6 @@ export default function SiteChecklistClient({
|
|||||||
arePhotosMatted,
|
arePhotosMatted,
|
||||||
isBlurEnabled,
|
isBlurEnabled,
|
||||||
isGeoPrivacyEnabled,
|
isGeoPrivacyEnabled,
|
||||||
showPhotoTitleFallbackText,
|
|
||||||
isPriorityOrderEnabled,
|
isPriorityOrderEnabled,
|
||||||
isAiTextGenerationEnabled,
|
isAiTextGenerationEnabled,
|
||||||
aiTextAutoGeneratedFields,
|
aiTextAutoGeneratedFields,
|
||||||
@ -507,15 +506,6 @@ export default function SiteChecklistClient({
|
|||||||
collection/display of location-based data:
|
collection/display of location-based data:
|
||||||
{renderEnvVars(['NEXT_PUBLIC_GEO_PRIVACY'])}
|
{renderEnvVars(['NEXT_PUBLIC_GEO_PRIVACY'])}
|
||||||
</ChecklistRow>
|
</ChecklistRow>
|
||||||
<ChecklistRow
|
|
||||||
title="Show photo title fallback text"
|
|
||||||
status={showPhotoTitleFallbackText}
|
|
||||||
optional
|
|
||||||
>
|
|
||||||
Set environment variable to {'"1"'} to prevent
|
|
||||||
showing {'"Untitled"'} for photos without titles:
|
|
||||||
{renderEnvVars(['NEXT_PUBLIC_HIDE_TITLE_FALLBACK_TEXT'])}
|
|
||||||
</ChecklistRow>
|
|
||||||
<ChecklistRow
|
<ChecklistRow
|
||||||
title="Priority order"
|
title="Priority order"
|
||||||
status={isPriorityOrderEnabled}
|
status={isPriorityOrderEnabled}
|
||||||
|
|||||||
@ -139,8 +139,6 @@ export const BLUR_ENABLED =
|
|||||||
process.env.NEXT_PUBLIC_BLUR_DISABLED !== '1';
|
process.env.NEXT_PUBLIC_BLUR_DISABLED !== '1';
|
||||||
export const GEO_PRIVACY_ENABLED =
|
export const GEO_PRIVACY_ENABLED =
|
||||||
process.env.NEXT_PUBLIC_GEO_PRIVACY === '1';
|
process.env.NEXT_PUBLIC_GEO_PRIVACY === '1';
|
||||||
export const SHOW_PHOTO_TITLE_FALLBACK_TEXT =
|
|
||||||
process.env.NEXT_PUBLIC_HIDE_TITLE_FALLBACK_TEXT !== '1';
|
|
||||||
export const AI_TEXT_GENERATION_ENABLED =
|
export const AI_TEXT_GENERATION_ENABLED =
|
||||||
Boolean(process.env.OPENAI_SECRET_KEY);
|
Boolean(process.env.OPENAI_SECRET_KEY);
|
||||||
export const AI_TEXT_AUTO_GENERATED_FIELDS = parseAiAutoGeneratedFieldsText(
|
export const AI_TEXT_AUTO_GENERATED_FIELDS = parseAiAutoGeneratedFieldsText(
|
||||||
@ -215,7 +213,6 @@ export const CONFIG_CHECKLIST_STATUS = {
|
|||||||
arePhotosMatted: MATTE_PHOTOS,
|
arePhotosMatted: MATTE_PHOTOS,
|
||||||
isBlurEnabled: BLUR_ENABLED,
|
isBlurEnabled: BLUR_ENABLED,
|
||||||
isGeoPrivacyEnabled: GEO_PRIVACY_ENABLED,
|
isGeoPrivacyEnabled: GEO_PRIVACY_ENABLED,
|
||||||
showPhotoTitleFallbackText: SHOW_PHOTO_TITLE_FALLBACK_TEXT,
|
|
||||||
isAiTextGenerationEnabled: AI_TEXT_GENERATION_ENABLED,
|
isAiTextGenerationEnabled: AI_TEXT_GENERATION_ENABLED,
|
||||||
aiTextAutoGeneratedFields: process.env.AI_TEXT_AUTO_GENERATED_FIELDS
|
aiTextAutoGeneratedFields: process.env.AI_TEXT_AUTO_GENERATED_FIELDS
|
||||||
? AI_TEXT_AUTO_GENERATED_FIELDS.length === 0
|
? AI_TEXT_AUTO_GENERATED_FIELDS.length === 0
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user