Немного поправил UI и сделал скетч ESP32 для регистрации

This commit is contained in:
AidarKC
2026-12-03 09:01:47 +03:00
parent c61cbf239c
commit eae8280062
37 changed files with 1014 additions and 29 deletions
-3
View File
@@ -1,7 +1,6 @@
import { t, th } from '../i18n/index.js';
// 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 || '')
@@ -67,7 +66,6 @@ export function profileCardHtml({ card, login = '', tilesHtml = '', tilesWrapCla
const official = card?.accountRole === 'primary';
const shining = card?.shineStatus === 'shining';
const cardLogin = String(card?.login || login || '').trim().replace(/^@+/, '');
const city = displayCity(card?.city);
const fullName = [card?.firstName, card?.lastName].map((v) => String(v || '').trim()).filter(Boolean).join(' ');
const displayName = fullName || cardLogin || t('screens.profile_card.text_012');
const about = String(card?.about || '').trim();
@@ -108,7 +106,6 @@ export function profileCardHtml({ card, login = '', tilesHtml = '', tilesWrapCla
</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>` : ''}
</div>
<div class="pf-stats">
@@ -2348,6 +2348,7 @@ export function createGraphCanvas({ stage, onSelect, onNodeMoved, onGroupSelect,
const node = caption ? null : hitTest(p.x, p.y);
const touch = event.pointerType === 'touch' || event.pointerType === 'pen';
gesture = { kind: 'pending', touch, start: p, last: p, lastAt: performance.now(), node, caption, vx: 0, vy: 0 };
if (node?.isFocus && !caption) onSelect?.(node.data);
// Пальцем: просто провести – двигается карта; задержать палец на человеке – можно
// переносить его. Иначе на плотной карте любая попытка сдвинуть её хватала бы точку.
if (touch && node && !node.isFocus) {
@@ -4,13 +4,10 @@ import { authService, state } from '../state.js';
import { validateArweaveTxId } from './arweave-file-service.js';
import { validatePublicPiecesRoot } from './public-pieces-root.js';
import { buildAvatarReference, parseAvatarReference } from './avatar-reference.js';
import { CITY_MAX_LENGTH, CITY_PARAM, CITY_SUGGESTIONS } from './cities.js';
export const profileFieldDefs = [
{ key: 'first_name', readKeys: ['first_name'], get label() { return t('remaining.profile_fields.first_name'); }, get placeholder() { return t('remaining.profile_fields.enter_your_first_name'); } },
{ key: 'last_name', readKeys: ['last_name'], get label() { return t('remaining.profile_fields.last_name'); }, get placeholder() { return t('remaining.profile_fields.enter_your_last_name'); } },
// Город виден в профиле и собирает знакомых в раскладке «Города» на карте связей.
{ key: CITY_PARAM, readKeys: [CITY_PARAM], get label() { return t('remaining.profile_fields.city'); }, get placeholder() { return t('remaining.profile_fields.for_example_london'); }, maxLength: CITY_MAX_LENGTH, suggestions: CITY_SUGGESTIONS },
{ key: 'address', readKeys: ['address'], get label() { return t('remaining.profile_fields.address'); }, get placeholder() { return t('remaining.profile_fields.street_and_house_number'); } },
{ key: 'web', readKeys: ['web'], get label() { return t('remaining.profile_fields.links'); }, get placeholder() { return t('remaining.profile_fields.website_profile_or_other_link'); } },
{ key: 'phone', readKeys: ['phone'], get label() { return t('remaining.profile_fields.phone'); }, placeholder: '+7 ...' },