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_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_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_PUBLIC_API = 1` enables public API available at `/api`
|
||||
- `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 DivDebugBaselineGrid from '@/components/DivDebugBaselineGrid';
|
||||
import PhotoLink from './PhotoLink';
|
||||
import {
|
||||
SHOULD_PREFETCH_ALL_LINKS,
|
||||
SHOW_PHOTO_TITLE_FALLBACK_TEXT,
|
||||
} from '@/site/config';
|
||||
import { SHOULD_PREFETCH_ALL_LINKS } from '@/site/config';
|
||||
import AdminPhotoMenuClient from '@/admin/AdminPhotoMenuClient';
|
||||
import { RevalidatePhoto } from './InfinitePhotoScroll';
|
||||
import { useRef } from 'react';
|
||||
@ -89,10 +86,9 @@ export default function PhotoLarge({
|
||||
|
||||
const { arePhotosMatted, isUserSignedIn } = useAppState();
|
||||
|
||||
const hasTitle = showTitle && (
|
||||
Boolean(photo.title) ||
|
||||
SHOW_PHOTO_TITLE_FALLBACK_TEXT
|
||||
);
|
||||
const hasTitle =
|
||||
showTitle &&
|
||||
Boolean(photo.title);
|
||||
|
||||
const hasTitleContent =
|
||||
hasTitle ||
|
||||
|
||||
@ -59,7 +59,6 @@ export default function SiteChecklistClient({
|
||||
arePhotosMatted,
|
||||
isBlurEnabled,
|
||||
isGeoPrivacyEnabled,
|
||||
showPhotoTitleFallbackText,
|
||||
isPriorityOrderEnabled,
|
||||
isAiTextGenerationEnabled,
|
||||
aiTextAutoGeneratedFields,
|
||||
@ -507,15 +506,6 @@ export default function SiteChecklistClient({
|
||||
collection/display of location-based data:
|
||||
{renderEnvVars(['NEXT_PUBLIC_GEO_PRIVACY'])}
|
||||
</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
|
||||
title="Priority order"
|
||||
status={isPriorityOrderEnabled}
|
||||
|
||||
@ -139,8 +139,6 @@ export const BLUR_ENABLED =
|
||||
process.env.NEXT_PUBLIC_BLUR_DISABLED !== '1';
|
||||
export const GEO_PRIVACY_ENABLED =
|
||||
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 =
|
||||
Boolean(process.env.OPENAI_SECRET_KEY);
|
||||
export const AI_TEXT_AUTO_GENERATED_FIELDS = parseAiAutoGeneratedFieldsText(
|
||||
@ -215,7 +213,6 @@ export const CONFIG_CHECKLIST_STATUS = {
|
||||
arePhotosMatted: MATTE_PHOTOS,
|
||||
isBlurEnabled: BLUR_ENABLED,
|
||||
isGeoPrivacyEnabled: GEO_PRIVACY_ENABLED,
|
||||
showPhotoTitleFallbackText: SHOW_PHOTO_TITLE_FALLBACK_TEXT,
|
||||
isAiTextGenerationEnabled: AI_TEXT_GENERATION_ENABLED,
|
||||
aiTextAutoGeneratedFields: process.env.AI_TEXT_AUTO_GENERATED_FIELDS
|
||||
? AI_TEXT_AUTO_GENERATED_FIELDS.length === 0
|
||||
|
||||
Loading…
Reference in New Issue
Block a user