diff --git a/rsconcept/frontend/src/components/Help/ConstituentaInfo.tsx b/rsconcept/frontend/src/components/Help/InfoConstituenta.tsx similarity index 85% rename from rsconcept/frontend/src/components/Help/ConstituentaInfo.tsx rename to rsconcept/frontend/src/components/Help/InfoConstituenta.tsx index 07e34d2e..5c80d48c 100644 --- a/rsconcept/frontend/src/components/Help/ConstituentaInfo.tsx +++ b/rsconcept/frontend/src/components/Help/InfoConstituenta.tsx @@ -1,12 +1,12 @@ import { IConstituenta } from '../../utils/models'; import { getCstTypificationLabel } from '../../utils/staticUI'; -interface ConstituentaInfoProps +interface InfoConstituentaProps extends React.HTMLAttributes { data: IConstituenta } -function ConstituentaInfo({ data, ...props }: ConstituentaInfoProps) { +function InfoConstituenta({ data, ...props }: InfoConstituentaProps) { return (

Конституента {data.alias}

@@ -19,4 +19,4 @@ function ConstituentaInfo({ data, ...props }: ConstituentaInfoProps) { ); } -export default ConstituentaInfo; \ No newline at end of file +export default InfoConstituenta; \ No newline at end of file diff --git a/rsconcept/frontend/src/components/Help/CstClassInfo.tsx b/rsconcept/frontend/src/components/Help/InfoCstClass.tsx similarity index 85% rename from rsconcept/frontend/src/components/Help/CstClassInfo.tsx rename to rsconcept/frontend/src/components/Help/InfoCstClass.tsx index fdcefd0f..d1d39be3 100644 --- a/rsconcept/frontend/src/components/Help/CstClassInfo.tsx +++ b/rsconcept/frontend/src/components/Help/InfoCstClass.tsx @@ -1,11 +1,11 @@ import { prefixes } from '../../utils/constants'; import { mapCstClassInfo } from '../../utils/staticUI'; -interface CstClassInfoProps { +interface InfoCstClassProps { title?: string } -function CstClassInfo({ title }: CstClassInfoProps) { +function InfoCstClass({ title }: InfoCstClassProps) { return (
{ title &&

{title}

} @@ -26,4 +26,4 @@ function CstClassInfo({ title }: CstClassInfoProps) { ); } -export default CstClassInfo; +export default InfoCstClass; diff --git a/rsconcept/frontend/src/components/Help/CstStatusInfo.tsx b/rsconcept/frontend/src/components/Help/InfoCstStatus.tsx similarity index 84% rename from rsconcept/frontend/src/components/Help/CstStatusInfo.tsx rename to rsconcept/frontend/src/components/Help/InfoCstStatus.tsx index 3ae1f379..d2e05005 100644 --- a/rsconcept/frontend/src/components/Help/CstStatusInfo.tsx +++ b/rsconcept/frontend/src/components/Help/InfoCstStatus.tsx @@ -1,11 +1,11 @@ import { prefixes } from '../../utils/constants'; import { mapStatusInfo } from '../../utils/staticUI'; -interface CstStatusInfoProps { +interface InfoCstStatusProps { title?: string } -function CstStatusInfo({ title }: CstStatusInfoProps) { +function InfoCstStatus({ title }: InfoCstStatusProps) { return (
{ title &&

{title}

} @@ -26,4 +26,4 @@ function CstStatusInfo({ title }: CstStatusInfoProps) { ); } -export default CstStatusInfo; +export default InfoCstStatus; diff --git a/rsconcept/frontend/src/components/Navigation/Navigation.tsx b/rsconcept/frontend/src/components/Navigation/Navigation.tsx index 695157c8..3ecf0f4f 100644 --- a/rsconcept/frontend/src/components/Navigation/Navigation.tsx +++ b/rsconcept/frontend/src/components/Navigation/Navigation.tsx @@ -1,6 +1,5 @@ import { useNavigate } from 'react-router-dom'; -import { useAuth } from '../../context/AuthContext'; import { useConceptTheme } from '../../context/ThemeContext'; import { EducationIcon, LibraryIcon } from '../Icons'; import Logo from './Logo' @@ -10,7 +9,6 @@ import UserMenu from './UserMenu'; import UserTools from './UserTools'; function Navigation () { - const { user } = useAuth(); const navigate = useNavigate(); const { noNavigation, toggleNoNavigation } = useConceptTheme(); @@ -42,7 +40,7 @@ function Navigation () {
- {user && } +
} description='Общие схемы' onClick={navigateCommon} /> } description='Справка' onClick={navigateHelp} /> diff --git a/rsconcept/frontend/src/components/Navigation/NavigationButton.tsx b/rsconcept/frontend/src/components/Navigation/NavigationButton.tsx index f043afbd..26d71a99 100644 --- a/rsconcept/frontend/src/components/Navigation/NavigationButton.tsx +++ b/rsconcept/frontend/src/components/Navigation/NavigationButton.tsx @@ -1,15 +1,17 @@ interface NavigationButtonProps { + id?: string icon: React.ReactNode - description: string + description?: string colorClass?: string - onClick: () => void + onClick?: () => void } const defaultColors = 'text-gray-500 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white' -function NavigationButton({ icon, description, colorClass = defaultColors, onClick }: NavigationButtonProps) { +function NavigationButton({ id, icon, description, colorClass = defaultColors, onClick }: NavigationButtonProps) { return ( -
); diff --git a/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta.tsx b/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta.tsx index 459ac9d4..bbe72f9e 100644 --- a/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta.tsx +++ b/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta.tsx @@ -6,7 +6,7 @@ import Divider from '../../components/Common/Divider'; import MiniButton from '../../components/Common/MiniButton'; import SubmitButton from '../../components/Common/SubmitButton'; import TextArea from '../../components/Common/TextArea'; -import CstStatusInfo from '../../components/Help/CstStatusInfo'; +import CstStatusInfo from '../../components/Help/InfoCstStatus'; import { DumpBinIcon, HelpIcon, SaveIcon, SmallPlusIcon } from '../../components/Icons'; import { useRSForm } from '../../context/RSFormContext'; import { type CstType, EditMode, ICstUpdateData, SyntaxTree } from '../../utils/models'; diff --git a/rsconcept/frontend/src/pages/RSFormPage/EditorItems.tsx b/rsconcept/frontend/src/pages/RSFormPage/EditorItems.tsx index 9fff700d..3713dd73 100644 --- a/rsconcept/frontend/src/pages/RSFormPage/EditorItems.tsx +++ b/rsconcept/frontend/src/pages/RSFormPage/EditorItems.tsx @@ -5,7 +5,7 @@ import Button from '../../components/Common/Button'; import ConceptDataTable from '../../components/Common/ConceptDataTable'; import ConceptTooltip from '../../components/Common/ConceptTooltip'; import Divider from '../../components/Common/Divider'; -import CstStatusInfo from '../../components/Help/CstStatusInfo'; +import CstStatusInfo from '../../components/Help/InfoCstStatus'; import { ArrowDownIcon, ArrowsRotateIcon, ArrowUpIcon, DumpBinIcon, HelpIcon, SmallPlusIcon } from '../../components/Icons'; import { useRSForm } from '../../context/RSFormContext'; import { useConceptTheme } from '../../context/ThemeContext'; diff --git a/rsconcept/frontend/src/pages/RSFormPage/EditorTermGraph.tsx b/rsconcept/frontend/src/pages/RSFormPage/EditorTermGraph.tsx index b395ca0c..5c34b2b4 100644 --- a/rsconcept/frontend/src/pages/RSFormPage/EditorTermGraph.tsx +++ b/rsconcept/frontend/src/pages/RSFormPage/EditorTermGraph.tsx @@ -9,9 +9,9 @@ import ConceptSelect from '../../components/Common/ConceptSelect'; import ConceptTooltip from '../../components/Common/ConceptTooltip'; import Divider from '../../components/Common/Divider'; import MiniButton from '../../components/Common/MiniButton'; -import ConstituentaInfo from '../../components/Help/ConstituentaInfo'; -import CstClassInfo from '../../components/Help/CstClassInfo'; -import CstStatusInfo from '../../components/Help/CstStatusInfo'; +import InfoConstituenta from '../../components/Help/InfoConstituenta'; +import InfoCstClass from '../../components/Help/InfoCstClass'; +import CstStatusInfo from '../../components/Help/InfoCstStatus'; import { ArrowsRotateIcon, FilterCogIcon, HelpIcon } from '../../components/Icons'; import { useRSForm } from '../../context/RSFormContext'; import { useConceptTheme } from '../../context/ThemeContext'; @@ -304,7 +304,7 @@ function EditorTermGraph({ onOpenEdit }: EditorTermGraphProps) {
{hoverCst &&
- @@ -405,7 +405,7 @@ function EditorTermGraph({ onOpenEdit }: EditorTermGraphProps) { - + diff --git a/rsconcept/frontend/src/pages/RSFormPage/elements/ConstituentaTooltip.tsx b/rsconcept/frontend/src/pages/RSFormPage/elements/ConstituentaTooltip.tsx index 45fd6966..0fc442f9 100644 --- a/rsconcept/frontend/src/pages/RSFormPage/elements/ConstituentaTooltip.tsx +++ b/rsconcept/frontend/src/pages/RSFormPage/elements/ConstituentaTooltip.tsx @@ -1,5 +1,5 @@ import ConceptTooltip from '../../../components/Common/ConceptTooltip'; -import ConstituentaInfo from '../../../components/Help/ConstituentaInfo'; +import InfoConstituenta from '../../../components/Help/InfoConstituenta'; import { IConstituenta } from '../../../utils/models'; interface ConstituentaTooltipProps { @@ -13,7 +13,7 @@ function ConstituentaTooltip({ data, anchor }: ConstituentaTooltipProps) { anchorSelect={anchor} className='max-w-[25rem] min-w-[25rem]' > - + ); }