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
b303b25502
commit
c430a0132c
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
|
@ -38,6 +38,10 @@
|
||||||
{
|
{
|
||||||
"name": "django",
|
"name": "django",
|
||||||
"depth": 5
|
"depth": 5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "djangorestframework",
|
||||||
|
"depth": 2
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"colorize.include": [".tsx", ".jsx", ".ts", ".js"],
|
"colorize.include": [".tsx", ".jsx", ".ts", ".js"],
|
||||||
|
|
|
@ -91,7 +91,7 @@ class Graph(Generic[ItemType]):
|
||||||
if len(self.inputs[node_id]) == 0:
|
if len(self.inputs[node_id]) == 0:
|
||||||
continue
|
continue
|
||||||
for parent in self.inputs[node_id]:
|
for parent in self.inputs[node_id]:
|
||||||
result[parent] = result[parent] + [id for id in result[node_id] if not id in result[parent]]
|
result[parent] = result[parent] + [id for id in result[node_id] if id not in result[parent]]
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def topological_order(self) -> list[ItemType]:
|
def topological_order(self) -> list[ItemType]:
|
||||||
|
|
|
@ -60,12 +60,12 @@ class Editor(Model):
|
||||||
''' Set editors for item. '''
|
''' Set editors for item. '''
|
||||||
processed: list[User] = []
|
processed: list[User] = []
|
||||||
for editor_item in Editor.objects.filter(item=item):
|
for editor_item in Editor.objects.filter(item=item):
|
||||||
if not editor_item.editor in users:
|
if editor_item.editor not in users:
|
||||||
editor_item.delete()
|
editor_item.delete()
|
||||||
else:
|
else:
|
||||||
processed.append(editor_item.editor)
|
processed.append(editor_item.editor)
|
||||||
|
|
||||||
for user in users:
|
for user in users:
|
||||||
if not user in processed:
|
if user not in processed:
|
||||||
processed.append(user)
|
processed.append(user)
|
||||||
Editor.objects.create(item=item, editor=user)
|
Editor.objects.create(item=item, editor=user)
|
||||||
|
|
|
@ -48,19 +48,9 @@ function Navigation() {
|
||||||
<Logo />
|
<Logo />
|
||||||
</div>
|
</div>
|
||||||
<div className='flex gap-1 py-[0.3rem]'>
|
<div className='flex gap-1 py-[0.3rem]'>
|
||||||
<NavigationButton
|
<NavigationButton text='Новая схема' icon={<IconNewItem2 size='1.5rem' />} onClick={navigateCreateNew} />
|
||||||
text='Новая схема'
|
<NavigationButton text='Библиотека' icon={<IconLibrary2 size='1.5rem' />} onClick={navigateLibrary} />
|
||||||
title='Создать новую схему'
|
<NavigationButton text='Справка' icon={<IconManuals size='1.5rem' />} onClick={navigateHelp} />
|
||||||
icon={<IconNewItem2 size='1.5rem' />}
|
|
||||||
onClick={navigateCreateNew}
|
|
||||||
/>
|
|
||||||
<NavigationButton
|
|
||||||
text='Библиотека'
|
|
||||||
title='Список схем'
|
|
||||||
icon={<IconLibrary2 size='1.5rem' />}
|
|
||||||
onClick={navigateLibrary}
|
|
||||||
/>
|
|
||||||
<NavigationButton text='Справка' title='Справочные материалы' icon={<IconManuals />} onClick={navigateHelp} />
|
|
||||||
<UserMenu />
|
<UserMenu />
|
||||||
</div>
|
</div>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user