mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 21:10:38 +03:00
Minor ui fixes
This commit is contained in:
parent
50de0176f6
commit
6b8a428f9f
|
@ -9,7 +9,7 @@ import useWindowSize from '../../../hooks/useWindowSize';
|
||||||
import { CstType, IConstituenta, ICstCreateData, ICstMovetoData } from '../../../models/rsform'
|
import { CstType, IConstituenta, ICstCreateData, ICstMovetoData } from '../../../models/rsform'
|
||||||
import { prefixes } from '../../../utils/constants';
|
import { prefixes } from '../../../utils/constants';
|
||||||
import { labelCstTypification } from '../../../utils/labels';
|
import { labelCstTypification } from '../../../utils/labels';
|
||||||
import RSItemsMenu from './RSListToolbar';
|
import RSListToolbar from './RSListToolbar';
|
||||||
|
|
||||||
// Window width cutoff for columns
|
// Window width cutoff for columns
|
||||||
const COLUMN_DEFINITION_HIDE_THRESHOLD = 1000;
|
const COLUMN_DEFINITION_HIDE_THRESHOLD = 1000;
|
||||||
|
@ -299,7 +299,7 @@ function EditorRSList({ onOpenEdit, onCreateCst, onDeleteCst, onTemplates }: Edi
|
||||||
<div className='mr-3 min-w-[9rem] whitespace-nowrap small-caps'>
|
<div className='mr-3 min-w-[9rem] whitespace-nowrap small-caps'>
|
||||||
Выбор {selected.length} из {schema?.stats?.count_all ?? 0}
|
Выбор {selected.length} из {schema?.stats?.count_all ?? 0}
|
||||||
</div>
|
</div>
|
||||||
<RSItemsMenu
|
<RSListToolbar
|
||||||
selectedCount={selected.length}
|
selectedCount={selected.length}
|
||||||
editorMode={isEditable}
|
editorMode={isEditable}
|
||||||
onMoveUp={handleMoveUp}
|
onMoveUp={handleMoveUp}
|
||||||
|
|
|
@ -12,7 +12,7 @@ import { prefixes } from '../../../utils/constants';
|
||||||
import { labelCstType } from '../../../utils/labels';
|
import { labelCstType } from '../../../utils/labels';
|
||||||
import { getCstTypePrefix, getCstTypeShortcut } from '../../../utils/misc';
|
import { getCstTypePrefix, getCstTypeShortcut } from '../../../utils/misc';
|
||||||
|
|
||||||
interface RSItemsMenuProps {
|
interface RSListToolbarProps {
|
||||||
editorMode?: boolean
|
editorMode?: boolean
|
||||||
selectedCount: number
|
selectedCount: number
|
||||||
|
|
||||||
|
@ -25,16 +25,16 @@ interface RSItemsMenuProps {
|
||||||
onReindex: () => void
|
onReindex: () => void
|
||||||
}
|
}
|
||||||
|
|
||||||
function RSItemsMenu({
|
function RSListToolbar({
|
||||||
selectedCount, editorMode,
|
selectedCount, editorMode,
|
||||||
onMoveUp, onMoveDown, onDelete, onClone, onCreate, onTemplates, onReindex
|
onMoveUp, onMoveDown, onDelete, onClone, onCreate, onTemplates, onReindex
|
||||||
}: RSItemsMenuProps) {
|
}: RSListToolbarProps) {
|
||||||
const insertMenu = useDropdown();
|
const insertMenu = useDropdown();
|
||||||
|
|
||||||
const nothingSelected = useMemo(() => selectedCount === 0, [selectedCount]);
|
const nothingSelected = useMemo(() => selectedCount === 0, [selectedCount]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='flex items-center justify-center w-full pr-[9rem]'>
|
<div className='flex items-center justify-center w-full pr-[9rem] mt-1'>
|
||||||
<MiniButton
|
<MiniButton
|
||||||
tooltip='Переместить вверх'
|
tooltip='Переместить вверх'
|
||||||
icon={<ArrowUpIcon size={5}/>}
|
icon={<ArrowUpIcon size={5}/>}
|
||||||
|
@ -112,4 +112,4 @@ function RSItemsMenu({
|
||||||
</div>);
|
</div>);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default RSItemsMenu;
|
export default RSListToolbar;
|
Loading…
Reference in New Issue
Block a user