mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 13:00:39 +03:00
Small UI fixes
This commit is contained in:
parent
f2cba9aaaf
commit
da7af6f8dc
|
@ -76,7 +76,8 @@ const RSInput = forwardRef<ReactCodeMirrorRef, RSInputProps>(
|
||||||
fontFamily: 'inherit',
|
fontFamily: 'inherit',
|
||||||
background: !disabled ? colors.bgInput : colors.bgDefault,
|
background: !disabled ? colors.bgInput : colors.bgDefault,
|
||||||
foreground: colors.fgDefault,
|
foreground: colors.fgDefault,
|
||||||
selection: colors.bgHover
|
selection: colors.bgHover,
|
||||||
|
caret: colors.fgDefault
|
||||||
},
|
},
|
||||||
styles: [
|
styles: [
|
||||||
{ tag: tags.name, color: colors.fgPurple, cursor: 'default' }, // GlobalID
|
{ tag: tags.name, color: colors.fgPurple, cursor: 'default' }, // GlobalID
|
||||||
|
|
|
@ -87,7 +87,8 @@ const RefsInput = forwardRef<ReactCodeMirrorRef, RefsInputInputProps>(
|
||||||
fontFamily: 'inherit',
|
fontFamily: 'inherit',
|
||||||
background: !disabled ? colors.bgInput : colors.bgDefault,
|
background: !disabled ? colors.bgInput : colors.bgDefault,
|
||||||
foreground: colors.fgDefault,
|
foreground: colors.fgDefault,
|
||||||
selection: colors.bgHover
|
selection: colors.bgHover,
|
||||||
|
caret: colors.fgDefault
|
||||||
},
|
},
|
||||||
styles: [
|
styles: [
|
||||||
{ tag: tags.name, color: colors.fgPurple, cursor: 'default' }, // EntityReference
|
{ tag: tags.name, color: colors.fgPurple, cursor: 'default' }, // EntityReference
|
||||||
|
|
|
@ -16,6 +16,11 @@ import { labelCstTypification } from '@/utils/labels';
|
||||||
import EditorRSExpression from '../EditorRSExpression';
|
import EditorRSExpression from '../EditorRSExpression';
|
||||||
import ControlsOverlay from './ControlsOverlay';
|
import ControlsOverlay from './ControlsOverlay';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Characters limit to start increasing number of rows.
|
||||||
|
*/
|
||||||
|
export const ROW_SIZE_IN_CHARACTERS = 70;
|
||||||
|
|
||||||
interface FormConstituentaProps {
|
interface FormConstituentaProps {
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
showList: boolean;
|
showList: boolean;
|
||||||
|
@ -130,7 +135,7 @@ function FormConstituenta({
|
||||||
noBorder
|
noBorder
|
||||||
disabled
|
disabled
|
||||||
label='Типизация'
|
label='Типизация'
|
||||||
rows={typification.length > 70 ? 2 : 1}
|
rows={typification.length > ROW_SIZE_IN_CHARACTERS ? 2 : 1}
|
||||||
value={typification}
|
value={typification}
|
||||||
colors='clr-app'
|
colors='clr-app'
|
||||||
style={{
|
style={{
|
||||||
|
@ -166,6 +171,7 @@ function FormConstituenta({
|
||||||
placeholder='Договоренность об интерпретации или пояснение'
|
placeholder='Договоренность об интерпретации или пояснение'
|
||||||
value={convention}
|
value={convention}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
|
rows={convention.length > ROW_SIZE_IN_CHARACTERS ? 3 : 2}
|
||||||
onChange={event => setConvention(event.target.value)}
|
onChange={event => setConvention(event.target.value)}
|
||||||
/>
|
/>
|
||||||
<SubmitButton
|
<SubmitButton
|
||||||
|
|
|
@ -110,6 +110,7 @@ function FormRSForm({ id, disabled, isModified, setIsModified }: FormRSFormProps
|
||||||
/>
|
/>
|
||||||
<TextArea
|
<TextArea
|
||||||
label='Комментарий'
|
label='Комментарий'
|
||||||
|
rows={3}
|
||||||
value={comment}
|
value={comment}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
onChange={event => setComment(event.target.value)}
|
onChange={event => setComment(event.target.value)}
|
||||||
|
|
|
@ -98,7 +98,7 @@ function TermGraph({
|
||||||
}, [selectedIDs, setSelections, nodes]);
|
}, [selectedIDs, setSelections, nodes]);
|
||||||
|
|
||||||
const canvasWidth = useMemo(() => {
|
const canvasWidth = useMemo(() => {
|
||||||
return 'calc(100vw - 1.1rem)';
|
return 'calc(100vw - 1rem)';
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const canvasHeight = useMemo(() => {
|
const canvasHeight = useMemo(() => {
|
||||||
|
|
|
@ -169,7 +169,7 @@ function RSTabs() {
|
||||||
selectedTabClassName='clr-selected'
|
selectedTabClassName='clr-selected'
|
||||||
className='flex flex-col min-w-fit'
|
className='flex flex-col min-w-fit'
|
||||||
>
|
>
|
||||||
<TabList className={clsx('sm:mx-auto w-fit', 'flex items-stretch', 'border-b-2 border-x-2 divide-x-2')}>
|
<TabList className={clsx('mx-auto w-fit', 'flex items-stretch', 'border-b-2 border-x-2 divide-x-2')}>
|
||||||
<RSTabsMenu onDestroy={onDestroySchema} />
|
<RSTabsMenu onDestroy={onDestroySchema} />
|
||||||
|
|
||||||
<TabLabel className='' label='Карточка' title={`Название схемы: ${schema.title ?? ''}`} />
|
<TabLabel className='' label='Карточка' title={`Название схемы: ${schema.title ?? ''}`} />
|
||||||
|
|
Loading…
Reference in New Issue
Block a user