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