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
a10bda8af3
commit
6e8801628d
|
@ -1,6 +1,7 @@
|
|||
import clsx from 'clsx';
|
||||
|
||||
import { IConstituenta } from '@/models/rsform';
|
||||
import { isBasicConcept } from '@/models/rsformAPI';
|
||||
import { labelCstTypification } from '@/utils/labels';
|
||||
|
||||
import { CProps } from '../props';
|
||||
|
@ -13,26 +14,14 @@ function InfoConstituenta({ data, className, ...restProps }: InfoConstituentaPro
|
|||
return (
|
||||
<div className={clsx('dense min-w-[15rem]', className)} {...restProps}>
|
||||
<h2>Конституента {data.alias}</h2>
|
||||
{data.derived_from_alias ? (
|
||||
<p>
|
||||
<b>Основание: </b>
|
||||
{data.derived_from_alias}
|
||||
</p>
|
||||
) : null}
|
||||
{data.derived_children_alias.length > 0 ? (
|
||||
<p>
|
||||
<b>Порождает: </b>
|
||||
{data.derived_children_alias.join(', ')}
|
||||
</p>
|
||||
) : null}
|
||||
<p>
|
||||
<b>Типизация: </b>
|
||||
{labelCstTypification(data)}
|
||||
</p>
|
||||
<p>
|
||||
<b>Термин: </b>
|
||||
{data.term_resolved || data.term_raw}
|
||||
</p>
|
||||
<p>
|
||||
<b>Типизация: </b>
|
||||
{labelCstTypification(data)}
|
||||
</p>
|
||||
{data.definition_formal ? (
|
||||
<p>
|
||||
<b>Выражение: </b>
|
||||
|
@ -45,9 +34,21 @@ function InfoConstituenta({ data, className, ...restProps }: InfoConstituentaPro
|
|||
{data.definition_resolved}
|
||||
</p>
|
||||
) : null}
|
||||
{data.derived_from_alias ? (
|
||||
<p>
|
||||
<b>Основание: </b>
|
||||
{data.derived_from_alias}
|
||||
</p>
|
||||
) : null}
|
||||
{data.derived_children_alias.length > 0 ? (
|
||||
<p>
|
||||
<b>Порождает: </b>
|
||||
{data.derived_children_alias.join(', ')}
|
||||
</p>
|
||||
) : null}
|
||||
{data.convention ? (
|
||||
<p>
|
||||
<b>Конвенция: </b>
|
||||
<b>{isBasicConcept(data.cst_type) ? 'Конвенция' : 'Комментарий'}: </b>
|
||||
{data.convention}
|
||||
</p>
|
||||
) : null}
|
||||
|
|
|
@ -249,7 +249,7 @@ function RSTabsMenu({ onDestroy }: RSTabsMenuProps) {
|
|||
tabIndex={-1}
|
||||
titleHtml='<b>Архив</b>: Редактирование запрещено<br />Перейти к актуальной версии'
|
||||
hideTitle={accessMenu.isOpen}
|
||||
className='h-full'
|
||||
className='h-full px-2'
|
||||
icon={<LuArchive size='1.25rem' className='icon-primary' />}
|
||||
onClick={() => controller.viewVersion(undefined)}
|
||||
/>
|
||||
|
|
|
@ -9,6 +9,7 @@ import clsx from 'clsx';
|
|||
import { IEntityReference, ISyntacticReference } from '@/models/language';
|
||||
import { parseGrammemes } from '@/models/languageAPI';
|
||||
import { IConstituenta } from '@/models/rsform';
|
||||
import { isBasicConcept } from '@/models/rsformAPI';
|
||||
|
||||
import { colorFgGrammeme, IColorTheme } from '../styling/color';
|
||||
import { describeConstituentaTerm, labelCstTypification, labelGrammeme } from './labels';
|
||||
|
@ -161,9 +162,25 @@ export function domTooltipConstituenta(cst?: IConstituenta) {
|
|||
|
||||
if (cst.convention) {
|
||||
const convention = document.createElement('p');
|
||||
if (isBasicConcept(cst.cst_type)) {
|
||||
convention.innerHTML = `<b>Конвенция:</b> ${cst.convention}`;
|
||||
} else {
|
||||
convention.innerHTML = `<b>Комментарий:</b> ${cst.convention}`;
|
||||
}
|
||||
dom.appendChild(convention);
|
||||
}
|
||||
|
||||
if (cst.derived_from_alias) {
|
||||
const derived = document.createElement('p');
|
||||
derived.innerHTML = `<b>Основание:</b> ${cst.derived_from_alias}`;
|
||||
dom.appendChild(derived);
|
||||
}
|
||||
|
||||
if (cst.derived_children_alias.length > 0) {
|
||||
const children = document.createElement('p');
|
||||
children.innerHTML = `<b>Порождает:</b> ${cst.derived_children_alias.join(', ')}`;
|
||||
dom.appendChild(children);
|
||||
}
|
||||
} else {
|
||||
const text = document.createElement('p');
|
||||
text.innerText = 'Конституента не определена';
|
||||
|
|
Loading…
Reference in New Issue
Block a user