fix(admin-ui): em-dash fallback в UserCell + sidebar.collapse i18n

This commit is contained in:
Александр Зимин
2026-05-15 09:02:39 +00:00
parent 9ab0e7526a
commit 5c4b9c9f21
2 changed files with 14 additions and 4 deletions
+4
View File
@@ -22,6 +22,8 @@ i18n
'nav.graph': 'Граф связей',
'nav.section.workflow': 'Workflow',
'nav.section.admin': 'Администрирование',
'sidebar.collapse': 'Свернуть',
'sidebar.expand': 'Развернуть',
'topbar.search.label': 'Поиск',
'topbar.search.placeholder': 'Поиск по справочникам, ⌘K',
'topbar.notifications': 'Уведомления',
@@ -812,6 +814,8 @@ i18n
'nav.graph': 'Relations graph',
'nav.section.workflow': 'Workflow',
'nav.section.admin': 'Admin',
'sidebar.collapse': 'Collapse',
'sidebar.expand': 'Expand',
'topbar.search.label': 'Search',
'topbar.search.placeholder': 'Search dictionaries, ⌘K',
'topbar.notifications': 'Notifications',
+10 -4
View File
@@ -54,8 +54,12 @@ const useResolveUserDisplay = (uuid: string | null | undefined) =>
* (или just {@code "Я"} если profile неполный).</li>
* <li><b>different user, cached на backend</b> preferred_username из кэша.
* Full ID + email + name доступны через extended fields.</li>
* <li><b>different user, не cached</b> first 8 chars of UUID. Full ID в
* {@code fullId} чтобы consumer мог положить в {@code title=...}.</li>
* <li><b>different user, не cached</b> {@code "—"} (em dash placeholder).
* Full ID в {@code fullId} чтобы consumer мог положить в
* {@code title=...}. Раньше был short UUID prefix (8 chars), но это
* выглядело как "uuid в черновиках" baseline UI noise теперь dash
* честно говорит "не знаем кто", а consumer открывает tooltip за
* full UUID если нужно.</li>
* <li><b>null/undefined uuid</b> {@code "anonymous"}.</li>
* </ul>
*
@@ -94,7 +98,7 @@ export function useUserDisplay(uuid: string | null | undefined): {
const info = resolved.data
if (info?.preferredUsername || info?.name) {
return {
display: info.preferredUsername || info.name || fullId.substring(0, 8),
display: info.preferredUsername || info.name || '—',
isMe,
fullId,
preferredUsername: info.preferredUsername,
@@ -103,7 +107,9 @@ export function useUserDisplay(uuid: string | null | undefined): {
}
}
// Fallback — кэш empty или user ещё не появлялся на этом backend'е.
return { display: fullId.substring(0, 8), isMe, fullId }
// Показываем em dash вместо raw UUID prefix; full ID доступен в tooltip
// через fullId (см. UserCell title=...).
return { display: '—', isMe, fullId }
}
/**