Document lens configuration
This commit is contained in:
parent
ee265f1f33
commit
4849d591d3
10
README.md
10
README.md
@ -125,7 +125,15 @@ Application behavior can be changed by configuring the following environment var
|
||||
- `NEXT_PUBLIC_MATTE_PHOTOS = 1` constrains the size of each photo, and displays a surrounding border (potentially useful for photos with tall aspect ratios)
|
||||
|
||||
#### Display
|
||||
- `NEXT_PUBLIC_CATEGORY_VISIBILITY` controls which photos sets appear in the grid sidebar and CMD-K menu, and in what order. Default value is `tags,cameras,recipes,films`. As an example, you could move cameras above tags, and hide film simulations, by updating this value to `cameras,tags,recipes`.
|
||||
- `NEXT_PUBLIC_CATEGORY_VISIBILITY`
|
||||
- Comma-separated value controlling which photos sets appear in grid sidebar and CMD-K menu, and in what order. For example, you could move cameras above tags, and hide film simulations, by updating to `cameras,tags,recipes`.
|
||||
- Accepted values:
|
||||
- `tags` (default)
|
||||
- `cameras` (default)
|
||||
- `lenses`
|
||||
- `recipes` (default)
|
||||
- `films` (default)
|
||||
- `focal-lengths`
|
||||
- `NEXT_PUBLIC_HIDE_EXIF_DATA = 1` hides EXIF data in photo details and OG images (potentially useful for portfolios, which don't focus on photography)
|
||||
- `NEXT_PUBLIC_HIDE_ZOOM_CONTROLS = 1` hides fullscreen photo zoom controls
|
||||
- `NEXT_PUBLIC_HIDE_TAKEN_AT_TIME = 1` hides taken at time from photo meta
|
||||
|
||||
@ -29,8 +29,8 @@ import { CgDebug } from 'react-icons/cg';
|
||||
import EnvVar from '@/components/EnvVar';
|
||||
import AdminLink from './AdminLink';
|
||||
import ScoreCardContainer from '@/components/ScoreCardContainer';
|
||||
import { capitalize } from '@/utility/string';
|
||||
import { DEFAULT_CATEGORY_KEYS, getHiddenDefaultCategories } from '@/photo/set';
|
||||
import { capitalize, deparameterize } from '@/utility/string';
|
||||
import { DEFAULT_CATEGORY_KEYS, getHiddenCategories } from '@/photo/set';
|
||||
|
||||
export default function AdminAppConfigurationClient({
|
||||
// Storage
|
||||
@ -502,15 +502,14 @@ export default function AdminAppConfigurationClient({
|
||||
</>,
|
||||
)}
|
||||
</Fragment>)}
|
||||
{getHiddenDefaultCategories(categoryVisibility)
|
||||
.map((category, index) =>
|
||||
{getHiddenCategories(categoryVisibility)
|
||||
.map(category =>
|
||||
<Fragment key={category}>
|
||||
{renderSubStatus(
|
||||
'optional',
|
||||
<span className="text-dim">
|
||||
{categoryVisibility.length + index + 1}
|
||||
{'.'}
|
||||
{capitalize(category)}
|
||||
{'* '}
|
||||
{deparameterize(category)}
|
||||
</span>,
|
||||
)}
|
||||
</Fragment>)}
|
||||
|
||||
@ -27,6 +27,9 @@ export const DEFAULT_CATEGORY_KEYS: CategoryKeys = [
|
||||
'films',
|
||||
];
|
||||
|
||||
export const getHiddenCategories = (keys: CategoryKeys): CategoryKeys =>
|
||||
CATEGORY_KEYS.filter(key => !keys.includes(key));
|
||||
|
||||
export const getHiddenDefaultCategories = (keys: CategoryKeys): CategoryKeys =>
|
||||
DEFAULT_CATEGORY_KEYS.filter(key => !keys.includes(key));
|
||||
|
||||
|
||||
@ -35,6 +35,9 @@ export const parameterize = (
|
||||
)
|
||||
.toLocaleLowerCase();
|
||||
|
||||
export const deparameterize = (string: string) =>
|
||||
capitalizeWords(string.replaceAll('-', ' '));
|
||||
|
||||
export const formatCount = (count: number) => `× ${count}`;
|
||||
|
||||
export const pluralize = (
|
||||
|
||||
Loading…
Reference in New Issue
Block a user