mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 13:00:39 +03:00
This commit is contained in:
parent
abc28940a9
commit
c92a4058b9
|
@ -52,7 +52,7 @@ function SelectLocationContext({
|
||||||
/>
|
/>
|
||||||
<Dropdown
|
<Dropdown
|
||||||
isOpen={menu.isOpen}
|
isOpen={menu.isOpen}
|
||||||
className={clsx('w-[20rem] h-[12.5rem] z-modalTooltip mt-0', className)}
|
className={clsx('w-[20rem] h-[12.5rem] z-modalTooltip mt-[-0.25rem]', className)}
|
||||||
style={style}
|
style={style}
|
||||||
>
|
>
|
||||||
<SelectLocation
|
<SelectLocation
|
||||||
|
|
|
@ -43,7 +43,7 @@ function DlgChangeLocation({ hideWindow, initial, onChangeLocation }: DlgChangeL
|
||||||
hideWindow={hideWindow}
|
hideWindow={hideWindow}
|
||||||
canSubmit={isValid}
|
canSubmit={isValid}
|
||||||
onSubmit={() => onChangeLocation(location)}
|
onSubmit={() => onChangeLocation(location)}
|
||||||
className={clsx('w-[35rem]', 'pb-3 px-6 flex gap-3')}
|
className={clsx('w-[35rem]', 'pb-3 px-6 flex gap-3 h-[9rem]')}
|
||||||
>
|
>
|
||||||
<div className='flex flex-col gap-2 min-w-[7rem] h-min'>
|
<div className='flex flex-col gap-2 min-w-[7rem] h-min'>
|
||||||
<Label className='select-none' text='Корень' />
|
<Label className='select-none' text='Корень' />
|
||||||
|
|
|
@ -10,6 +10,7 @@ import { CProps } from '@/components/props';
|
||||||
import SelectLocation from '@/components/select/SelectLocation';
|
import SelectLocation from '@/components/select/SelectLocation';
|
||||||
import MiniButton from '@/components/ui/MiniButton';
|
import MiniButton from '@/components/ui/MiniButton';
|
||||||
import { useAuth } from '@/context/AuthContext';
|
import { useAuth } from '@/context/AuthContext';
|
||||||
|
import { useConceptOptions } from '@/context/ConceptOptionsContext';
|
||||||
import { useLibrary } from '@/context/LibraryContext';
|
import { useLibrary } from '@/context/LibraryContext';
|
||||||
import useWindowSize from '@/hooks/useWindowSize';
|
import useWindowSize from '@/hooks/useWindowSize';
|
||||||
import { FolderNode, FolderTree } from '@/models/FolderTree';
|
import { FolderNode, FolderTree } from '@/models/FolderTree';
|
||||||
|
@ -39,6 +40,7 @@ function ViewSideLocation({
|
||||||
}: ViewSideLocationProps) {
|
}: ViewSideLocationProps) {
|
||||||
const { user } = useAuth();
|
const { user } = useAuth();
|
||||||
const { items } = useLibrary();
|
const { items } = useLibrary();
|
||||||
|
const { calculateHeight } = useConceptOptions();
|
||||||
const windowSize = useWindowSize();
|
const windowSize = useWindowSize();
|
||||||
|
|
||||||
const canRename = useMemo(() => {
|
const canRename = useMemo(() => {
|
||||||
|
@ -54,6 +56,7 @@ function ViewSideLocation({
|
||||||
}, [active, user, items]);
|
}, [active, user, items]);
|
||||||
|
|
||||||
const animations = useMemo(() => animateSideMinWidth(windowSize.isSmall ? '10rem' : '15rem'), [windowSize]);
|
const animations = useMemo(() => animateSideMinWidth(windowSize.isSmall ? '10rem' : '15rem'), [windowSize]);
|
||||||
|
const maxHeight = useMemo(() => calculateHeight('4.5rem'), [calculateHeight]);
|
||||||
|
|
||||||
const handleClickFolder = useCallback(
|
const handleClickFolder = useCallback(
|
||||||
(event: CProps.EventMouse, target: FolderNode) => {
|
(event: CProps.EventMouse, target: FolderNode) => {
|
||||||
|
@ -105,6 +108,7 @@ function ViewSideLocation({
|
||||||
folderTree={folderTree}
|
folderTree={folderTree}
|
||||||
prefix={prefixes.folders_list}
|
prefix={prefixes.folders_list}
|
||||||
onClick={handleClickFolder}
|
onClick={handleClickFolder}
|
||||||
|
style={{ maxHeight: maxHeight }}
|
||||||
/>
|
/>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -94,10 +94,10 @@ function EditorLibraryItem({ item, isModified, controller }: EditorLibraryItemPr
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{ownerSelector.isOpen ? (
|
{ownerSelector.isOpen ? (
|
||||||
<Overlay position='top-[-0.5rem] left-[2.5rem] cc-icons'>
|
<Overlay position='top-[-0.5rem] left-[4rem] cc-icons'>
|
||||||
{ownerSelector.isOpen ? (
|
{ownerSelector.isOpen ? (
|
||||||
<SelectUser
|
<SelectUser
|
||||||
className='w-[26.5rem] sm:w-[27.5rem] text-sm'
|
className='w-[25rem] sm:w-[26rem] text-sm'
|
||||||
items={users}
|
items={users}
|
||||||
value={item.owner ?? undefined}
|
value={item.owner ?? undefined}
|
||||||
onSelectValue={onSelectUser}
|
onSelectValue={onSelectUser}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user