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