mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 04:50:36 +03:00
Small fixes
This commit is contained in:
parent
38507e37e6
commit
67eff6c9fc
|
@ -96,7 +96,6 @@ This readme file is used mostly to document project dependencies
|
||||||
- Install Python 3.9, NodeJS, VSCode, Docker Desktop
|
- Install Python 3.9, NodeJS, VSCode, Docker Desktop
|
||||||
- copy import wheels from ConceptCore to rsconcept/backend/import
|
- copy import wheels from ConceptCore to rsconcept/backend/import
|
||||||
- run rsconcept/backend/LocalEnvSetup.ps1
|
- run rsconcept/backend/LocalEnvSetup.ps1
|
||||||
- run 'npm install' in rsconcept/frontend
|
|
||||||
- use VSCode configs in root folder to start developement
|
- use VSCode configs in root folder to start developement
|
||||||
|
|
||||||
## Developement build
|
## Developement build
|
||||||
|
|
|
@ -52,7 +52,7 @@ class Migration(migrations.Migration):
|
||||||
('schema', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rsform.libraryitem', verbose_name='Концептуальная схема')),
|
('schema', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rsform.libraryitem', verbose_name='Концептуальная схема')),
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
'verbose_name': 'Конституета',
|
'verbose_name': 'Конституента',
|
||||||
'verbose_name_plural': 'Конституенты',
|
'verbose_name_plural': 'Конституенты',
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|
|
@ -236,7 +236,7 @@ class Constituenta(Model):
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
''' Model metadata. '''
|
''' Model metadata. '''
|
||||||
verbose_name = 'Конституета'
|
verbose_name = 'Конституента'
|
||||||
verbose_name_plural = 'Конституенты'
|
verbose_name_plural = 'Конституенты'
|
||||||
|
|
||||||
def get_absolute_url(self):
|
def get_absolute_url(self):
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { useRef } from 'react';
|
||||||
import useEscapeKey from '../../hooks/useEscapeKey';
|
import useEscapeKey from '../../hooks/useEscapeKey';
|
||||||
import Button from './Button';
|
import Button from './Button';
|
||||||
|
|
||||||
interface ModalProps {
|
export interface ModalProps {
|
||||||
title?: string
|
title?: string
|
||||||
submitText?: string
|
submitText?: string
|
||||||
submitInvalidTooltip?: string
|
submitInvalidTooltip?: string
|
||||||
|
@ -46,7 +46,7 @@ function Modal({
|
||||||
<div className='max-h-[calc(100vh-8rem)]'>
|
<div className='max-h-[calc(100vh-8rem)]'>
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
<div className='flex justify-center w-full gap-4 pt-4 mt-2 border-t-2 z-modal-top'>
|
<div className='flex justify-center w-full gap-4 pt-4 mt-2 border-t-2 z-modal-controls'>
|
||||||
{!readonly &&
|
{!readonly &&
|
||||||
<Button
|
<Button
|
||||||
text={submitText}
|
text={submitText}
|
||||||
|
|
|
@ -44,7 +44,9 @@ const editorSetup: BasicSetupOptions = {
|
||||||
};
|
};
|
||||||
|
|
||||||
interface RSInputProps
|
interface RSInputProps
|
||||||
extends Omit<ReactCodeMirrorProps, 'onChange'| 'onKeyDown'> {
|
extends Pick<ReactCodeMirrorProps,
|
||||||
|
'id'| 'editable' | 'height' | 'value' | 'className' | 'onFocus' | 'onBlur'
|
||||||
|
> {
|
||||||
label?: string
|
label?: string
|
||||||
innerref?: RefObject<ReactCodeMirrorRef> | undefined
|
innerref?: RefObject<ReactCodeMirrorRef> | undefined
|
||||||
onChange?: (newValue: string) => void
|
onChange?: (newValue: string) => void
|
||||||
|
|
|
@ -74,9 +74,12 @@
|
||||||
.z-modal {
|
.z-modal {
|
||||||
z-index: 60;
|
z-index: 60;
|
||||||
}
|
}
|
||||||
.z-modal-top {
|
.z-modal-controls {
|
||||||
z-index: 70;
|
z-index: 70;
|
||||||
}
|
}
|
||||||
|
.z-modal-top {
|
||||||
|
z-index: 80;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
|
@ -199,8 +202,7 @@
|
||||||
:is(.clr-hover,
|
:is(.clr-hover,
|
||||||
.clr-tab,
|
.clr-tab,
|
||||||
.clr-btn-nav,
|
.clr-btn-nav,
|
||||||
.clr-btn-default,
|
.clr-btn-default
|
||||||
.clr-btn-clear
|
|
||||||
):hover:not(:disabled) {
|
):hover:not(:disabled) {
|
||||||
color: var(--cl-fg-100);
|
color: var(--cl-fg-100);
|
||||||
background-color: var(--cl-prim-bg-60);
|
background-color: var(--cl-prim-bg-60);
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { useEffect, useState } from 'react';
|
||||||
import { toast } from 'react-toastify';
|
import { toast } from 'react-toastify';
|
||||||
|
|
||||||
import Checkbox from '../../components/Common/Checkbox';
|
import Checkbox from '../../components/Common/Checkbox';
|
||||||
import Modal from '../../components/Common/Modal';
|
import Modal, { ModalProps } from '../../components/Common/Modal';
|
||||||
import TextArea from '../../components/Common/TextArea';
|
import TextArea from '../../components/Common/TextArea';
|
||||||
import TextInput from '../../components/Common/TextInput';
|
import TextInput from '../../components/Common/TextInput';
|
||||||
import { useLibrary } from '../../context/LibraryContext';
|
import { useLibrary } from '../../context/LibraryContext';
|
||||||
|
@ -11,9 +11,8 @@ import { useRSForm } from '../../context/RSFormContext';
|
||||||
import { IRSFormCreateData } from '../../utils/models';
|
import { IRSFormCreateData } from '../../utils/models';
|
||||||
import { getCloneTitle } from '../../utils/staticUI';
|
import { getCloneTitle } from '../../utils/staticUI';
|
||||||
|
|
||||||
interface DlgCloneRSFormProps {
|
interface DlgCloneRSFormProps
|
||||||
hideWindow: () => void
|
extends Pick<ModalProps, 'hideWindow'> {}
|
||||||
}
|
|
||||||
|
|
||||||
function DlgCloneRSForm({ hideWindow }: DlgCloneRSFormProps) {
|
function DlgCloneRSForm({ hideWindow }: DlgCloneRSFormProps) {
|
||||||
const { navigateTo } = useConceptNavigation();
|
const { navigateTo } = useConceptNavigation();
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
|
|
||||||
import ConceptSelectSingle from '../../components/Common/ConceptSelectSingle';
|
import ConceptSelectSingle from '../../components/Common/ConceptSelectSingle';
|
||||||
import Modal from '../../components/Common/Modal';
|
import Modal, { ModalProps } from '../../components/Common/Modal';
|
||||||
import TextArea from '../../components/Common/TextArea';
|
import TextArea from '../../components/Common/TextArea';
|
||||||
import RSInput from '../../components/RSInput';
|
import RSInput from '../../components/RSInput';
|
||||||
import { CstType,ICstCreateData } from '../../utils/models';
|
import { CstType,ICstCreateData } from '../../utils/models';
|
||||||
import { CstTypeSelector, getCstTypeLabel } from '../../utils/staticUI';
|
import { CstTypeSelector, getCstTypeLabel } from '../../utils/staticUI';
|
||||||
|
|
||||||
interface DlgCreateCstProps {
|
interface DlgCreateCstProps
|
||||||
hideWindow: () => void
|
extends Pick<ModalProps, 'hideWindow'> {
|
||||||
initial?: ICstCreateData
|
initial?: ICstCreateData
|
||||||
onCreate: (data: ICstCreateData) => void
|
onCreate: (data: ICstCreateData) => void
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ function DlgCreateCst({ hideWindow, initial, onCreate }: DlgCreateCstProps) {
|
||||||
definition_formal: expression,
|
definition_formal: expression,
|
||||||
definition_raw: textDefinition,
|
definition_raw: textDefinition,
|
||||||
term_raw: term
|
term_raw: term
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleSubmit = () => onCreate(getData());
|
const handleSubmit = () => onCreate(getData());
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import { useMemo, useState } from 'react';
|
import { useMemo, useState } from 'react';
|
||||||
|
|
||||||
import Checkbox from '../../components/Common/Checkbox';
|
import Checkbox from '../../components/Common/Checkbox';
|
||||||
import Modal from '../../components/Common/Modal';
|
import Modal, { ModalProps } from '../../components/Common/Modal';
|
||||||
import { useRSForm } from '../../context/RSFormContext';
|
import { useRSForm } from '../../context/RSFormContext';
|
||||||
import { getCstLabel } from '../../utils/staticUI';
|
import { getCstLabel } from '../../utils/staticUI';
|
||||||
|
|
||||||
interface DlgDeleteCstProps {
|
interface DlgDeleteCstProps
|
||||||
hideWindow: () => void
|
extends Pick<ModalProps, 'hideWindow'> {
|
||||||
selected: number[]
|
selected: number[]
|
||||||
onDelete: (items: number[]) => void
|
onDelete: (items: number[]) => void
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import { useLayoutEffect, useState } from 'react';
|
import { useLayoutEffect, useState } from 'react';
|
||||||
|
|
||||||
import Checkbox from '../../components/Common/Checkbox';
|
import Checkbox from '../../components/Common/Checkbox';
|
||||||
import Modal from '../../components/Common/Modal';
|
import Modal, { ModalProps } from '../../components/Common/Modal';
|
||||||
import { CstType } from '../../utils/models';
|
import { CstType } from '../../utils/models';
|
||||||
import { getCstTypeLabel } from '../../utils/staticUI';
|
import { getCstTypeLabel } from '../../utils/staticUI';
|
||||||
import { GraphEditorParams } from './EditorTermGraph';
|
import { GraphEditorParams } from './EditorTermGraph';
|
||||||
|
|
||||||
interface DlgGraphOptionsProps {
|
interface DlgGraphOptionsProps
|
||||||
hideWindow: () => void
|
extends Pick<ModalProps, 'hideWindow'> {
|
||||||
initial: GraphEditorParams
|
initial: GraphEditorParams
|
||||||
onConfirm: (params: GraphEditorParams) => void
|
onConfirm: (params: GraphEditorParams) => void
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import { useLayoutEffect, useState } from 'react';
|
import { useLayoutEffect, useState } from 'react';
|
||||||
|
|
||||||
import ConceptSelectSingle from '../../components/Common/ConceptSelectSingle';
|
import ConceptSelectSingle from '../../components/Common/ConceptSelectSingle';
|
||||||
import Modal from '../../components/Common/Modal';
|
import Modal, { ModalProps } from '../../components/Common/Modal';
|
||||||
import TextInput from '../../components/Common/TextInput';
|
import TextInput from '../../components/Common/TextInput';
|
||||||
import { useRSForm } from '../../context/RSFormContext';
|
import { useRSForm } from '../../context/RSFormContext';
|
||||||
import { CstType, ICstRenameData } from '../../utils/models';
|
import { CstType, ICstRenameData } from '../../utils/models';
|
||||||
import { createAliasFor, CstTypeSelector, getCstTypeLabel, getCstTypePrefix } from '../../utils/staticUI';
|
import { createAliasFor, CstTypeSelector, getCstTypeLabel, getCstTypePrefix } from '../../utils/staticUI';
|
||||||
|
|
||||||
interface DlgRenameCstProps {
|
interface DlgRenameCstProps
|
||||||
hideWindow: () => void
|
extends Pick<ModalProps, 'hideWindow'> {
|
||||||
initial?: ICstRenameData
|
initial?: ICstRenameData
|
||||||
onRename: (data: ICstRenameData) => void
|
onRename: (data: ICstRenameData) => void
|
||||||
}
|
}
|
||||||
|
@ -63,12 +63,12 @@ function DlgRenameCst({ hideWindow, initial, onRename }: DlgRenameCstProps) {
|
||||||
hideWindow={hideWindow}
|
hideWindow={hideWindow}
|
||||||
canSubmit={validated}
|
canSubmit={validated}
|
||||||
onSubmit={handleSubmit}
|
onSubmit={handleSubmit}
|
||||||
submitInvalidTooltip={'Введите имя, соответствующее типу и отсутствующее в схеме'}
|
submitInvalidTooltip={'Введите незанятое имя, соответствующее типу'}
|
||||||
submitText='Переименовать'
|
submitText='Переименовать'
|
||||||
>
|
>
|
||||||
<div className='flex items-center gap-4 px-2 my-2 h-fit min-w-[25rem]'>
|
<div className='flex items-center gap-4 px-2 my-2 h-fit min-w-[25rem]'>
|
||||||
<ConceptSelectSingle
|
<ConceptSelectSingle
|
||||||
className='min-w-[14rem] self-center'
|
className='min-w-[14rem] self-center z-modal-top'
|
||||||
options={CstTypeSelector}
|
options={CstTypeSelector}
|
||||||
placeholder='Выберите тип'
|
placeholder='Выберите тип'
|
||||||
value={cstType ? { value: cstType, label: getCstTypeLabel(cstType) } : null}
|
value={cstType ? { value: cstType, label: getCstTypeLabel(cstType) } : null}
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
import { useCallback, useMemo, useState } from 'react';
|
import { useCallback, useMemo, useState } from 'react';
|
||||||
import { GraphCanvas,GraphEdge, GraphNode } from 'reagraph';
|
import { GraphCanvas,GraphEdge, GraphNode } from 'reagraph';
|
||||||
|
|
||||||
import Modal from '../../components/Common/Modal';
|
import Modal, { ModalProps } from '../../components/Common/Modal';
|
||||||
import { useConceptTheme } from '../../context/ThemeContext';
|
import { useConceptTheme } from '../../context/ThemeContext';
|
||||||
import { graphDarkT, graphLightT } from '../../utils/color';
|
import { graphDarkT, graphLightT } from '../../utils/color';
|
||||||
import { resources } from '../../utils/constants';
|
import { resources } from '../../utils/constants';
|
||||||
import { SyntaxTree } from '../../utils/models';
|
import { SyntaxTree } from '../../utils/models';
|
||||||
import { getASTNodeColor, getASTNodeLabel } from '../../utils/staticUI';
|
import { getASTNodeColor, getASTNodeLabel } from '../../utils/staticUI';
|
||||||
|
|
||||||
interface DlgShowASTProps {
|
interface DlgShowASTProps
|
||||||
hideWindow: () => void
|
extends Pick<ModalProps, 'hideWindow'> {
|
||||||
syntaxTree: SyntaxTree
|
syntaxTree: SyntaxTree
|
||||||
expression: string
|
expression: string
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ function BackendLint() {
|
||||||
$mypy = "$backend\venv\Scripts\mypy.exe"
|
$mypy = "$backend\venv\Scripts\mypy.exe"
|
||||||
|
|
||||||
Set-Location $backend
|
Set-Location $backend
|
||||||
|
$env:DJANGO_SETTINGS_MODULE = "project.settings"
|
||||||
& $pylint cctext project apps
|
& $pylint cctext project apps
|
||||||
& $mypy cctext project apps
|
& $mypy cctext project apps
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user