mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 04:50:36 +03:00
Minor UI fixes
This commit is contained in:
parent
b33dceebf8
commit
abd88ccdbf
|
@ -2,7 +2,7 @@
|
|||
|
||||
import { useCallback, useMemo, useState } from 'react';
|
||||
import { BiChevronLeft, BiChevronRight, BiFirstPage, BiLastPage, BiX } from 'react-icons/bi';
|
||||
import { LuLocate, LuLocateOff, LuPower, LuPowerOff, LuReplace } from 'react-icons/lu';
|
||||
import { LuFlag, LuFlagOff, LuPower, LuPowerOff, LuReplace } from 'react-icons/lu';
|
||||
|
||||
import ConstituentaBadge from '@/components/info/ConstituentaBadge';
|
||||
import ConstituentaSelector from '@/components/select/ConstituentaSelector';
|
||||
|
@ -132,14 +132,11 @@ function SubstitutionsPicker({
|
|||
columnHelper.accessor(item => describeConstituenta(item.rightCst), {
|
||||
id: 'right_text',
|
||||
header: 'Описание',
|
||||
size: 1000,
|
||||
minSize: 1000,
|
||||
cell: props => <div className='text-xs text-ellipsis text-pretty'>{props.getValue()}</div>
|
||||
}),
|
||||
columnHelper.display({
|
||||
id: 'actions',
|
||||
size: 50,
|
||||
minSize: 50,
|
||||
maxSize: 50,
|
||||
cell: props => (
|
||||
<MiniButton
|
||||
noHover
|
||||
|
@ -159,7 +156,7 @@ function SubstitutionsPicker({
|
|||
<div className='flex-grow basis-1/2'>
|
||||
<div className='flex items-center justify-between'>
|
||||
<Label text={schema1 !== schema2 ? schema1?.alias ?? 'Схема 1' : ''} />
|
||||
<div>
|
||||
<div className='cc-icons'>
|
||||
<MiniButton
|
||||
title='Сохранить конституенту'
|
||||
noHover
|
||||
|
@ -178,9 +175,9 @@ function SubstitutionsPicker({
|
|||
onClick={toggleTerm}
|
||||
icon={
|
||||
takeLeftTerm ? (
|
||||
<LuLocate size='1rem' className='clr-text-green' />
|
||||
<LuFlag size='1rem' className='clr-text-green' />
|
||||
) : (
|
||||
<LuLocateOff size='1rem' className='clr-text-red' />
|
||||
<LuFlagOff size='1rem' className='clr-text-red' />
|
||||
)
|
||||
}
|
||||
/>
|
||||
|
@ -198,14 +195,14 @@ function SubstitutionsPicker({
|
|||
title='Добавить в таблицу отождествлений'
|
||||
className='mb-[0.375rem] grow-0'
|
||||
icon={<LuReplace size='1.5rem' className='icon-primary' />}
|
||||
disabled={!leftCst || !rightCst}
|
||||
disabled={!leftCst || !rightCst || leftCst === rightCst}
|
||||
onClick={addSubstitution}
|
||||
/>
|
||||
|
||||
<div className='flex-grow basis-1/2'>
|
||||
<div className='flex items-center justify-between'>
|
||||
<Label text={schema1 !== schema2 ? schema2?.alias ?? 'Схема 2' : ''} />
|
||||
<div>
|
||||
<div className='cc-icons'>
|
||||
<MiniButton
|
||||
title='Сохранить конституенту'
|
||||
noHover
|
||||
|
@ -224,9 +221,9 @@ function SubstitutionsPicker({
|
|||
onClick={toggleTerm}
|
||||
icon={
|
||||
!takeLeftTerm ? (
|
||||
<LuLocate size='1rem' className='clr-text-green' />
|
||||
<LuFlag size='1rem' className='clr-text-green' />
|
||||
) : (
|
||||
<LuLocateOff size='1rem' className='clr-text-red' />
|
||||
<LuFlagOff size='1rem' className='clr-text-red' />
|
||||
)
|
||||
}
|
||||
/>
|
||||
|
|
|
@ -3,11 +3,13 @@
|
|||
import clsx from 'clsx';
|
||||
import { useLayoutEffect, useState } from 'react';
|
||||
|
||||
import BadgeHelp from '@/components/man/BadgeHelp';
|
||||
import Modal, { ModalProps } from '@/components/ui/Modal';
|
||||
import SelectSingle from '@/components/ui/SelectSingle';
|
||||
import TextInput from '@/components/ui/TextInput';
|
||||
import { useRSForm } from '@/context/RSFormContext';
|
||||
import usePartialUpdate from '@/hooks/usePartialUpdate';
|
||||
import { HelpTopic } from '@/models/miscellaneous';
|
||||
import { CstType, ICstRenameData } from '@/models/rsform';
|
||||
import { generateAlias, validateNewAlias } from '@/models/rsformAPI';
|
||||
import { labelCstType } from '@/utils/labels';
|
||||
|
@ -45,7 +47,7 @@ function DlgRenameCst({ hideWindow, initial, onRename }: DlgRenameCstProps) {
|
|||
hideWindow={hideWindow}
|
||||
canSubmit={validated}
|
||||
onSubmit={handleSubmit}
|
||||
className={clsx('w-[30rem]', 'py-6 px-6 flex gap-6 justify-center items-center')}
|
||||
className={clsx('w-[30rem]', 'py-6 px-6 flex gap-3 justify-center items-center')}
|
||||
>
|
||||
<SelectSingle
|
||||
id='dlg_cst_type'
|
||||
|
@ -58,6 +60,7 @@ function DlgRenameCst({ hideWindow, initial, onRename }: DlgRenameCstProps) {
|
|||
}}
|
||||
onChange={data => updateData({ cst_type: data?.value ?? CstType.BASE })}
|
||||
/>
|
||||
<BadgeHelp topic={HelpTopic.CST_ATTRIBUTES} offset={16} className='max-w-[40rem] max-h-[calc(100vh-2rem)]' />
|
||||
<TextInput
|
||||
id='dlg_cst_alias'
|
||||
dense
|
||||
|
|
Loading…
Reference in New Issue
Block a user