SHA256
Улучшить UI регистрации и связанные сценарии
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user