diff --git a/.vscode/settings.json b/.vscode/settings.json index 2b5f4ec9..e4009981 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -140,6 +140,7 @@ "пересинтез", "Родоструктурная", "Родоструктурное", + "родоструктурной", "Синглетон", "твор", "Терминологизация", diff --git a/rsconcept/frontend/src/app/ApplicationLayout.tsx b/rsconcept/frontend/src/app/ApplicationLayout.tsx index a6365d15..a6325a39 100644 --- a/rsconcept/frontend/src/app/ApplicationLayout.tsx +++ b/rsconcept/frontend/src/app/ApplicationLayout.tsx @@ -4,11 +4,11 @@ import ConceptToaster from '@/app/ConceptToaster'; import Footer from '@/app/Footer'; import Navigation from '@/app/Navigation'; import { NavigationState } from '@/context/NavigationContext'; -import { useConceptTheme } from '@/context/ThemeContext'; +import { useConceptOptions } from '@/context/OptionsContext'; import { globals } from '@/utils/constants'; function ApplicationLayout() { - const { viewportHeight, mainHeight, showScroll } = useConceptTheme(); + const { viewportHeight, mainHeight, showScroll } = useConceptOptions(); return (
diff --git a/rsconcept/frontend/src/app/ConceptToaster.tsx b/rsconcept/frontend/src/app/ConceptToaster.tsx index 2d6a78eb..09e361f2 100644 --- a/rsconcept/frontend/src/app/ConceptToaster.tsx +++ b/rsconcept/frontend/src/app/ConceptToaster.tsx @@ -1,11 +1,11 @@ import { ToastContainer, type ToastContainerProps } from 'react-toastify'; -import { useConceptTheme } from '@/context/ThemeContext'; +import { useConceptOptions } from '@/context/OptionsContext'; interface ToasterThemedProps extends Omit {} function ToasterThemed(props: ToasterThemedProps) { - const { darkMode } = useConceptTheme(); + const { darkMode } = useConceptOptions(); return ; } diff --git a/rsconcept/frontend/src/app/Footer.tsx b/rsconcept/frontend/src/app/Footer.tsx index 4de15b6b..ed46361a 100644 --- a/rsconcept/frontend/src/app/Footer.tsx +++ b/rsconcept/frontend/src/app/Footer.tsx @@ -1,12 +1,12 @@ import clsx from 'clsx'; -import { useConceptTheme } from '@/context/ThemeContext'; +import { useConceptOptions } from '@/context/OptionsContext'; import { urls } from '@/utils/constants'; import TextURL from '../components/ui/TextURL'; function Footer() { - const { noNavigation, noFooter } = useConceptTheme(); + const { noNavigation, noFooter } = useConceptOptions(); if (noNavigation || noFooter) { return null; } diff --git a/rsconcept/frontend/src/app/GlobalProviders.tsx b/rsconcept/frontend/src/app/GlobalProviders.tsx index 59e337b3..1ede839e 100644 --- a/rsconcept/frontend/src/app/GlobalProviders.tsx +++ b/rsconcept/frontend/src/app/GlobalProviders.tsx @@ -6,7 +6,7 @@ import { pdfjs } from 'react-pdf'; import { AuthState } from '@/context/AuthContext'; import { LibraryState } from '@/context/LibraryContext'; -import { ThemeState } from '@/context/ThemeContext'; +import { OptionsState } from '@/context/OptionsContext'; import { UsersState } from '@/context/UsersContext'; import ErrorFallback from './ErrorFallback'; @@ -33,7 +33,7 @@ function GlobalProviders({ children }: { children: React.ReactNode }) { onError={logError} > - + @@ -43,7 +43,7 @@ function GlobalProviders({ children }: { children: React.ReactNode }) { - + ); } diff --git a/rsconcept/frontend/src/app/Navigation/Logo.tsx b/rsconcept/frontend/src/app/Navigation/Logo.tsx index 6358d18d..8daabdb5 100644 --- a/rsconcept/frontend/src/app/Navigation/Logo.tsx +++ b/rsconcept/frontend/src/app/Navigation/Logo.tsx @@ -1,10 +1,10 @@ import clsx from 'clsx'; -import { useConceptTheme } from '@/context/ThemeContext'; +import { useConceptOptions } from '@/context/OptionsContext'; import useWindowSize from '@/hooks/useWindowSize'; function Logo() { - const { darkMode } = useConceptTheme(); + const { darkMode } = useConceptOptions(); const size = useWindowSize(); return ( diff --git a/rsconcept/frontend/src/app/Navigation/Navigation.tsx b/rsconcept/frontend/src/app/Navigation/Navigation.tsx index 5af48b72..d5c60038 100644 --- a/rsconcept/frontend/src/app/Navigation/Navigation.tsx +++ b/rsconcept/frontend/src/app/Navigation/Navigation.tsx @@ -5,7 +5,7 @@ import { IoLibrary } from 'react-icons/io5'; import { EducationIcon } from '@/components/Icons'; import { useConceptNavigation } from '@/context/NavigationContext'; -import { useConceptTheme } from '@/context/ThemeContext'; +import { useConceptOptions } from '@/context/OptionsContext'; import { animateNavigation } from '@/styling/animations'; import Logo from './Logo'; @@ -15,7 +15,7 @@ import UserMenu from './UserMenu'; function Navigation() { const router = useConceptNavigation(); - const { noNavigationAnimation } = useConceptTheme(); + const { noNavigationAnimation } = useConceptOptions(); const navigateHome = () => router.push('/'); const navigateLibrary = () => router.push('/library'); diff --git a/rsconcept/frontend/src/app/Navigation/ToggleNavigationButton.tsx b/rsconcept/frontend/src/app/Navigation/ToggleNavigationButton.tsx index afaae8a0..64b9d337 100644 --- a/rsconcept/frontend/src/app/Navigation/ToggleNavigationButton.tsx +++ b/rsconcept/frontend/src/app/Navigation/ToggleNavigationButton.tsx @@ -2,11 +2,11 @@ import clsx from 'clsx'; import { motion } from 'framer-motion'; import { RiPushpinFill, RiUnpinLine } from 'react-icons/ri'; -import { useConceptTheme } from '@/context/ThemeContext'; +import { useConceptOptions } from '@/context/OptionsContext'; import { animateNavigationToggle } from '@/styling/animations'; function ToggleNavigationButton() { - const { noNavigationAnimation, toggleNoNavigation } = useConceptTheme(); + const { noNavigationAnimation, toggleNoNavigation } = useConceptOptions(); return ( { + function navigateProfile() { hideDropdown(); router.push('/profile'); - }; + } - const logoutAndRedirect = () => { + function logoutAndRedirect() { hideDropdown(); logout(() => router.push('/login/')); - }; + } + + function handleToggleDarkMode() { + hideDropdown(); + toggleDarkMode(); + } return ( - - + } + onClick={navigateProfile} + /> + : } + title='Переключение темы оформления' + onClick={handleToggleDarkMode} + /> + : } + title='Отображение иконок подсказок' + onClick={toggleShowHelp} + /> + } + onClick={logoutAndRedirect} /> - ); } diff --git a/rsconcept/frontend/src/components/RSInput/RSInput.tsx b/rsconcept/frontend/src/components/RSInput/RSInput.tsx index 2c39bcb4..a1941c17 100644 --- a/rsconcept/frontend/src/components/RSInput/RSInput.tsx +++ b/rsconcept/frontend/src/components/RSInput/RSInput.tsx @@ -9,8 +9,8 @@ import { EditorView } from 'codemirror'; import { forwardRef, useCallback, useMemo, useRef } from 'react'; import Label from '@/components/ui/Label'; +import { useConceptOptions } from '@/context/OptionsContext'; import { useRSForm } from '@/context/RSFormContext'; -import { useConceptTheme } from '@/context/ThemeContext'; import { getFontClassName } from '@/models/miscellaneousAPI'; import { generateAlias, getCstTypePrefix, guessCstType } from '@/models/rsformAPI'; import { extractGlobals } from '@/models/rslangAPI'; @@ -49,7 +49,7 @@ const RSInput = forwardRef( }, ref ) => { - const { darkMode, colors, mathFont } = useConceptTheme(); + const { darkMode, colors, mathFont } = useConceptOptions(); const { schema } = useRSForm(); const internalRef = useRef(null); diff --git a/rsconcept/frontend/src/components/RefsInput/RefsInput.tsx b/rsconcept/frontend/src/components/RefsInput/RefsInput.tsx index 526093eb..22ad65c6 100644 --- a/rsconcept/frontend/src/components/RefsInput/RefsInput.tsx +++ b/rsconcept/frontend/src/components/RefsInput/RefsInput.tsx @@ -11,7 +11,7 @@ import { forwardRef, useCallback, useMemo, useRef, useState } from 'react'; import Label from '@/components/ui/Label'; import { useRSForm } from '@/context/RSFormContext'; -import { useConceptTheme } from '@/context/ThemeContext'; +import { useConceptOptions } from '@/context/OptionsContext'; import DlgEditReference from '@/dialogs/DlgEditReference'; import { ReferenceType } from '@/models/language'; import { IConstituenta } from '@/models/rsform'; @@ -63,7 +63,7 @@ interface RefsInputInputProps const RefsInput = forwardRef( ({ id, label, disabled, items, initialValue, value, resolved, onFocus, onBlur, onChange, ...restProps }, ref) => { - const { darkMode, colors } = useConceptTheme(); + const { darkMode, colors } = useConceptOptions(); const { schema } = useRSForm(); const [isFocused, setIsFocused] = useState(false); diff --git a/rsconcept/frontend/src/components/info/GrammemeBadge.tsx b/rsconcept/frontend/src/components/info/GrammemeBadge.tsx index e235df23..c1e51320 100644 --- a/rsconcept/frontend/src/components/info/GrammemeBadge.tsx +++ b/rsconcept/frontend/src/components/info/GrammemeBadge.tsx @@ -1,6 +1,6 @@ import clsx from 'clsx'; -import { useConceptTheme } from '@/context/ThemeContext'; +import { useConceptOptions } from '@/context/OptionsContext'; import { GramData } from '@/models/language'; import { colorFgGrammeme } from '@/styling/color'; import { labelGrammeme } from '@/utils/labels'; @@ -10,7 +10,7 @@ interface GrammemeBadgeProps { } function GrammemeBadge({ grammeme }: GrammemeBadgeProps) { - const { colors } = useConceptTheme(); + const { colors } = useConceptOptions(); return (
diff --git a/rsconcept/frontend/src/components/info/InfoCstStatus.tsx b/rsconcept/frontend/src/components/info/InfoCstStatus.tsx index dda547c6..f3c8002c 100644 --- a/rsconcept/frontend/src/components/info/InfoCstStatus.tsx +++ b/rsconcept/frontend/src/components/info/InfoCstStatus.tsx @@ -1,6 +1,6 @@ import clsx from 'clsx'; -import { useConceptTheme } from '@/context/ThemeContext'; +import { useConceptOptions } from '@/context/OptionsContext'; import { ExpressionStatus } from '@/models/rsform'; import { colorBgCstStatus } from '@/styling/color'; import { prefixes } from '@/utils/constants'; @@ -11,7 +11,7 @@ interface InfoCstStatusProps { } function InfoCstStatus({ title }: InfoCstStatusProps) { - const { colors } = useConceptTheme(); + const { colors } = useConceptOptions(); return (
diff --git a/rsconcept/frontend/src/components/info/InfoTopic.tsx b/rsconcept/frontend/src/components/info/InfoTopic.tsx index 29b68051..1f49d8ad 100644 --- a/rsconcept/frontend/src/components/info/InfoTopic.tsx +++ b/rsconcept/frontend/src/components/info/InfoTopic.tsx @@ -2,6 +2,7 @@ import { HelpTopic } from '@/models/miscellaneous'; import HelpAPI from '../man/HelpAPI'; import HelpConstituenta from '../man/HelpConstituenta'; +import HelpCstAttributes from '../man/HelpCstAttributes'; import HelpExteor from '../man/HelpExteor'; import HelpLibrary from '../man/HelpLibrary'; import HelpMain from '../man/HelpMain'; @@ -22,8 +23,9 @@ function InfoTopic({ topic }: InfoTopicProps) { if (topic === HelpTopic.MAIN) return ; if (topic === HelpTopic.LIBRARY) return ; if (topic === HelpTopic.RSFORM) return ; - if (topic === HelpTopic.CSTLIST) return ; - if (topic === HelpTopic.CONSTITUENTA) return ; + if (topic === HelpTopic.CST_ATTRIBUTES) return ; + if (topic === HelpTopic.CST_LIST) return ; + if (topic === HelpTopic.CST_EDITOR) return ; if (topic === HelpTopic.GRAPH_TERM) return ; if (topic === HelpTopic.RSTEMPLATES) return ; if (topic === HelpTopic.RSLANG) return ; diff --git a/rsconcept/frontend/src/components/man/HelpButton.tsx b/rsconcept/frontend/src/components/man/BadgeHelp.tsx similarity index 67% rename from rsconcept/frontend/src/components/man/HelpButton.tsx rename to rsconcept/frontend/src/components/man/BadgeHelp.tsx index bb17f610..56fc1913 100644 --- a/rsconcept/frontend/src/components/man/HelpButton.tsx +++ b/rsconcept/frontend/src/components/man/BadgeHelp.tsx @@ -1,22 +1,28 @@ -import { BiInfoCircle } from 'react-icons/bi'; +import { LuLightbulb } from 'react-icons/lu'; import TextURL from '@/components/ui/TextURL'; import Tooltip, { PlacesType } from '@/components/ui/Tooltip'; +import { useConceptOptions } from '@/context/OptionsContext'; import { HelpTopic } from '@/models/miscellaneous'; import InfoTopic from '../info/InfoTopic'; import { CProps } from '../props'; -interface HelpButtonProps extends CProps.Styling { +interface BadgeHelpProps extends CProps.Styling { topic: HelpTopic; offset?: number; place?: PlacesType; } -function HelpButton({ topic, ...restProps }: HelpButtonProps) { +function BadgeHelp({ topic, ...restProps }: BadgeHelpProps) { + const { showHelp } = useConceptOptions(); + + if (!showHelp) { + return null; + } return (
- +
event.stopPropagation()}>
@@ -29,4 +35,4 @@ function HelpButton({ topic, ...restProps }: HelpButtonProps) { ); } -export default HelpButton; +export default BadgeHelp; diff --git a/rsconcept/frontend/src/components/man/HelpConstituenta.tsx b/rsconcept/frontend/src/components/man/HelpConstituenta.tsx index b3e154af..5d577dd4 100644 --- a/rsconcept/frontend/src/components/man/HelpConstituenta.tsx +++ b/rsconcept/frontend/src/components/man/HelpConstituenta.tsx @@ -4,7 +4,7 @@ import Divider from '@/components/ui/Divider'; function HelpConstituenta() { // prettier-ignore return ( -
+

Редактор конституент

Сохранить изменения: Ctrl + S или клик по кнопке Сохранить

Формальное определение

@@ -12,7 +12,7 @@ function HelpConstituenta() {

- специальные конструкции вводятся с помощью кнопок снизу

Термин и Определение

- Ctrl + Пробел открывает редактирование отсылок

-

Список конституент справа

+

Список конституент

- первая настройка - атрибуты конституенты

- вторая настройка - отбор по графу термов

- текущая конституента выделена цветом строки

diff --git a/rsconcept/frontend/src/components/man/HelpCstAttributes.tsx b/rsconcept/frontend/src/components/man/HelpCstAttributes.tsx new file mode 100644 index 00000000..f7bb2430 --- /dev/null +++ b/rsconcept/frontend/src/components/man/HelpCstAttributes.tsx @@ -0,0 +1,30 @@ +import { HelpTopic } from '@/models/miscellaneous'; + +import TextURL from '../ui/TextURL'; + +function HelpCstAttributes() { + // prettier-ignore + return ( +
+

Аттрибуты конституенты

+

Термин может быть задан для любой конституенты. Он используется для отсылок текстах в других Терминах и Текстовых определениях

+

Формальное определение строится с помощью формального аппарата

+

Типизация вычисляется автоматически на основе Формального определения и отражает структуру элементов множества, задаваемого определением

+

Текстовое определение указывается для конституент, у которых есть Формальное определение или Область определения. Оно является текстовой интерпретацией формального определения и может содержать только слова-связки, термины теории множеств и отсылки на Термины ранее введенных конституент

+

Конвенция - договоренность о соотнесении неопределяемого понятия с сущностями в предметной области

+

Комментарий может быть добавлен к любому производному понятию для хранения дополнительной информации

+ +

Неопределяемые понятия

+

X1, C1 - Базисные множества и Константные множества не обладают сложной структурой и определяются Конвенцией. Элементы Константных множеств участвуют в арифметических операциях и порядковых предикатах наряду с мощностями множеств

+

S1 :∈ ℬ(X1) - Родовые структуры задаются совокупностью Области определения, Конвенции и набора Аксиом, а также Термином. Согласно Конвенции элементы родовой структуры заполняются из Области определения так, чтобы Аксиомы были выполнены. Родовая структура может быть как множеством, так и элементом или кортежем

+

A1 :== ∀(α,β)∈S1 (β,α)∈S1 - Аксиомы задаются логическим Формальным определением и по необходимости Конвенцией

+

Производные понятия

+

D1 :== Pr1(S1) - Термы задаются типизированным Формальным определением

+

T1 :== Pr1(S1)=Pr2(S1) - Теоремы определяются логическим Формальным определением

+

F1 :== [σ∈ℬ(X1×X1)] Pr1(σ)\Pr2(σ)
Терм-функции определяются параметризованным типизированным Формальным определением

+

P1 :== [σ∈ℬ(X1×X1)] card(Pr1(σ)) = card(σ)
Предикат-функции определяются параметризованным логическим Формальным определением

+ +
); +} + +export default HelpCstAttributes; diff --git a/rsconcept/frontend/src/components/man/HelpRSFormItems.tsx b/rsconcept/frontend/src/components/man/HelpRSFormItems.tsx index 2ba1aa4b..a0970824 100644 --- a/rsconcept/frontend/src/components/man/HelpRSFormItems.tsx +++ b/rsconcept/frontend/src/components/man/HelpRSFormItems.tsx @@ -4,13 +4,18 @@ import Divider from '@/components/ui/Divider'; function HelpRSFormItems() { // prettier-ignore return ( -
-

Горячие клавиши

-

Двойной клик / Alt + клик - редактирование конституенты

-

Клик на квадрат слева - выделение конституенты

-

Alt + вверх/вниз - движение конституент

-

Delete - удаление конституент

-

Alt + 1-6,Q,W - добавление конституент

+
+

Список конституент

+

Конституенты обладают уникальным Именем, включающим их тип

+

Список поддерживает выделение и перемещение

+

Управление списком

+

Клик на строку - выделение

+

Shift + клик - выделение нескольких

+

Alt + клик - Редактор

+

Двойной клик - Редактор

+

Alt + вверх/вниз - перемещение

+

Delete - удаление

+

Alt + 1-6,Q,W - добавление

); diff --git a/rsconcept/frontend/src/components/man/HelpRSFormMeta.tsx b/rsconcept/frontend/src/components/man/HelpRSFormMeta.tsx index 37056bbf..f091a8b7 100644 --- a/rsconcept/frontend/src/components/man/HelpRSFormMeta.tsx +++ b/rsconcept/frontend/src/components/man/HelpRSFormMeta.tsx @@ -1,8 +1,11 @@ function HelpRSFormMeta() { // prettier-ignore return ( -
-

Паспорт схемы

+
+

Карточка схемы

+

Концептуальная схема содержит конституенты, формирующие систему терминов и определений

+

Карточка схемы содержит общую информацию и статистику схемы

+

Управление

Сохранить изменения: Ctrl + S или кнопка Сохранить

Владелец обладает правом редактирования

Общедоступные схемы доступны для всех

diff --git a/rsconcept/frontend/src/components/man/HelpTermGraph.tsx b/rsconcept/frontend/src/components/man/HelpTermGraph.tsx index bc279342..bc66b064 100644 --- a/rsconcept/frontend/src/components/man/HelpTermGraph.tsx +++ b/rsconcept/frontend/src/components/man/HelpTermGraph.tsx @@ -6,7 +6,7 @@ function HelpTermGraph() { // prettier-ignore return (
-
+

Настройка графа

Цвет - выбор правила покраски узлов

Граф - выбор модели расположения узлов

@@ -20,7 +20,7 @@ function HelpTermGraph() { -
+

Клавиши

Клик на конституенту - выделение

Клик на выделенную - редактирование

diff --git a/rsconcept/frontend/src/components/select/ConstituentaMultiPicker.tsx b/rsconcept/frontend/src/components/select/ConstituentaMultiPicker.tsx index 99d7d7ff..bf2d6559 100644 --- a/rsconcept/frontend/src/components/select/ConstituentaMultiPicker.tsx +++ b/rsconcept/frontend/src/components/select/ConstituentaMultiPicker.tsx @@ -4,7 +4,7 @@ import clsx from 'clsx'; import { useCallback, useLayoutEffect, useMemo, useState } from 'react'; import DataTable, { createColumnHelper, RowSelectionState } from '@/components/ui/DataTable'; -import { useConceptTheme } from '@/context/ThemeContext'; +import { useConceptOptions } from '@/context/OptionsContext'; import { ConstituentaID, IConstituenta, IRSForm } from '@/models/rsform'; import { describeConstituenta } from '@/utils/labels'; @@ -25,7 +25,7 @@ interface ConstituentaMultiPickerProps { const columnHelper = createColumnHelper(); function ConstituentaMultiPicker({ id, schema, prefixID, rows, selected, setSelected }: ConstituentaMultiPickerProps) { - const { colors } = useConceptTheme(); + const { colors } = useConceptOptions(); const [rowSelection, setRowSelection] = useState({}); useLayoutEffect(() => { diff --git a/rsconcept/frontend/src/components/select/ConstituentaPicker.tsx b/rsconcept/frontend/src/components/select/ConstituentaPicker.tsx index 24f867ca..7d019b91 100644 --- a/rsconcept/frontend/src/components/select/ConstituentaPicker.tsx +++ b/rsconcept/frontend/src/components/select/ConstituentaPicker.tsx @@ -4,7 +4,7 @@ import { useEffect, useMemo, useState } from 'react'; import DataTable, { createColumnHelper, IConditionalStyle } from '@/components/ui/DataTable'; import SearchBar from '@/components/ui/SearchBar'; -import { useConceptTheme } from '@/context/ThemeContext'; +import { useConceptOptions } from '@/context/OptionsContext'; import { CstMatchMode } from '@/models/miscellaneous'; import { IConstituenta } from '@/models/rsform'; import { matchConstituenta } from '@/models/rsformAPI'; @@ -43,7 +43,7 @@ function ConstituentaPicker({ onBeginFilter, onSelectValue }: ConstituentaPickerProps) { - const { colors } = useConceptTheme(); + const { colors } = useConceptOptions(); const [filteredData, setFilteredData] = useState([]); const [filterText, setFilterText] = useState(initialFilter); diff --git a/rsconcept/frontend/src/components/select/SchemaPicker.tsx b/rsconcept/frontend/src/components/select/SchemaPicker.tsx index cbbe38a8..85951b59 100644 --- a/rsconcept/frontend/src/components/select/SchemaPicker.tsx +++ b/rsconcept/frontend/src/components/select/SchemaPicker.tsx @@ -4,7 +4,7 @@ import { useIntl } from 'react-intl'; import DataTable, { createColumnHelper, IConditionalStyle } from '@/components/ui/DataTable'; import SearchBar from '@/components/ui/SearchBar'; import { useLibrary } from '@/context/LibraryContext'; -import { useConceptTheme } from '@/context/ThemeContext'; +import { useConceptOptions } from '@/context/OptionsContext'; import { ILibraryItem, LibraryItemID } from '@/models/library'; import { ILibraryFilter } from '@/models/miscellaneous'; @@ -23,7 +23,7 @@ const columnHelper = createColumnHelper(); function SchemaPicker({ id, initialFilter = '', rows = 4, value, onSelectValue }: SchemaPickerProps) { const intl = useIntl(); - const { colors } = useConceptTheme(); + const { colors } = useConceptOptions(); const library = useLibrary(); const [filterText, setFilterText] = useState(initialFilter); diff --git a/rsconcept/frontend/src/components/select/SubstitutionsPicker.tsx b/rsconcept/frontend/src/components/select/SubstitutionsPicker.tsx index 4ebac9c4..6f775281 100644 --- a/rsconcept/frontend/src/components/select/SubstitutionsPicker.tsx +++ b/rsconcept/frontend/src/components/select/SubstitutionsPicker.tsx @@ -9,7 +9,7 @@ import ConstituentaSelector from '@/components/select/ConstituentaSelector'; import DataTable, { createColumnHelper } from '@/components/ui/DataTable'; import Label from '@/components/ui/Label'; import MiniButton from '@/components/ui/MiniButton'; -import { useConceptTheme } from '@/context/ThemeContext'; +import { useConceptOptions } from '@/context/OptionsContext'; import { IConstituenta, IRSForm, ISubstitution } from '@/models/rsform'; import { describeConstituenta } from '@/utils/labels'; @@ -54,7 +54,7 @@ function SubstitutionsPicker({ setItems, prefixID }: SubstitutionsPickerProps) { - const { colors } = useConceptTheme(); + const { colors } = useConceptOptions(); const [leftCst, setLeftCst] = useState(undefined); const [rightCst, setRightCst] = useState(undefined); diff --git a/rsconcept/frontend/src/components/ui/Loader.tsx b/rsconcept/frontend/src/components/ui/Loader.tsx index 4839c5dd..48ddb187 100644 --- a/rsconcept/frontend/src/components/ui/Loader.tsx +++ b/rsconcept/frontend/src/components/ui/Loader.tsx @@ -2,7 +2,7 @@ import { ThreeDots } from 'react-loader-spinner'; -import { useConceptTheme } from '@/context/ThemeContext'; +import { useConceptOptions } from '@/context/OptionsContext'; import AnimateFade from '../wrap/AnimateFade'; @@ -11,7 +11,7 @@ interface LoaderProps { } function Loader({ size = 10 }: LoaderProps) { - const { colors } = useConceptTheme(); + const { colors } = useConceptOptions(); return ( diff --git a/rsconcept/frontend/src/components/ui/SelectMulti.tsx b/rsconcept/frontend/src/components/ui/SelectMulti.tsx index 4d5b2a43..d7bfddd9 100644 --- a/rsconcept/frontend/src/components/ui/SelectMulti.tsx +++ b/rsconcept/frontend/src/components/ui/SelectMulti.tsx @@ -3,7 +3,7 @@ import { useMemo } from 'react'; import Select, { GroupBase, Props, StylesConfig } from 'react-select'; -import { useConceptTheme } from '@/context/ThemeContext'; +import { useConceptOptions } from '@/context/OptionsContext'; import { selectDarkT, selectLightT } from '@/styling/color'; export interface SelectMultiProps = GroupBase