diff --git a/rsconcept/frontend/src/components/data-table/table-body.tsx b/rsconcept/frontend/src/components/data-table/table-body.tsx index d66faf9e..78fce325 100644 --- a/rsconcept/frontend/src/components/data-table/table-body.tsx +++ b/rsconcept/frontend/src/components/data-table/table-body.tsx @@ -75,7 +75,7 @@ export function TableBody({ key={row.id} className={clsx( 'cc-scroll-row', - 'clr-hover cc-animate-background duration-300', + 'clr-hover cc-animate-background duration-(--duration-fade)', !noHeader && 'scroll-mt-[calc(2px+2rem)]', table.options.enableRowSelection && row.getIsSelected() ? 'clr-selected' diff --git a/rsconcept/frontend/src/components/icons.tsx b/rsconcept/frontend/src/components/icons.tsx index 8ac69cdb..16def543 100644 --- a/rsconcept/frontend/src/components/icons.tsx +++ b/rsconcept/frontend/src/components/icons.tsx @@ -146,6 +146,7 @@ export { BiGitMerge as IconGraphOutputs } from 'react-icons/bi'; export { LuAtom as IconGraphCore } from 'react-icons/lu'; export { LuRotate3D as IconRotate3D } from 'react-icons/lu'; export { MdOutlineFitScreen as IconFitImage } from 'react-icons/md'; +export { RiFocus3Line as IconFocus } from 'react-icons/ri'; export { LuSparkles as IconClustering } from 'react-icons/lu'; export { LuSparkle as IconClusteringOff } from 'react-icons/lu'; export { TbGridDots as IconGrid } from 'react-icons/tb'; diff --git a/rsconcept/frontend/src/features/help/items/ui/help-rsgraph-term.tsx b/rsconcept/frontend/src/features/help/items/ui/help-rsgraph-term.tsx index c76bf200..9e908f2d 100644 --- a/rsconcept/frontend/src/features/help/items/ui/help-rsgraph-term.tsx +++ b/rsconcept/frontend/src/features/help/items/ui/help-rsgraph-term.tsx @@ -5,6 +5,7 @@ import { IconEdit, IconFilter, IconFitImage, + IconFocus, IconGraphCollapse, IconGraphCore, IconGraphExpand, @@ -47,9 +48,7 @@ export function HelpRSGraphTerm() {

Изменение узлов

  • Клик на узел – выделение
  • -
  • - Левый клик – выбор фокус-конституенты -
  • +
  • Левый клик – выбор фокус-конституенты
  • Esc – сбросить выделение
  • @@ -76,6 +75,9 @@ export function HelpRSGraphTerm() {
  • Открыть настройки
  • +
  • + Задать фокус +
  • Вписать в экран
  • diff --git a/rsconcept/frontend/src/features/library/pages/library-page/library-page.tsx b/rsconcept/frontend/src/features/library/pages/library-page/library-page.tsx index 98e6b8b8..8650f690 100644 --- a/rsconcept/frontend/src/features/library/pages/library-page/library-page.tsx +++ b/rsconcept/frontend/src/features/library/pages/library-page/library-page.tsx @@ -57,7 +57,7 @@ export function LibraryPage() {
    } onClick={handleDownloadCSV} /> diff --git a/rsconcept/frontend/src/features/rsform/pages/rsform-page/editor-rslist/editor-rslist.tsx b/rsconcept/frontend/src/features/rsform/pages/rsform-page/editor-rslist/editor-rslist.tsx index f6a716a0..d7799960 100644 --- a/rsconcept/frontend/src/features/rsform/pages/rsform-page/editor-rslist/editor-rslist.tsx +++ b/rsconcept/frontend/src/features/rsform/pages/rsform-page/editor-rslist/editor-rslist.tsx @@ -146,7 +146,7 @@ export function EditorRSList() { ) : null} } onClick={handleDownloadCSV} diff --git a/rsconcept/frontend/src/features/rsform/pages/rsform-page/editor-term-graph/graph/tg-node.tsx b/rsconcept/frontend/src/features/rsform/pages/rsform-page/editor-term-graph/graph/tg-node.tsx index 0d0c6c04..3b812368 100644 --- a/rsconcept/frontend/src/features/rsform/pages/rsform-page/editor-term-graph/graph/tg-node.tsx +++ b/rsconcept/frontend/src/features/rsform/pages/rsform-page/editor-term-graph/graph/tg-node.tsx @@ -27,10 +27,10 @@ interface TGNodeInternal { } export function TGNode(node: TGNodeInternal) { - const { focusCst, setFocus: setFocusCst, navigateCst } = useRSEdit(); + const { focusCst, setFocus, navigateCst } = useRSEdit(); const filter = useTermGraphStore(state => state.filter); const coloring = useTermGraphStore(state => state.coloring); - const isFocused = focusCst === node.data; + const isFocused = focusCst?.id === node.data.id; const label = node.data.alias; const description = !filter.noText ? node.data.term_resolved : ''; @@ -38,7 +38,7 @@ export function TGNode(node: TGNodeInternal) { function handleContextMenu(event: React.MouseEvent) { event.stopPropagation(); event.preventDefault(); - setFocusCst(isFocused ? null : node.data); + setFocus(isFocused ? null : node.data); } function handleDoubleClick(event: React.MouseEvent) { diff --git a/rsconcept/frontend/src/features/rsform/pages/rsform-page/editor-term-graph/toolbar-focused-cst.tsx b/rsconcept/frontend/src/features/rsform/pages/rsform-page/editor-term-graph/toolbar-focused-cst.tsx index 9d8cd8f8..cb2e9ec0 100644 --- a/rsconcept/frontend/src/features/rsform/pages/rsform-page/editor-term-graph/toolbar-focused-cst.tsx +++ b/rsconcept/frontend/src/features/rsform/pages/rsform-page/editor-term-graph/toolbar-focused-cst.tsx @@ -12,7 +12,7 @@ export function ToolbarFocusedCst() { const filter = useTermGraphStore(state => state.filter); const setFilter = useTermGraphStore(state => state.setFilter); - function resetSelection() { + function resetFocus() { setFocus(null); } @@ -36,17 +36,17 @@ export function ToolbarFocusedCst() { return (
    -
    +
    Фокус - {focusCst.alias} + {focusCst.alias}
    } - onClick={resetSelection} + onClick={resetFocus} /> } onClick={showParams} /> + } + disabled={selected.length !== 1} + onClick={handleSetFocus} + /> } diff --git a/rsconcept/frontend/src/features/rsform/pages/rsform-page/rstabs.tsx b/rsconcept/frontend/src/features/rsform/pages/rsform-page/rstabs.tsx index c7d3ddef..3bad686f 100644 --- a/rsconcept/frontend/src/features/rsform/pages/rsform-page/rstabs.tsx +++ b/rsconcept/frontend/src/features/rsform/pages/rsform-page/rstabs.tsx @@ -43,6 +43,8 @@ export function RSTabs({ activeID, activeTab }: RSTabsProps) { if (activeTab === RSTabID.CST_EDIT) { if (activeID && schema.cstByID.has(activeID)) { setSelected([activeID]); + } else if (schema.items.length > 0) { + setSelected([schema.items[0].id]); } else { deselectAll(); } diff --git a/rsconcept/frontend/src/styling/constants.css b/rsconcept/frontend/src/styling/constants.css index c4903493..76d31e7f 100644 --- a/rsconcept/frontend/src/styling/constants.css +++ b/rsconcept/frontend/src/styling/constants.css @@ -41,7 +41,7 @@ --clr-warn-600: oklch(060% 0.250 27deg); --clr-ok-600: oklch(060% 0.250 143deg); - --clr-select-node: oklch(080% 0.150 165deg); + --clr-select-node: oklch(080% 0.250 180deg); /* Highlight accents */ --acc-bg-red: oklch(085% 0.150 27deg); @@ -51,8 +51,8 @@ --acc-bg-teal: oklch(085% 0.200 210deg); --acc-bg-orange: oklch(085% 0.150 62deg); - --acc-bg-green25: oklch(097% 0.131 138deg); - --acc-bg-green50: oklch(090% 0.175 138deg); + --acc-bg-green25: oklch(097% 0.150 138deg); + --acc-bg-green50: oklch(090% 0.150 138deg); --acc-bg-orange50: oklch(090% 0.044 62deg); --acc-fg-red: oklch(060% 0.220 27deg); @@ -83,11 +83,11 @@ --clr-sec-600: oklch(065% 0.250 295deg); --clr-sec-800: oklch(075% 0.250 295deg); - --clr-warn-100: oklch(025% 0.108 27deg); + --clr-warn-100: oklch(025% 0.100 27deg); --clr-warn-600: oklch(070% 0.200 27deg); --clr-ok-600: oklch(070% 0.200 143deg); - --clr-select-node: oklch(070% 0.147 165deg); + --clr-select-node: oklch(070% 0.250 180deg); /* Highlight accents */ --acc-bg-red: oklch(050% 0.150 27deg);