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