Change upload responsive buttons
This commit is contained in:
parent
6ac797d5ac
commit
b115b98ea5
@ -218,7 +218,7 @@ export default function AdminBatchUploadActions({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
hideTextOnMobile={false}
|
hideText="never"
|
||||||
>
|
>
|
||||||
{buttonText}
|
{buttonText}
|
||||||
</ProgressButton>
|
</ProgressButton>
|
||||||
@ -235,7 +235,7 @@ export default function AdminBatchUploadActions({
|
|||||||
}}
|
}}
|
||||||
className="w-full flex justify-center"
|
className="w-full flex justify-center"
|
||||||
shouldRedirectToAdminPhotos
|
shouldRedirectToAdminPhotos
|
||||||
hideTextOnMobile={false}
|
hideText="never"
|
||||||
disabled={isAdding}
|
disabled={isAdding}
|
||||||
>
|
>
|
||||||
Delete All Uploads
|
Delete All Uploads
|
||||||
|
|||||||
@ -80,7 +80,7 @@ export default function AdminPhotosClient({
|
|||||||
)}
|
)}
|
||||||
spinnerColor="text"
|
spinnerColor="text"
|
||||||
spinnerClassName="text-blue-200 dark:text-blue-600/40"
|
spinnerClassName="text-blue-200 dark:text-blue-600/40"
|
||||||
hideTextOnMobile={false}
|
hideText="never"
|
||||||
>
|
>
|
||||||
<ResponsiveText shortText={photosCountNeedsSync}>
|
<ResponsiveText shortText={photosCountNeedsSync}>
|
||||||
{pluralize(
|
{pluralize(
|
||||||
|
|||||||
@ -49,7 +49,7 @@ export default function AdminPhotosSyncClient({
|
|||||||
accessory={<ProgressButton
|
accessory={<ProgressButton
|
||||||
primary
|
primary
|
||||||
icon={<IconGrSync className="translate-y-[1px]" />}
|
icon={<IconGrSync className="translate-y-[1px]" />}
|
||||||
hideTextOnMobile={false}
|
hideText="never"
|
||||||
progress={progress}
|
progress={progress}
|
||||||
tooltip={photos.length === 1
|
tooltip={photos.length === 1
|
||||||
? 'Sync data for 1 photo'
|
? 'Sync data for 1 photo'
|
||||||
|
|||||||
@ -115,13 +115,13 @@ export default function AdminUploadsTableRow({
|
|||||||
<AddButton
|
<AddButton
|
||||||
path={pathForAdminUploadUrl(url)}
|
path={pathForAdminUploadUrl(url)}
|
||||||
disabled={isDeleting}
|
disabled={isDeleting}
|
||||||
hideTextOnMobile={false}
|
|
||||||
tooltip="Add directly"
|
tooltip="Add directly"
|
||||||
|
hideText="never"
|
||||||
/>
|
/>
|
||||||
<EditButton
|
<EditButton
|
||||||
path={pathForAdminUploadUrl(url)}
|
path={pathForAdminUploadUrl(url)}
|
||||||
tooltip="Review photo details"
|
tooltip="Review photo details"
|
||||||
hideText
|
hideText="always"
|
||||||
/>
|
/>
|
||||||
<DeleteBlobButton
|
<DeleteBlobButton
|
||||||
urls={[url]}
|
urls={[url]}
|
||||||
|
|||||||
@ -12,7 +12,7 @@ export default function ClearCacheButton() {
|
|||||||
<form action={clearCacheAction}>
|
<form action={clearCacheAction}>
|
||||||
<SubmitButtonWithStatus
|
<SubmitButtonWithStatus
|
||||||
icon={<BiTrash size={16} />}
|
icon={<BiTrash size={16} />}
|
||||||
hideTextOnMobile={false}
|
hideText="never"
|
||||||
onFormSubmit={invalidateSwr}
|
onFormSubmit={invalidateSwr}
|
||||||
>
|
>
|
||||||
Clear Cache
|
Clear Cache
|
||||||
|
|||||||
@ -5,9 +5,7 @@ import { ComponentProps } from 'react';
|
|||||||
export default function EditButton ({
|
export default function EditButton ({
|
||||||
children,
|
children,
|
||||||
...props
|
...props
|
||||||
}: {
|
}: ComponentProps<typeof PathLoaderButton>) {
|
||||||
hideText?: boolean
|
|
||||||
} & ComponentProps<typeof PathLoaderButton>) {
|
|
||||||
return (
|
return (
|
||||||
<PathLoaderButton
|
<PathLoaderButton
|
||||||
{...props}
|
{...props}
|
||||||
|
|||||||
@ -82,7 +82,7 @@ export default function ImageInput({
|
|||||||
/>}
|
/>}
|
||||||
aria-disabled={disabled}
|
aria-disabled={disabled}
|
||||||
onClick={() => inputRef.current?.click()}
|
onClick={() => inputRef.current?.click()}
|
||||||
hideTextOnMobile={false}
|
hideText="never"
|
||||||
primary
|
primary
|
||||||
>
|
>
|
||||||
{isUploading
|
{isUploading
|
||||||
|
|||||||
@ -134,7 +134,7 @@ export default function MoreMenuItem({
|
|||||||
<LoaderButton
|
<LoaderButton
|
||||||
icon={icon}
|
icon={icon}
|
||||||
isLoading={isLoading || isPending}
|
isLoading={isLoading || isPending}
|
||||||
hideTextOnMobile={false}
|
hideText="never"
|
||||||
styleAs="link-without-hover"
|
styleAs="link-without-hover"
|
||||||
className="translate-y-[0.5px] text-sm grow"
|
className="translate-y-[0.5px] text-sm grow"
|
||||||
classNameIcon="translate-y-[-0.5px]!"
|
classNameIcon="translate-y-[-0.5px]!"
|
||||||
|
|||||||
@ -19,7 +19,7 @@ export default function LoaderButton({
|
|||||||
spinnerColor,
|
spinnerColor,
|
||||||
spinnerClassName,
|
spinnerClassName,
|
||||||
styleAs = 'button',
|
styleAs = 'button',
|
||||||
hideTextOnMobile = true,
|
hideText = 'on-mobile',
|
||||||
confirmText,
|
confirmText,
|
||||||
shouldPreventDefault,
|
shouldPreventDefault,
|
||||||
primary,
|
primary,
|
||||||
@ -39,7 +39,7 @@ export default function LoaderButton({
|
|||||||
spinnerColor?: SpinnerColor
|
spinnerColor?: SpinnerColor
|
||||||
spinnerClassName?: string
|
spinnerClassName?: string
|
||||||
styleAs?: 'button' | 'link' | 'link-without-hover'
|
styleAs?: 'button' | 'link' | 'link-without-hover'
|
||||||
hideTextOnMobile?: boolean
|
hideText?: 'always' | 'on-mobile' | 'never'
|
||||||
confirmText?: string
|
confirmText?: string
|
||||||
shouldPreventDefault?: boolean
|
shouldPreventDefault?: boolean
|
||||||
primary?: boolean
|
primary?: boolean
|
||||||
@ -96,7 +96,8 @@ export default function LoaderButton({
|
|||||||
</span>}
|
</span>}
|
||||||
{children && <span className={clsx(
|
{children && <span className={clsx(
|
||||||
styleAs !== 'button' && isLoading && 'text-dim',
|
styleAs !== 'button' && isLoading && 'text-dim',
|
||||||
hideTextOnMobile && icon !== undefined && 'max-sm:hidden',
|
hideText === 'on-mobile' && icon !== undefined && 'max-sm:hidden',
|
||||||
|
hideText === 'always' && 'hidden',
|
||||||
)}>
|
)}>
|
||||||
{children}
|
{children}
|
||||||
</span>}
|
</span>}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user