Compare commits
6 Commits
d7ee1db6a9
...
b24a3a568b
Author | SHA1 | Date | |
---|---|---|---|
![]() |
b24a3a568b | ||
![]() |
636e20aae4 | ||
![]() |
99a08da2e6 | ||
![]() |
e1d99c47ca | ||
![]() |
a10cd42f6b | ||
![]() |
b0e836406f |
|
@ -3,6 +3,7 @@
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import { AnimatePresence, motion } from 'framer-motion';
|
import { AnimatePresence, motion } from 'framer-motion';
|
||||||
import { useCallback, useLayoutEffect, useMemo, useState } from 'react';
|
import { useCallback, useLayoutEffect, useMemo, useState } from 'react';
|
||||||
|
import { toast } from 'react-toastify';
|
||||||
|
|
||||||
import { IconFolder, IconFolderClosed, IconFolderEmpty, IconFolderOpened, IconFolderTree } from '@/components/Icons';
|
import { IconFolder, IconFolderClosed, IconFolderEmpty, IconFolderOpened, IconFolderTree } from '@/components/Icons';
|
||||||
import BadgeHelp from '@/components/info/BadgeHelp';
|
import BadgeHelp from '@/components/info/BadgeHelp';
|
||||||
|
@ -11,8 +12,8 @@ import MiniButton from '@/components/ui/MiniButton';
|
||||||
import { FolderNode, FolderTree } from '@/models/FolderTree';
|
import { FolderNode, FolderTree } from '@/models/FolderTree';
|
||||||
import { HelpTopic } from '@/models/miscellaneous';
|
import { HelpTopic } from '@/models/miscellaneous';
|
||||||
import { animateSideAppear, animateSideView } from '@/styling/animations';
|
import { animateSideAppear, animateSideView } from '@/styling/animations';
|
||||||
import { globals, PARAMETER, prefixes } from '@/utils/constants';
|
import { PARAMETER, prefixes } from '@/utils/constants';
|
||||||
import { describeFolderNode, labelFolderNode } from '@/utils/labels';
|
import { information, labelFolderNode } from '@/utils/labels';
|
||||||
|
|
||||||
interface LibraryTableProps {
|
interface LibraryTableProps {
|
||||||
folders: FolderTree;
|
folders: FolderTree;
|
||||||
|
@ -49,11 +50,18 @@ function LibraryFolders({ folders, currentFolder, setFolder, toggleFolderMode }:
|
||||||
[items]
|
[items]
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleSetValue = useCallback(
|
const handleClickFolder = useCallback(
|
||||||
(event: CProps.EventMouse, target: FolderNode) => {
|
(event: CProps.EventMouse, target: FolderNode) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
setFolder(target.getPath());
|
if (event.ctrlKey) {
|
||||||
|
navigator.clipboard
|
||||||
|
.writeText(target.getPath())
|
||||||
|
.then(() => toast.success(information.pathReady))
|
||||||
|
.catch(console.error);
|
||||||
|
} else {
|
||||||
|
setFolder(target.getPath());
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[setFolder]
|
[setFolder]
|
||||||
);
|
);
|
||||||
|
@ -69,7 +77,7 @@ function LibraryFolders({ folders, currentFolder, setFolder, toggleFolderMode }:
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<motion.div
|
<motion.div
|
||||||
className='flex flex-col text:xs sm:text-sm'
|
className='flex flex-col select-none text:xs sm:text-sm'
|
||||||
initial={{ ...animateSideView.initial }}
|
initial={{ ...animateSideView.initial }}
|
||||||
animate={{ ...animateSideView.animate }}
|
animate={{ ...animateSideView.animate }}
|
||||||
exit={{ ...animateSideView.exit }}
|
exit={{ ...animateSideView.exit }}
|
||||||
|
@ -109,9 +117,7 @@ function LibraryFolders({ folders, currentFolder, setFolder, toggleFolderMode }:
|
||||||
activeNode === item && 'clr-selected'
|
activeNode === item && 'clr-selected'
|
||||||
)}
|
)}
|
||||||
style={{ paddingLeft: `${(item.rank > 5 ? 5 : item.rank) * 0.5 + 0.5}rem` }}
|
style={{ paddingLeft: `${(item.rank > 5 ? 5 : item.rank) * 0.5 + 0.5}rem` }}
|
||||||
data-tooltip-id={globals.tooltip}
|
onClick={event => handleClickFolder(event, item)}
|
||||||
data-tooltip-html={describeFolderNode(item)}
|
|
||||||
onClick={event => handleSetValue(event, item)}
|
|
||||||
initial={{ ...animateSideAppear.initial }}
|
initial={{ ...animateSideAppear.initial }}
|
||||||
animate={{ ...animateSideAppear.animate }}
|
animate={{ ...animateSideAppear.animate }}
|
||||||
exit={{ ...animateSideAppear.exit }}
|
exit={{ ...animateSideAppear.exit }}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import {
|
import {
|
||||||
|
IconFilterReset,
|
||||||
IconFolder,
|
IconFolder,
|
||||||
IconFolderClosed,
|
IconFolderClosed,
|
||||||
IconFolderEmpty,
|
IconFolderEmpty,
|
||||||
|
@ -16,8 +17,9 @@ function HelpLibrary() {
|
||||||
<h1>Библиотека схем</h1>
|
<h1>Библиотека схем</h1>
|
||||||
<p>В библиотеке собраны концептуальные схемы, эксплицированные в родоструктурном аппарате</p>
|
<p>В библиотеке собраны концептуальные схемы, эксплицированные в родоструктурном аппарате</p>
|
||||||
|
|
||||||
<h2>Интерфейс</h2>
|
<li>клик по строке - переход к редактированию схемы</li>
|
||||||
<li>Ctrl + клик по строке откроет схему в новой вкладке</li>
|
<li>Ctrl + клик по строке откроет схему в новой вкладке</li>
|
||||||
|
<li>Фильтры атрибутов три позиции: да/нет/не применять</li>
|
||||||
<li>
|
<li>
|
||||||
<IconShow size='1rem' className='inline-icon' /> фильтры атрибутов применяются по клику
|
<IconShow size='1rem' className='inline-icon' /> фильтры атрибутов применяются по клику
|
||||||
</li>
|
</li>
|
||||||
|
@ -31,13 +33,17 @@ function HelpLibrary() {
|
||||||
<li>
|
<li>
|
||||||
<IconFolder size='1rem' className='inline-icon' /> фильтр по расположению
|
<IconFolder size='1rem' className='inline-icon' /> фильтр по расположению
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
<h2>Проводник</h2>
|
<IconFilterReset size='1rem' className='inline-icon' /> сбросить фильтры
|
||||||
<li>клик по папке отображает справа файлы в ней</li>
|
</li>
|
||||||
<li>клик по иконке сворачивает/разворачивает вложенные</li>
|
|
||||||
<li>
|
<li>
|
||||||
<IconFolderTree size='1rem' className='inline-icon' /> переключение между Проводник и Поиск
|
<IconFolderTree size='1rem' className='inline-icon' /> переключение между Проводник и Поиск
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<h2>Режим: Проводник</h2>
|
||||||
|
<li>клик по папке отображает справа файлы в ней</li>
|
||||||
|
<li>Ctrl + клик по папке копирует путь в буфер обмена</li>
|
||||||
|
<li>клик по иконке сворачивает/разворачивает вложенные</li>
|
||||||
<li>
|
<li>
|
||||||
<IconFolderEmpty size='1rem' className='inline-icon clr-text-default' /> папка без файлов
|
<IconFolderEmpty size='1rem' className='inline-icon clr-text-default' /> папка без файлов
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -115,7 +115,7 @@ function EditorConstituenta({ activeCst, isModified, setIsModified, onOpenEdit }
|
||||||
onRename={controller.renameCst}
|
onRename={controller.renameCst}
|
||||||
onOpenEdit={onOpenEdit}
|
onOpenEdit={onOpenEdit}
|
||||||
/>
|
/>
|
||||||
<AnimatePresence>
|
<AnimatePresence initial={false}>
|
||||||
{showList ? (
|
{showList ? (
|
||||||
<ViewConstituents
|
<ViewConstituents
|
||||||
schema={controller.schema}
|
schema={controller.schema}
|
||||||
|
|
|
@ -188,22 +188,32 @@ export const animateParseResults: Variants = {
|
||||||
|
|
||||||
export const animateSideView = {
|
export const animateSideView = {
|
||||||
initial: {
|
initial: {
|
||||||
clipPath: 'inset(0% 100% 0% 0%)'
|
width: 0,
|
||||||
|
opacity: 0
|
||||||
},
|
},
|
||||||
animate: {
|
animate: {
|
||||||
clipPath: 'inset(0% 0% 0% 0%)',
|
width: 'auto',
|
||||||
|
opacity: 1,
|
||||||
transition: {
|
transition: {
|
||||||
type: 'spring',
|
width: {
|
||||||
bounce: 0,
|
duration: 0.4
|
||||||
duration: 1
|
},
|
||||||
|
opacity: {
|
||||||
|
delay: 0.4,
|
||||||
|
duration: 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
exit: {
|
exit: {
|
||||||
clipPath: 'inset(0% 100% 0% 0%)',
|
width: 0,
|
||||||
|
opacity: 0,
|
||||||
transition: {
|
transition: {
|
||||||
type: 'spring',
|
width: {
|
||||||
bounce: 0,
|
duration: 0.4
|
||||||
duration: 1
|
},
|
||||||
|
opacity: {
|
||||||
|
duration: 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -898,6 +898,7 @@ export const information = {
|
||||||
subscribed: 'Отслеживание отключено',
|
subscribed: 'Отслеживание отключено',
|
||||||
unsubscribed: 'Отслеживание выключено',
|
unsubscribed: 'Отслеживание выключено',
|
||||||
|
|
||||||
|
pathReady: 'Путь скопирован',
|
||||||
substituteSingle: 'Отождествление завершено',
|
substituteSingle: 'Отождествление завершено',
|
||||||
reorderComplete: 'Упорядочение завершено',
|
reorderComplete: 'Упорядочение завершено',
|
||||||
reindexComplete: 'Имена конституент обновлены',
|
reindexComplete: 'Имена конституент обновлены',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user