Files
immich-folio/app/admin/components/page-builder/sortOptions.tsx
Ralksta e99d3f2f1b release: v0.14.0
Fourteen commits since v0.13.0. See CHANGELOG.md for the full list.

Two additions: `npm run doctor`, which runs the config doctor from a terminal — including inside the shipped image — and exits with the worst finding, so it can gate a deployment script; and a Playwright spec that loads all fourteen admin routes against a production build.

One change, invisible on screen: the admin panel got a form-field layer (#533).

Five fixes: grid.gap on both axes (#513), the dashboard status badge (#539), the journal editor's unsaved-changes guard (#538), essay paragraph markup (#537), and aria-pressed on the panel's switches and pickers.
2026-08-30 15:11:25 +02:00

44 lines
1.1 KiB
TypeScript

'use client';
import type { ReactNode } from 'react';
import { ALBUM_SORT_MODES, type AlbumSortMode } from '@/lib/albumSort';
import {
IconArrowDown,
IconArrowUp,
IconCalendar,
IconGripVertical,
IconSortAlpha,
} from '../Icons';
import type { ListboxOption } from '../Listbox';
/**
* Labels for the per-album sort control.
*
* Kept as plain text on their own because they also feed the `title` attribute
* on the album card's sort badge, where markup is not an option.
*/
export const SORT_LABELS: Record<AlbumSortMode, string> = {
immich: 'Immich order (default)',
newest: 'Newest first',
oldest: 'Oldest first',
filename: 'Filename',
manual: 'Manual',
};
/** Manual reuses the drag glyph so the control matches the card's badge. */
export const SORT_ICONS: Record<AlbumSortMode, ReactNode> = {
immich: <IconCalendar />,
newest: <IconArrowDown />,
oldest: <IconArrowUp />,
filename: <IconSortAlpha />,
manual: <IconGripVertical />,
};
export const SORT_OPTIONS: readonly ListboxOption<AlbumSortMode>[] = ALBUM_SORT_MODES.map(
(mode) => ({
value: mode,
label: SORT_LABELS[mode],
icon: SORT_ICONS[mode],
}),
);