Add network map UX and theme support.

Introduce network map view/components with filtering and positioning, expand contacts/map backend fields and migrations, and add a persistent light/dark theme toggle with graph label color updates for readability.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-28 13:24:48 +03:00
co-authored by Cursor
parent 81ba6cd076
commit b668ee8507
49 changed files with 4679 additions and 129 deletions
+10 -1
View File
@@ -10,6 +10,9 @@ class ContactSerializer(serializers.ModelSerializer):
fields = [
'id', 'name', 'email', 'phone',
'organization', 'position', 'notes',
'life_sphere', 'network_circle', 'importance',
'include_on_network_map',
'map_angle', 'map_radius_ratio',
'created_at', 'updated_at', 'relations_count',
]
read_only_fields = ['id', 'created_at', 'updated_at', 'relations_count']
@@ -30,7 +33,8 @@ class RelationSerializer(serializers.ModelSerializer):
fields = [
'id', 'source', 'source_name',
'target', 'target_name',
'relation_type', 'description', 'created_at',
'relation_type', 'description', 'interaction_intensity',
'created_at',
]
read_only_fields = ['id', 'created_at', 'source_name', 'target_name']
@@ -56,6 +60,9 @@ class GraphSerializer(serializers.Serializer):
'label': c.name,
'title': f'{c.organization}\n{c.position}'.strip() or c.name,
'group': c.organization or 'default',
'life_sphere': c.life_sphere,
'network_circle': c.network_circle,
'importance': c.importance,
}
for c in contacts
]
@@ -69,6 +76,8 @@ class GraphSerializer(serializers.Serializer):
'to': r.target_id,
'label': r.get_relation_type_display(),
'title': r.description or r.get_relation_type_display(),
'relation_type': r.relation_type,
'interaction_intensity': r.interaction_intensity,
}
for r in relations
]