Small UI fixes
This commit is contained in:
parent
3996673d9f
commit
5922c28fa7
|
@ -15,16 +15,16 @@ interface DataLoaderProps extends CProps.AnimatedDiv {
|
|||
children: React.ReactNode;
|
||||
}
|
||||
|
||||
function DataLoader({ id, isLoading, hasNoData, error, children, ...restProps }: DataLoaderProps) {
|
||||
function DataLoader({ id, isLoading, hasNoData, error, className, children, ...restProps }: DataLoaderProps) {
|
||||
return (
|
||||
<AnimatePresence mode='wait'>
|
||||
{!isLoading && !error && !hasNoData ? (
|
||||
<AnimateFade id={id} key={`${id}-data`} {...restProps}>
|
||||
<AnimateFade id={id} key={`${id}-data`} className={className} {...restProps}>
|
||||
{children}
|
||||
</AnimateFade>
|
||||
) : null}
|
||||
{!isLoading && !error && hasNoData ? (
|
||||
<AnimateFade key={`${id}-no-data`} {...restProps}>
|
||||
<AnimateFade key={`${id}-no-data`} className='w-full text-center p-1' {...restProps}>
|
||||
Данные не загружены
|
||||
</AnimateFade>
|
||||
) : null}
|
||||
|
|
|
@ -11,7 +11,7 @@ import { RSFormLoader } from '@/models/RSFormLoader';
|
|||
function useRSFormDetails({ target, version }: { target?: string; version?: string }) {
|
||||
const { loading: userLoading } = useAuth();
|
||||
const [schema, setInnerSchema] = useState<IRSForm | undefined>(undefined);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [loading, setLoading] = useState(target != undefined);
|
||||
const [error, setError] = useState<ErrorData>(undefined);
|
||||
|
||||
function setSchema(data?: IRSFormData) {
|
||||
|
|
|
@ -45,7 +45,7 @@ function ViewSideLocation({ folderTree, active, setActive: setActive, toggleFold
|
|||
animate={{ ...animateSideView.animate }}
|
||||
exit={{ ...animateSideView.exit }}
|
||||
>
|
||||
<div className='h-[2.08rem] flex justify-between items-center pr-1'>
|
||||
<div className='h-[2.08rem] flex justify-between items-center pr-1 pl-[0.125rem]'>
|
||||
<BadgeHelp
|
||||
topic={HelpTopic.UI_LIBRARY}
|
||||
className={clsx(PARAMETER.TOOLTIP_WIDTH, 'text-sm')}
|
||||
|
|
|
@ -62,6 +62,7 @@ function LoginPage() {
|
|||
autoFocus
|
||||
required
|
||||
allowEnter
|
||||
spellCheck={false}
|
||||
value={username}
|
||||
onChange={event => setUsername(event.target.value)}
|
||||
/>
|
||||
|
|
|
@ -95,6 +95,7 @@ function FormSignup() {
|
|||
autoComplete='username'
|
||||
required
|
||||
label='Имя пользователя (логин)'
|
||||
spellCheck={false}
|
||||
pattern={patterns.login}
|
||||
title='Минимум 3 знака. Латинские буквы и цифры. Не может начинаться с цифры'
|
||||
value={username}
|
||||
|
@ -128,6 +129,7 @@ function FormSignup() {
|
|||
id='email'
|
||||
autoComplete='email'
|
||||
required
|
||||
spellCheck={false}
|
||||
label='Электронная почта (email)'
|
||||
title='электронная почта в корректном формате, например: i.petrov@mycompany.ru.com'
|
||||
value={email}
|
||||
|
|
Loading…
Reference in New Issue
Block a user