Temporarily move FieldsetWithStatus due to case insensitivity bug
This commit is contained in:
parent
7695fa8d75
commit
d2ba985328
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@ -20,6 +20,7 @@
|
||||
"Eterna",
|
||||
"exif",
|
||||
"exiftool",
|
||||
"fieldset",
|
||||
"favicons",
|
||||
"Favoriting",
|
||||
"favs",
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
import PhotoCamera from '@/camera/PhotoCamera';
|
||||
import Badge from '@/components/Badge';
|
||||
import DivDebugBaselineGrid from '@/components/DivDebugBaselineGrid';
|
||||
import FieldSetWithStatus from '@/components/FieldSetWithStatus';
|
||||
import FieldsetWithStatus from '@/components/form/FieldsetWithStatus';
|
||||
import AppGrid from '@/components/AppGrid';
|
||||
import EntityLink from '@/components/entity/EntityLink';
|
||||
import LabeledIcon from '@/components/primitives/LabeledIcon';
|
||||
@ -45,13 +45,13 @@ export default function ComponentsPage() {
|
||||
'flex gap-1',
|
||||
'*:inline-flex *:gap-1 [&_input]:-translate-y-0.5',
|
||||
)}>
|
||||
<FieldSetWithStatus
|
||||
<FieldsetWithStatus
|
||||
label="Grid"
|
||||
type="checkbox"
|
||||
value={shouldShowBaselineGrid ? 'true' : 'false'}
|
||||
onChange={e => setShouldShowBaselineGrid?.(e === 'true')}
|
||||
/>
|
||||
<FieldSetWithStatus
|
||||
<FieldsetWithStatus
|
||||
label="Components"
|
||||
type="checkbox"
|
||||
value={debugComponents ? 'true' : 'false'}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
import PhotoTagFieldset from '@/admin/PhotoTagFieldset';
|
||||
import AppGrid from '@/components/AppGrid';
|
||||
import FieldSetWithStatus from '@/components/FieldSetWithStatus';
|
||||
import FieldsetWithStatus from '@/components/form/FieldsetWithStatus';
|
||||
import IconHidden from '@/components/icons/IconHidden';
|
||||
import IconLock from '@/components/icons/IconLock';
|
||||
import SelectMenu from '@/components/SelectMenu';
|
||||
@ -42,7 +42,7 @@ export default function ComponentsPage() {
|
||||
/>
|
||||
</div>
|
||||
<div className="z-11">
|
||||
<FieldSetWithStatus
|
||||
<FieldsetWithStatus
|
||||
label="Select"
|
||||
value="tag-1"
|
||||
selectOptions={[{
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import ErrorNote from '@/components/ErrorNote';
|
||||
import FieldSetWithStatus from '@/components/FieldSetWithStatus';
|
||||
import FieldsetWithStatus from '@/components/form/FieldsetWithStatus';
|
||||
import Container from '@/components/Container';
|
||||
import { addUploadsAction } from '@/photo/actions';
|
||||
import { PATH_ADMIN_PHOTOS } from '@/app/paths';
|
||||
@ -136,7 +136,7 @@ export default function AdminBatchUploadActions({
|
||||
? `Apply to ${pluralize(uploadUrls.length, 'upload')}`
|
||||
: `Found ${pluralize(uploadUrls.length, 'upload')}`}
|
||||
</div>
|
||||
<FieldSetWithStatus
|
||||
<FieldsetWithStatus
|
||||
label="Apply to All"
|
||||
type="checkbox"
|
||||
value={showBulkSettings ? 'true' : 'false'}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
import SubmitButtonWithStatus from '@/components/SubmitButtonWithStatus';
|
||||
import Link from 'next/link';
|
||||
import { PATH_ADMIN_RECIPES } from '@/app/paths';
|
||||
import FieldSetWithStatus from '@/components/FieldSetWithStatus';
|
||||
import FieldsetWithStatus from '@/components/form/FieldsetWithStatus';
|
||||
import { ReactNode, useMemo, useState } from 'react';
|
||||
import { renamePhotoRecipeGloballyAction } from '@/photo/actions';
|
||||
import { parameterize } from '@/utility/string';
|
||||
@ -34,7 +34,7 @@ export default function AdminRecipeForm({
|
||||
action={renamePhotoRecipeGloballyAction}
|
||||
className="space-y-8"
|
||||
>
|
||||
<FieldSetWithStatus
|
||||
<FieldsetWithStatus
|
||||
label="New Recipe Name"
|
||||
value={updatedRecipeRaw}
|
||||
onChange={setUpdatedRecipeRaw}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
import SubmitButtonWithStatus from '@/components/SubmitButtonWithStatus';
|
||||
import Link from 'next/link';
|
||||
import { PATH_ADMIN_TAGS } from '@/app/paths';
|
||||
import FieldSetWithStatus from '@/components/FieldSetWithStatus';
|
||||
import FieldsetWithStatus from '@/components/form/FieldsetWithStatus';
|
||||
import { ReactNode, useMemo, useState } from 'react';
|
||||
import { renamePhotoTagGloballyAction } from '@/photo/actions';
|
||||
import { parameterize } from '@/utility/string';
|
||||
@ -34,7 +34,7 @@ export default function AdminTagForm({
|
||||
action={renamePhotoTagGloballyAction}
|
||||
className="space-y-8"
|
||||
>
|
||||
<FieldSetWithStatus
|
||||
<FieldsetWithStatus
|
||||
label="New Tag Name"
|
||||
value={updatedTagRaw}
|
||||
onChange={setUpdatedTagRaw}
|
||||
|
||||
@ -12,7 +12,7 @@ import { pathForAdminUploadUrl } from '@/app/paths';
|
||||
import DeleteUploadButton from './DeleteUploadButton';
|
||||
import { Dispatch, SetStateAction, useEffect, useRef } from 'react';
|
||||
import { isElementEntirelyInViewport } from '@/utility/dom';
|
||||
import FieldSetWithStatus from '@/components/FieldSetWithStatus';
|
||||
import FieldsetWithStatus from '@/components/form/FieldsetWithStatus';
|
||||
import EditButton from './EditButton';
|
||||
import AddUploadButton from './AddUploadButton';
|
||||
|
||||
@ -105,7 +105,7 @@ export default function AdminUploadsTableRow({
|
||||
)}>
|
||||
<div className="flex flex-col gap-6 w-full">
|
||||
<div className="flex flex-col grow gap-2">
|
||||
<FieldSetWithStatus
|
||||
<FieldsetWithStatus
|
||||
label="Title"
|
||||
value={draftTitle}
|
||||
onChange={titleUpdated =>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
'use client';
|
||||
|
||||
import FieldSetWithStatus from '@/components/FieldSetWithStatus';
|
||||
import FieldsetWithStatus from '@/components/form/FieldsetWithStatus';
|
||||
import { useAppText } from '@/i18n/state/client';
|
||||
import { convertTagsForForm, getValidationMessageForTags, Tags } from '@/tag';
|
||||
import { ComponentProps, useEffect, useRef, useState } from 'react';
|
||||
@ -12,7 +12,7 @@ export default function PhotoTagFieldset(props: {
|
||||
onError?: (error: string) => void
|
||||
openOnLoad?: boolean
|
||||
} & Partial<Omit<
|
||||
ComponentProps<typeof FieldSetWithStatus>,
|
||||
ComponentProps<typeof FieldsetWithStatus>,
|
||||
'tagOptions'
|
||||
>>) {
|
||||
const {
|
||||
@ -41,7 +41,7 @@ export default function PhotoTagFieldset(props: {
|
||||
|
||||
return (
|
||||
<div ref={ref}>
|
||||
<FieldSetWithStatus
|
||||
<FieldsetWithStatus
|
||||
{...rest}
|
||||
inputRef={ref}
|
||||
label="Tags"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
'use client';
|
||||
|
||||
import FieldSetWithStatus from '@/components/FieldSetWithStatus';
|
||||
import FieldsetWithStatus from '@/components/form/FieldsetWithStatus';
|
||||
import Container from '@/components/Container';
|
||||
import SubmitButtonWithStatus from '@/components/SubmitButtonWithStatus';
|
||||
import {
|
||||
@ -92,7 +92,7 @@ export default function SignInForm({
|
||||
{appText.auth.invalidEmailPassword}
|
||||
</ErrorNote>}
|
||||
<div className="space-y-4 w-full">
|
||||
<FieldSetWithStatus
|
||||
<FieldsetWithStatus
|
||||
id="email"
|
||||
inputRef={emailRef}
|
||||
label={appText.auth.email}
|
||||
@ -100,7 +100,7 @@ export default function SignInForm({
|
||||
value={email}
|
||||
onChange={setEmail}
|
||||
/>
|
||||
<FieldSetWithStatus
|
||||
<FieldsetWithStatus
|
||||
id="password"
|
||||
label={appText.auth.password}
|
||||
type="password"
|
||||
|
||||
@ -2,18 +2,18 @@
|
||||
|
||||
import { InputHTMLAttributes, useRef, RefObject, ReactNode } from 'react';
|
||||
import { useFormStatus } from 'react-dom';
|
||||
import Spinner from './Spinner';
|
||||
import Spinner from '../Spinner';
|
||||
import { clsx } from 'clsx/lite';
|
||||
import { FieldSetType, AnnotatedTag } from '@/photo/form';
|
||||
import TagInput from './TagInput';
|
||||
import TagInput from '../TagInput';
|
||||
import { parameterize } from '@/utility/string';
|
||||
import Checkbox from './Checkbox';
|
||||
import ResponsiveText from './primitives/ResponsiveText';
|
||||
import Tooltip from './Tooltip';
|
||||
import { SelectMenuOptionType } from './SelectMenuOption';
|
||||
import SelectMenu from './SelectMenu';
|
||||
import Checkbox from '../Checkbox';
|
||||
import ResponsiveText from '../primitives/ResponsiveText';
|
||||
import Tooltip from '../Tooltip';
|
||||
import { SelectMenuOptionType } from '../SelectMenuOption';
|
||||
import SelectMenu from '../SelectMenu';
|
||||
|
||||
export default function FieldSetWithStatus({
|
||||
export default function FieldsetWithStatus({
|
||||
id: _id,
|
||||
label,
|
||||
icon,
|
||||
@ -1,4 +1,4 @@
|
||||
import FieldSetWithStatus from '@/components/FieldSetWithStatus';
|
||||
import FieldsetWithStatus from '@/components/form/FieldsetWithStatus';
|
||||
import { ComponentProps, useEffect, useState } from 'react';
|
||||
import { getPhotosNeedingRecipeTitleCountAction } from '../actions';
|
||||
|
||||
@ -10,7 +10,7 @@ export default function ApplyRecipeTitleGloballyCheckbox({
|
||||
film,
|
||||
onMatchResults,
|
||||
...props
|
||||
}: ComponentProps<typeof FieldSetWithStatus> & {
|
||||
}: ComponentProps<typeof FieldsetWithStatus> & {
|
||||
photoId?: string
|
||||
recipeTitle?: string
|
||||
hasRecipeTitleChanged?: boolean
|
||||
@ -40,7 +40,7 @@ export default function ApplyRecipeTitleGloballyCheckbox({
|
||||
|
||||
return (
|
||||
shouldShowFieldSet
|
||||
? <FieldSetWithStatus {...{
|
||||
? <FieldsetWithStatus {...{
|
||||
...props,
|
||||
label: loading
|
||||
? 'Scanning photos for matching recipes ...'
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
import { ComponentProps } from 'react';
|
||||
import FieldSetWithStatus from '@/components/FieldSetWithStatus';
|
||||
import FieldsetWithStatus from '@/components/form/FieldsetWithStatus';
|
||||
import IconFavs from '@/components/icons/IconFavs';
|
||||
|
||||
export default function FieldsetFavs(props: Omit<
|
||||
ComponentProps<typeof FieldSetWithStatus>,
|
||||
ComponentProps<typeof FieldsetWithStatus>,
|
||||
'label' | 'icon' | 'type'
|
||||
>) {
|
||||
return (
|
||||
<FieldSetWithStatus
|
||||
<FieldsetWithStatus
|
||||
{...props}
|
||||
label="Favorite"
|
||||
type="checkbox"
|
||||
|
||||
@ -19,7 +19,7 @@ import {
|
||||
getFormErrors,
|
||||
isFormValid,
|
||||
} from '.';
|
||||
import FieldSetWithStatus from '@/components/FieldSetWithStatus';
|
||||
import FieldsetWithStatus from '@/components/form/FieldsetWithStatus';
|
||||
import { createPhotoAction, updatePhotoAction } from '../actions';
|
||||
import SubmitButtonWithStatus from '@/components/SubmitButtonWithStatus';
|
||||
import Link from 'next/link';
|
||||
@ -367,7 +367,7 @@ export default function PhotoForm({
|
||||
staticValue,
|
||||
}]) => {
|
||||
if (!isFieldHidden(key, hideIfEmpty, shouldHide)) {
|
||||
const fieldProps: ComponentProps<typeof FieldSetWithStatus> = {
|
||||
const fieldProps: ComponentProps<typeof FieldsetWithStatus> = {
|
||||
id: key,
|
||||
label: label + (
|
||||
key === 'blurData' && shouldDebugImageFallbacks
|
||||
@ -424,7 +424,7 @@ export default function PhotoForm({
|
||||
|
||||
switch (key) {
|
||||
case 'film':
|
||||
return <FieldSetWithStatus
|
||||
return <FieldsetWithStatus
|
||||
key={key}
|
||||
{...fieldProps}
|
||||
tagOptionsDefaultIcon={<span
|
||||
@ -462,7 +462,7 @@ export default function PhotoForm({
|
||||
{...fieldProps}
|
||||
/>;
|
||||
default:
|
||||
return <FieldSetWithStatus
|
||||
return <FieldsetWithStatus
|
||||
key={key}
|
||||
{...fieldProps}
|
||||
/>;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import FieldSetWithStatus from '@/components/FieldSetWithStatus';
|
||||
import FieldsetWithStatus from '@/components/form/FieldsetWithStatus';
|
||||
import { ComponentProps, Dispatch, SetStateAction } from 'react';
|
||||
import {
|
||||
getVisibilityValue,
|
||||
@ -16,9 +16,9 @@ export default function FieldsetVisibility({
|
||||
label?: string
|
||||
formData: Partial<PhotoFormData>
|
||||
setFormData: Dispatch<SetStateAction<Partial<PhotoFormData>>>
|
||||
} & Omit<ComponentProps<typeof FieldSetWithStatus>, 'label' | 'value'>) {
|
||||
} & Omit<ComponentProps<typeof FieldsetWithStatus>, 'label' | 'value'>) {
|
||||
return (
|
||||
<FieldSetWithStatus
|
||||
<FieldsetWithStatus
|
||||
label="Visibility"
|
||||
{...props}
|
||||
selectOptions={VISIBILITY_OPTIONS}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user