Профиль: поле «Город»

Город – обычное поле профиля (параметр city, тот же блок профиля, что у имени и пола):
в редактировании – между полом и адресом, с подсказками городов при вводе; в шапке профиля –
под логином («📍 Москва»). Из него собирается раскладка «Города» на карте связей. Подсказка
у адреса теперь «Улица, дом» – город отдельно. Сервер и формат блокчейна не менялись.
This commit is contained in:
q
2026-10-13 14:09:35 +03:00
parent 5caa4ce0ae
commit 694aaf1f0e
7 changed files with 17 additions and 5 deletions
+3
View File
@@ -1,5 +1,6 @@
// data-profile-list / data-self-profile-action / data-profile-action обрабатывают profile-view.js и user-profile-view.js.
import { iconHtml } from './ui-icon.js';
import { displayCity } from '../services/cities.js';
export function escapeProfileHtml(text) {
return String(text || '')
@@ -77,6 +78,7 @@ export function profileCardHtml({ card, login = '', tilesHtml = '', tilesWrapCla
const official = card?.accountRole === 'primary';
const shining = card?.shineStatus === 'shining';
const cardLogin = card?.login || login;
const city = displayCity(card?.city);
const fullName = [card?.firstName, card?.lastName].map((v) => String(v || '').trim()).filter(Boolean).join(' ');
const displayName = fullName || cardLogin || 'Профиль';
const about = String(card?.about || '').trim();
@@ -132,6 +134,7 @@ export function profileCardHtml({ card, login = '', tilesHtml = '', tilesWrapCla
<div class="pf-avatar user-profile-avatar-slot${shining ? ' is-shining' : ''}"></div>
<h2 class="pf-name">${esc(displayName)}</h2>
<div class="pf-login">@${esc(cardLogin)}</div>
${city ? `<div class="pf-city">${iconHtml('place')}<span>${esc(city)}</span></div>` : ''}
${badges ? `<div class="pf-badges">${badges}</div>` : ''}
</div>