Format CMD-K text
This commit is contained in:
parent
4be593bf29
commit
b5a038fd50
@ -38,7 +38,7 @@ import { getKeywordsForPhoto, titleForPhoto } from '@/photo';
|
||||
import PhotoDate from '@/photo/PhotoDate';
|
||||
import PhotoSmall from '@/photo/PhotoSmall';
|
||||
import { FaCheck } from 'react-icons/fa6';
|
||||
import { TagsWithMeta, addHiddenToTags } from '@/tag';
|
||||
import { TagsWithMeta, addHiddenToTags, formatTag } from '@/tag';
|
||||
import { FaTag } from 'react-icons/fa';
|
||||
import { formatCount, formatCountDescriptive } from '@/utility/string';
|
||||
|
||||
@ -191,7 +191,7 @@ export default function CommandKClient({
|
||||
className="translate-x-[1px] translate-y-[0.75px]"
|
||||
/>,
|
||||
items: tagsIncludingHidden.map(({ tag, count }) => ({
|
||||
label: tag,
|
||||
label: formatTag(tag),
|
||||
annotation: formatCount(count),
|
||||
annotationAria: formatCountDescriptive(count),
|
||||
path: pathForTag(tag),
|
||||
|
||||
@ -16,6 +16,7 @@ import { TagsWithMeta } from '@/tag';
|
||||
import PhotoFilmSimulationIcon from '@/simulation/PhotoFilmSimulationIcon';
|
||||
import { IoMdCamera } from 'react-icons/io';
|
||||
import { ADMIN_DEBUG_TOOLS_ENABLED, SHOW_FILM_SIMULATIONS } from './config';
|
||||
import { labelForFilmSimulation } from '@/vendors/fujifilm';
|
||||
|
||||
export default async function CommandK() {
|
||||
const [
|
||||
@ -51,7 +52,7 @@ export default async function CommandK() {
|
||||
<PhotoFilmSimulationIcon className="translate-y-[0.5px]" />
|
||||
</span>,
|
||||
items: filmSimulations.map(({ simulation, count }) => ({
|
||||
label: simulation,
|
||||
label: labelForFilmSimulation(simulation).medium,
|
||||
annotation: formatCount(count),
|
||||
annotationAria: formatCountDescriptive(count),
|
||||
path: pathForFilmSimulation(simulation),
|
||||
|
||||
@ -8,7 +8,7 @@ export const convertStringToArray = (
|
||||
: undefined;
|
||||
|
||||
export const capitalize = (string: string) =>
|
||||
string.charAt(0).toUpperCase() + string.slice(1);
|
||||
string.charAt(0).toLocaleUpperCase() + string.slice(1);
|
||||
|
||||
export const capitalizeWords = (string = '') =>
|
||||
string
|
||||
|
||||
Loading…
Reference in New Issue
Block a user