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
+19
View File
@@ -0,0 +1,19 @@
export function normalizeApiError(error) {
const status = error?.response?.status ?? null
const data = error?.response?.data
let message = 'Произошла ошибка запроса.'
if (typeof data === 'string' && data.trim()) {
message = data
} else if (typeof data?.error === 'string' && data.error.trim()) {
message = data.error
} else if (typeof error?.message === 'string' && error.message.trim()) {
message = error.message
}
const normalized = new Error(message)
normalized.status = status
normalized.data = data
normalized.original = error
return normalized
}