mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 13:00:39 +03:00
M: Optimize dialogs height for small screen notebooks
Some checks are pending
Frontend CI / build (22.x) (push) Waiting to run
Some checks are pending
Frontend CI / build (22.x) (push) Waiting to run
This commit is contained in:
parent
aebd1598ee
commit
3edee8450e
|
@ -103,23 +103,19 @@ function Modal({
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={clsx('z-modalControls', 'px-6 py-3 flex gap-12 justify-center')}>
|
<div className='z-modalControls my-2 flex gap-12 justify-center text-sm'>
|
||||||
{!readonly ? (
|
{!readonly ? (
|
||||||
<Button
|
<Button
|
||||||
autoFocus
|
autoFocus
|
||||||
text={submitText}
|
text={submitText}
|
||||||
title={!canSubmit ? submitInvalidTooltip : ''}
|
title={!canSubmit ? submitInvalidTooltip : ''}
|
||||||
className='min-w-[8rem] min-h-[2.6rem]'
|
className='min-w-[7rem]'
|
||||||
colors='clr-btn-primary'
|
colors='clr-btn-primary'
|
||||||
disabled={!canSubmit}
|
disabled={!canSubmit}
|
||||||
onClick={handleSubmit}
|
onClick={handleSubmit}
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
<Button
|
<Button text={readonly ? 'Закрыть' : 'Отмена'} className='min-w-[7rem]' onClick={handleCancel} />
|
||||||
text={readonly ? 'Закрыть' : 'Отмена'}
|
|
||||||
className='min-w-[8rem] min-h-[2.6rem]'
|
|
||||||
onClick={handleCancel}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -160,13 +160,13 @@ function DlgConstituentaTemplate({ hideWindow, schema, onCreate, insertAfter }:
|
||||||
<Modal
|
<Modal
|
||||||
header='Создание конституенты из шаблона'
|
header='Создание конституенты из шаблона'
|
||||||
submitText='Создать'
|
submitText='Создать'
|
||||||
className='w-[43rem] h-[36.5rem] px-6'
|
className='w-[43rem] h-[35rem] px-6'
|
||||||
hideWindow={hideWindow}
|
hideWindow={hideWindow}
|
||||||
canSubmit={validated}
|
canSubmit={validated}
|
||||||
beforeSubmit={handlePrompt}
|
beforeSubmit={handlePrompt}
|
||||||
onSubmit={handleSubmit}
|
onSubmit={handleSubmit}
|
||||||
>
|
>
|
||||||
<Overlay position='top-0 right-[6rem]'>
|
<Overlay position='top-0 right-[5.9rem]'>
|
||||||
<BadgeHelp
|
<BadgeHelp
|
||||||
topic={HelpTopic.RSL_TEMPLATES}
|
topic={HelpTopic.RSL_TEMPLATES}
|
||||||
className={clsx(PARAMETER.TOOLTIP_WIDTH, 'sm:max-w-[40rem]')}
|
className={clsx(PARAMETER.TOOLTIP_WIDTH, 'sm:max-w-[40rem]')}
|
||||||
|
|
|
@ -118,7 +118,7 @@ function TabTemplate({ state, partialUpdate, templateSchema }: TabTemplateProps)
|
||||||
data={filteredData}
|
data={filteredData}
|
||||||
onSelectValue={cst => partialUpdate({ prototype: cst })}
|
onSelectValue={cst => partialUpdate({ prototype: cst })}
|
||||||
prefixID={prefixes.cst_template_ist}
|
prefixID={prefixes.cst_template_ist}
|
||||||
rows={9}
|
rows={8}
|
||||||
/>
|
/>
|
||||||
<TextArea
|
<TextArea
|
||||||
id='dlg_template_term'
|
id='dlg_template_term'
|
||||||
|
|
|
@ -147,7 +147,7 @@ function DlgCreateOperation({ hideWindow, oss, onCreate, initialInputs }: DlgCre
|
||||||
hideWindow={hideWindow}
|
hideWindow={hideWindow}
|
||||||
canSubmit={isValid}
|
canSubmit={isValid}
|
||||||
onSubmit={handleSubmit}
|
onSubmit={handleSubmit}
|
||||||
className='w-[40rem] px-6 min-h-[35rem]'
|
className='w-[40rem] px-6 h-[32rem]'
|
||||||
>
|
>
|
||||||
<Overlay position='top-0 right-0'>
|
<Overlay position='top-0 right-0'>
|
||||||
<BadgeHelp topic={HelpTopic.CC_OSS} className={clsx(PARAMETER.TOOLTIP_WIDTH, 'sm:max-w-[40rem]')} offset={14} />
|
<BadgeHelp topic={HelpTopic.CC_OSS} className={clsx(PARAMETER.TOOLTIP_WIDTH, 'sm:max-w-[40rem]')} offset={14} />
|
||||||
|
@ -155,11 +155,11 @@ function DlgCreateOperation({ hideWindow, oss, onCreate, initialInputs }: DlgCre
|
||||||
|
|
||||||
<Tabs
|
<Tabs
|
||||||
selectedTabClassName='clr-selected'
|
selectedTabClassName='clr-selected'
|
||||||
className='flex flex-col'
|
className='flex flex-col pt-2'
|
||||||
selectedIndex={activeTab}
|
selectedIndex={activeTab}
|
||||||
onSelect={handleSelectTab}
|
onSelect={handleSelectTab}
|
||||||
>
|
>
|
||||||
<TabList className={clsx('mb-3 self-center', 'flex', 'border divide-x rounded-none')}>
|
<TabList className={clsx('self-center absolute top-[2.4rem]', 'flex', 'border divide-x rounded-none')}>
|
||||||
<TabLabel
|
<TabLabel
|
||||||
title={describeOperationType(OperationType.INPUT)}
|
title={describeOperationType(OperationType.INPUT)}
|
||||||
label={labelOperationType(OperationType.INPUT)}
|
label={labelOperationType(OperationType.INPUT)}
|
||||||
|
|
|
@ -169,7 +169,7 @@ function DlgEditOperation({ hideWindow, oss, target, onSubmit }: DlgEditOperatio
|
||||||
hideWindow={hideWindow}
|
hideWindow={hideWindow}
|
||||||
canSubmit={canSubmit}
|
canSubmit={canSubmit}
|
||||||
onSubmit={handleSubmit}
|
onSubmit={handleSubmit}
|
||||||
className='w-[40rem] px-6 min-h-[35rem]'
|
className='w-[40rem] px-6 h-[32rem]'
|
||||||
>
|
>
|
||||||
<Overlay position='top-0 right-0'>
|
<Overlay position='top-0 right-0'>
|
||||||
<BadgeHelp topic={HelpTopic.CC_OSS} className={clsx(PARAMETER.TOOLTIP_WIDTH, 'sm:max-w-[40rem]')} offset={14} />
|
<BadgeHelp topic={HelpTopic.CC_OSS} className={clsx(PARAMETER.TOOLTIP_WIDTH, 'sm:max-w-[40rem]')} offset={14} />
|
||||||
|
|
|
@ -35,7 +35,7 @@ function TabSynthesis({
|
||||||
<PickSubstitutions
|
<PickSubstitutions
|
||||||
schemas={schemas}
|
schemas={schemas}
|
||||||
prefixID={prefixes.dlg_cst_substitutes_list}
|
prefixID={prefixes.dlg_cst_substitutes_list}
|
||||||
rows={10}
|
rows={8}
|
||||||
substitutions={substitutions}
|
substitutions={substitutions}
|
||||||
setSubstitutions={setSubstitutions}
|
setSubstitutions={setSubstitutions}
|
||||||
suggestions={suggestions}
|
suggestions={suggestions}
|
||||||
|
|
|
@ -70,7 +70,7 @@ function DlgEditReference({ hideWindow, schema, initial, onSave }: DlgEditRefere
|
||||||
hideWindow={hideWindow}
|
hideWindow={hideWindow}
|
||||||
canSubmit={isValid}
|
canSubmit={isValid}
|
||||||
onSubmit={handleSubmit}
|
onSubmit={handleSubmit}
|
||||||
className='w-[40rem] px-6 min-h-[35rem]'
|
className='w-[40rem] px-6 h-[32rem]'
|
||||||
>
|
>
|
||||||
<Overlay position='top-0 right-0'>
|
<Overlay position='top-0 right-0'>
|
||||||
<BadgeHelp
|
<BadgeHelp
|
||||||
|
|
|
@ -70,7 +70,7 @@ function TabEntityReference({ initial, schema, setIsValid, setReference }: TabEn
|
||||||
describeFunc={cst => cst.term_resolved}
|
describeFunc={cst => cst.term_resolved}
|
||||||
matchFunc={(cst, filter) => matchConstituenta(cst, filter, CstMatchMode.TERM)}
|
matchFunc={(cst, filter) => matchConstituenta(cst, filter, CstMatchMode.TERM)}
|
||||||
onBeginFilter={cst => cst.term_resolved !== ''}
|
onBeginFilter={cst => cst.term_resolved !== ''}
|
||||||
rows={8}
|
rows={7}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div className='flex gap-3'>
|
<div className='flex gap-3'>
|
||||||
|
|
|
@ -96,7 +96,7 @@ function DlgInlineSynthesis({ hideWindow, receiver, onInlineSynthesis }: DlgInli
|
||||||
<Modal
|
<Modal
|
||||||
header='Импорт концептуальной схем'
|
header='Импорт концептуальной схем'
|
||||||
submitText='Добавить конституенты'
|
submitText='Добавить конституенты'
|
||||||
className='w-[40rem] h-[36rem] px-6'
|
className='w-[40rem] h-[33rem] px-6'
|
||||||
hideWindow={hideWindow}
|
hideWindow={hideWindow}
|
||||||
canSubmit={validated}
|
canSubmit={validated}
|
||||||
onSubmit={handleSubmit}
|
onSubmit={handleSubmit}
|
||||||
|
|
|
@ -19,7 +19,7 @@ function TabConstituents({ schema, error, loading, selected, setSelected }: TabC
|
||||||
<DataLoader id='dlg-constituents-tab' isLoading={loading} error={error} hasNoData={!schema}>
|
<DataLoader id='dlg-constituents-tab' isLoading={loading} error={error} hasNoData={!schema}>
|
||||||
<PickMultiConstituenta
|
<PickMultiConstituenta
|
||||||
schema={schema}
|
schema={schema}
|
||||||
rows={14}
|
rows={13}
|
||||||
prefixID={prefixes.cst_inline_synth_list}
|
prefixID={prefixes.cst_inline_synth_list}
|
||||||
selected={selected}
|
selected={selected}
|
||||||
setSelected={setSelected}
|
setSelected={setSelected}
|
||||||
|
|
|
@ -35,7 +35,7 @@ function TabSchema({ selected, setSelected }: TabSchemaProps) {
|
||||||
id='dlg_schema_picker' // prettier: split lines
|
id='dlg_schema_picker' // prettier: split lines
|
||||||
items={library.items}
|
items={library.items}
|
||||||
itemType={LibraryItemType.RSFORM}
|
itemType={LibraryItemType.RSFORM}
|
||||||
rows={15}
|
rows={14}
|
||||||
value={selected}
|
value={selected}
|
||||||
onSelectValue={setSelected}
|
onSelectValue={setSelected}
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user