From 5922c28fa7c37c978d757cd23bed9107dd9712bc Mon Sep 17 00:00:00 2001 From: Ivan <8611739+IRBorisov@users.noreply.github.com> Date: Fri, 19 Jul 2024 20:42:54 +0300 Subject: [PATCH] Small UI fixes --- rsconcept/frontend/src/components/wrap/DataLoader.tsx | 6 +++--- rsconcept/frontend/src/hooks/useRSFormDetails.ts | 2 +- .../frontend/src/pages/LibraryPage/ViewSideLocation.tsx | 2 +- rsconcept/frontend/src/pages/LoginPage.tsx | 1 + rsconcept/frontend/src/pages/RegisterPage/FormSignup.tsx | 2 ++ 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/rsconcept/frontend/src/components/wrap/DataLoader.tsx b/rsconcept/frontend/src/components/wrap/DataLoader.tsx index 20db7834..3bd58acc 100644 --- a/rsconcept/frontend/src/components/wrap/DataLoader.tsx +++ b/rsconcept/frontend/src/components/wrap/DataLoader.tsx @@ -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 ( {!isLoading && !error && !hasNoData ? ( - + {children} ) : null} {!isLoading && !error && hasNoData ? ( - + Данные не загружены ) : null} diff --git a/rsconcept/frontend/src/hooks/useRSFormDetails.ts b/rsconcept/frontend/src/hooks/useRSFormDetails.ts index b49d6a25..ce6025a9 100644 --- a/rsconcept/frontend/src/hooks/useRSFormDetails.ts +++ b/rsconcept/frontend/src/hooks/useRSFormDetails.ts @@ -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(undefined); - const [loading, setLoading] = useState(true); + const [loading, setLoading] = useState(target != undefined); const [error, setError] = useState(undefined); function setSchema(data?: IRSFormData) { diff --git a/rsconcept/frontend/src/pages/LibraryPage/ViewSideLocation.tsx b/rsconcept/frontend/src/pages/LibraryPage/ViewSideLocation.tsx index 56c7420e..eb4fe307 100644 --- a/rsconcept/frontend/src/pages/LibraryPage/ViewSideLocation.tsx +++ b/rsconcept/frontend/src/pages/LibraryPage/ViewSideLocation.tsx @@ -45,7 +45,7 @@ function ViewSideLocation({ folderTree, active, setActive: setActive, toggleFold animate={{ ...animateSideView.animate }} exit={{ ...animateSideView.exit }} > -
+
setUsername(event.target.value)} /> diff --git a/rsconcept/frontend/src/pages/RegisterPage/FormSignup.tsx b/rsconcept/frontend/src/pages/RegisterPage/FormSignup.tsx index 91afc60a..8d8abfc5 100644 --- a/rsconcept/frontend/src/pages/RegisterPage/FormSignup.tsx +++ b/rsconcept/frontend/src/pages/RegisterPage/FormSignup.tsx @@ -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}