Улучшить UI регистрации и связанные сценарии

This commit is contained in:
AidarKC
2026-11-08 18:04:06 +03:00
parent 9405f28525
commit 4068465ee6
66 changed files with 842 additions and 221 deletions
+4 -4
View File
@@ -4,7 +4,7 @@ import { renderAvatar } from '../components/avatar-image.js';
import { createPersonRow } from '../components/person-row.js';
import { createLoadingState, createStateMessage } from '../components/feedback.js';
import { iconHtml } from '../components/ui-icon.js';
import { makeShineChannelRoute, makeProfileRoute } from '../services/shine-routes.js';
import { formatChannelAddress, makeShineChannelRoute, makeProfileRoute } from '../services/shine-routes.js';
export const pageMeta = {
id: 'search-view',
@@ -39,7 +39,7 @@ function channelRow(item, navigate) {
title.textContent = displayName;
const address = document.createElement('span');
address.className = 'shine-search-result__address';
address.textContent = `@${ownerLogin}/${slug} · ${Number(item.subscribersCount || 0)} подписчиков`;
address.textContent = `${formatChannelAddress({ ownerLogin, channelName: slug })} · ${Number(item.subscribersCount || 0)} подписчиков`;
text.append(title, address);
const description = String(item.description || '').trim();
if (description) {
@@ -68,7 +68,7 @@ function personRow(person, navigate) {
login,
name: displayName || login,
avatar: person.avatarAr ? { ar: person.avatarAr } : null,
sub: displayName && displayName !== login ? `@${login}` : '',
sub: displayName && displayName !== login ? login : '',
onClick: () => navigate(makeProfileRoute(login)),
actions: [{ icon: 'message', label: 'Написать', onClick: () => navigate(`chat/${encodeURIComponent(login)}`) }],
});
@@ -85,7 +85,7 @@ export function render({ navigate, chrome }) {
const search = document.createElement('input');
search.type = 'search';
search.className = 'search-field__input shine-search-input';
search.placeholder = 'Название канала, @автор или автор/канал';
search.placeholder = 'Название канала или Alice@free/channel';
search.maxLength = 120;
search.autocomplete = 'off';
search.enterKeyHint = 'search';