Rename zoom controls configuration
This commit is contained in:
parent
69b256c35c
commit
d8f6fbaafb
@ -119,6 +119,7 @@ Application behavior can be changed by configuring the following environment var
|
||||
#### Settings
|
||||
- `NEXT_PUBLIC_GRID_HOMEPAGE = 1` shows grid layout on homepage
|
||||
- `NEXT_PUBLIC_DEFAULT_THEME = light | dark` sets preferred initial theme (defaults to `system` when not configured)
|
||||
- `NEXT_PUBLIC_ZOOM_CONTROLS = 1` enables fullscreen photo zoom controls
|
||||
- `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_GEO_PRIVACY = 1` disables collection/display of location-based data (⚠️ re-compresses uploaded images in order to remove GPS information)
|
||||
- `NEXT_PUBLIC_ALLOW_PUBLIC_DOWNLOADS = 1` enables public photo downloads for all visitors (⚠️ may result in increased bandwidth usage)
|
||||
@ -127,7 +128,6 @@ Application behavior can be changed by configuring the following environment var
|
||||
- `NEXT_PUBLIC_GRID_ASPECT_RATIO = 1.5` sets aspect ratio for grid tiles (defaults to `1`—setting to `0` removes the constraint)
|
||||
- `NEXT_PUBLIC_SHOW_LARGE_THUMBNAILS = 1` ensures large thumbnails on photo grid views
|
||||
- `NEXT_PUBLIC_OG_TEXT_ALIGNMENT = BOTTOM` keeps OG image text bottom aligned (default is top)
|
||||
- `NEXT_PUBLIC_IMAGE_ACTIONS = 1` enables fullscreen and zoom actions when clicking on an image
|
||||
|
||||
## Alternate storage providers
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ import HiddenHeader from '@/tag/HiddenHeader';
|
||||
import FocalLengthHeader from '@/focal/FocalLengthHeader';
|
||||
import PhotoHeader from './PhotoHeader';
|
||||
import { JSX } from 'react';
|
||||
import { IMAGE_ACTIONS_ENABLED } from '@/site/config';
|
||||
import { ZOOM_CONTROLS_ENABLED } from '@/site/config';
|
||||
|
||||
export default function PhotoDetailPage({
|
||||
photo,
|
||||
@ -113,7 +113,7 @@ export default function PhotoDetailPage({
|
||||
shouldShareSimulation={simulation !== undefined}
|
||||
shouldScrollOnShare={false}
|
||||
includeFavoriteInAdminMenu={includeFavoriteInAdminMenu}
|
||||
enableImageActions={IMAGE_ACTIONS_ENABLED}
|
||||
enableImageActions={ZOOM_CONTROLS_ENABLED}
|
||||
/>,
|
||||
]}
|
||||
/>
|
||||
|
||||
@ -68,6 +68,7 @@ export default function SiteChecklistClient({
|
||||
isGridHomepageEnabled,
|
||||
hasDefaultTheme,
|
||||
defaultTheme,
|
||||
areZoomControlsEnabled,
|
||||
arePhotosMatted,
|
||||
isGeoPrivacyEnabled,
|
||||
gridAspectRatio,
|
||||
@ -78,7 +79,6 @@ export default function SiteChecklistClient({
|
||||
isPublicApiEnabled,
|
||||
isPriorityOrderEnabled,
|
||||
isOgTextBottomAligned,
|
||||
isImageActionsEnabled,
|
||||
// Misc
|
||||
baseUrl,
|
||||
commitSha,
|
||||
@ -538,6 +538,15 @@ export default function SiteChecklistClient({
|
||||
(defaults to {'\'system\''}):
|
||||
{renderEnvVars(['NEXT_PUBLIC_DEFAULT_THEME'])}
|
||||
</ChecklistRow>
|
||||
<ChecklistRow
|
||||
title="Zoom controls"
|
||||
status={areZoomControlsEnabled}
|
||||
optional
|
||||
>
|
||||
Set environment variable to {'"1"'} to enable
|
||||
fullscreen photo zoom controls:
|
||||
{renderEnvVars(['NEXT_PUBLIC_ZOOM_CONTROLS'])}
|
||||
</ChecklistRow>
|
||||
<ChecklistRow
|
||||
title="Photo matting"
|
||||
status={arePhotosMatted}
|
||||
@ -613,15 +622,6 @@ export default function SiteChecklistClient({
|
||||
keep OG image text bottom aligned (default is {'"top"'}):
|
||||
{renderEnvVars(['NEXT_PUBLIC_OG_TEXT_ALIGNMENT'])}
|
||||
</ChecklistRow>
|
||||
<ChecklistRow
|
||||
title="Enable image actions"
|
||||
status={isImageActionsEnabled}
|
||||
optional
|
||||
>
|
||||
Set environment variable to {'"1"'} to enable fullscreen and zoom
|
||||
actions when clicking on an image:
|
||||
{renderEnvVars(['NEXT_PUBLIC_IMAGE_ACTIONS'])}
|
||||
</ChecklistRow>
|
||||
</Checklist>
|
||||
</>}
|
||||
</div>
|
||||
|
||||
@ -184,6 +184,8 @@ export const DEFAULT_THEME =
|
||||
: process.env.NEXT_PUBLIC_DEFAULT_THEME === 'light'
|
||||
? 'light'
|
||||
: 'system';
|
||||
export const ZOOM_CONTROLS_ENABLED =
|
||||
process.env.NEXT_PUBLIC_ZOOM_CONTROLS === '1';
|
||||
export const MATTE_PHOTOS =
|
||||
process.env.NEXT_PUBLIC_MATTE_PHOTOS === '1';
|
||||
export const GEO_PRIVACY_ENABLED =
|
||||
@ -205,8 +207,6 @@ export const PRIORITY_ORDER_ENABLED =
|
||||
process.env.NEXT_PUBLIC_IGNORE_PRIORITY_ORDER !== '1';
|
||||
export const OG_TEXT_BOTTOM_ALIGNMENT =
|
||||
(process.env.NEXT_PUBLIC_OG_TEXT_ALIGNMENT ?? '').toUpperCase() === 'BOTTOM';
|
||||
export const IMAGE_ACTIONS_ENABLED =
|
||||
process.env.NEXT_PUBLIC_IMAGE_ACTIONS === '1';
|
||||
|
||||
// INTERNAL
|
||||
|
||||
@ -272,6 +272,7 @@ export const CONFIG_CHECKLIST_STATUS = {
|
||||
isGridHomepageEnabled: GRID_HOMEPAGE_ENABLED,
|
||||
hasDefaultTheme: Boolean(process.env.NEXT_PUBLIC_DEFAULT_THEME),
|
||||
defaultTheme: DEFAULT_THEME,
|
||||
areZoomControlsEnabled: ZOOM_CONTROLS_ENABLED,
|
||||
arePhotosMatted: MATTE_PHOTOS,
|
||||
isGeoPrivacyEnabled: GEO_PRIVACY_ENABLED,
|
||||
gridAspectRatio: GRID_ASPECT_RATIO,
|
||||
@ -283,7 +284,6 @@ export const CONFIG_CHECKLIST_STATUS = {
|
||||
isPublicApiEnabled: PUBLIC_API_ENABLED,
|
||||
isPriorityOrderEnabled: PRIORITY_ORDER_ENABLED,
|
||||
isOgTextBottomAligned: OG_TEXT_BOTTOM_ALIGNMENT,
|
||||
isImageActionsEnabled: IMAGE_ACTIONS_ENABLED,
|
||||
// MISC
|
||||
baseUrl: BASE_URL,
|
||||
commitSha: VERCEL_GIT_COMMIT_SHA_SHORT,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user