SHA256
Списки из профиля и экраны без «Загрузка...»
- «Друзья», «Подтвердили…» и т. п.: строки людей как в Связях и чатах (кольцо у близких и сияющих, «Написать»), общий переключатель вместо своих вкладок, поиск по списку от 12 человек, «Показать удалённые» – переключателем; загрузка, ошибка с «Повторить» и «пока никого» – общим видом; - спиннер с задержкой вместо текста: лайки записи, пересылка в чат, ключи, вход с доверенного устройства, состояние покупки в кошельке, экран связи с человеком; - в шапке канала при загрузке – пустая подпись вместо мигающего «Загрузка…»; - экран связи с человеком: ошибка понятным текстом и «Повторить» вместо «Ошибка: …».
This commit is contained in:
+1
-1
@@ -1,2 +1,2 @@
|
||||
client.version=1.19.7
|
||||
client.version=1.19.8
|
||||
server.version=1.15.0
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@
|
||||
}());
|
||||
</script>
|
||||
<script>
|
||||
window.__SHINE_BUILD_HASH__ = '20261013043000';
|
||||
window.__SHINE_BUILD_HASH__ = '20261013050000';
|
||||
window.__SHINE_CLIENT_VERSION__ = '1.2.10';
|
||||
</script>
|
||||
<script>
|
||||
|
||||
@@ -1711,7 +1711,7 @@ function openMessageLikesListModal({ navigate, messageRef, initialTab = 'shining
|
||||
<button type="button" class="ui-button" data-like-tab="official">Официальные <span data-like-tab-count="official"></span></button>
|
||||
<button type="button" class="ui-button" data-like-tab="all">Все <span data-like-tab-count="all"></span></button>
|
||||
</div>
|
||||
<div class="channel-likes-modal__status">Загрузка...</div>
|
||||
<div class="channel-likes-modal__status"><div class="loading-state" style="--loading-delay:250ms"><span class="spinner" role="status" aria-label="Загрузка"></span></div></div>
|
||||
<div class="channel-likes-user-list"></div>
|
||||
</section>
|
||||
`;
|
||||
@@ -2604,7 +2604,7 @@ export function render({ navigate, route, chrome }) {
|
||||
const channelHeaderButton = document.createElement('button');
|
||||
channelHeaderButton.type = 'button';
|
||||
channelHeaderButton.className = 'topbar-identity channel-header-route-btn';
|
||||
channelHeaderButton.innerHTML = '<span class="topbar-identity__text"><span class="topbar-identity__title">Канал</span><span class="topbar-identity__sub">Загрузка…</span></span>';
|
||||
channelHeaderButton.innerHTML = '<span class="topbar-identity__text"><span class="topbar-identity__title">Канал</span><span class="topbar-identity__sub"> </span></span>';
|
||||
channelHeaderButton.disabled = true;
|
||||
|
||||
const header = createTopBar({
|
||||
@@ -3208,7 +3208,7 @@ export function render({ navigate, route, chrome }) {
|
||||
activeChannelData = null;
|
||||
activeOpenEntrypointHistory = null;
|
||||
activeSelector = null;
|
||||
channelHeaderButton.innerHTML = '<span class="channel-header-title">Канал</span><span class="channel-header-owner">Загрузка…</span>';
|
||||
channelHeaderButton.innerHTML = '<span class="channel-header-title">Канал</span><span class="channel-header-owner"> </span>';
|
||||
channelHeaderButton.disabled = true;
|
||||
channelHeaderButton.onclick = null;
|
||||
if (channelMoreButton) channelMoreButton.disabled = true;
|
||||
|
||||
@@ -469,7 +469,7 @@ async function openForwardMessageDialog({ message, sourceChatId = '', onConfirm
|
||||
</div>
|
||||
<div class="dm-forward-preview" id="chat-forward-preview"></div>
|
||||
<div class="dm-forward-list" id="chat-forward-list">
|
||||
<div class="meta-muted dm-forward-loading">Загружаем чаты…</div>
|
||||
<div class="dm-forward-loading"><div class="loading-state" style="--loading-delay:250ms"><span class="spinner" role="status" aria-label="Загрузка"></span></div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { createTopBar } from '../components/topbar.js';
|
||||
import { createLoadingState } from '../components/feedback.js';
|
||||
import { iconHtml } from '../components/ui-icon.js';
|
||||
import { state } from '../state.js';
|
||||
import { bytesToBase58 } from '../services/crypto-utils.js';
|
||||
@@ -19,9 +20,9 @@ export function render({navigate, chrome}) {
|
||||
back: { label: '←', onClick: () => navigate('access-keys-view') },
|
||||
}));
|
||||
|
||||
const status = document.createElement('p');
|
||||
const status = document.createElement('div');
|
||||
status.className = 'meta-muted';
|
||||
status.textContent = 'Загружаем сохранённые ключи...';
|
||||
status.append(createLoadingState({ label: 'Загружаю ключи' }));
|
||||
|
||||
const card = document.createElement('div');
|
||||
card.className = 'nav-list key-list';
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// UNUSED FOR NOW: настройка дополнительного пароля для подключения другого устройства
|
||||
// сохранена в коде, но не показывается в активном UI. Текущий UX всегда без пароля.
|
||||
import { createTopBar } from '../components/topbar.js';
|
||||
import { createLoadingState } from '../components/feedback.js';
|
||||
import { authService, setAuthError, setAuthInfo, state } from '../state.js';
|
||||
import { deriveEspPairingPasswordHash } from '../services/device-pairing-service.js';
|
||||
import { toUserMessage } from '../services/ui-error-texts.js';
|
||||
@@ -27,9 +28,9 @@ export function render({navigate, chrome}) {
|
||||
const card = document.createElement('div');
|
||||
card.className = 'card stack';
|
||||
|
||||
const summary = document.createElement('p');
|
||||
const summary = document.createElement('div');
|
||||
summary.className = 'auth-copy';
|
||||
summary.textContent = 'Загружаем текущие настройки...';
|
||||
summary.append(createLoadingState({ label: 'Загружаю настройки' }));
|
||||
|
||||
const hint = document.createElement('p');
|
||||
hint.className = 'meta-muted';
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
import { createTopBar } from '../components/topbar.js';
|
||||
import { renderUserAvatar } from '../components/avatar-image.js';
|
||||
import { createErrorState, createLoadingState, createStateMessage } from '../components/feedback.js';
|
||||
import { createPersonRow } from '../components/person-row.js';
|
||||
import { iconHtml } from '../components/ui-icon.js';
|
||||
import { authService } from '../state.js';
|
||||
import { navigateBack } from '../router.js';
|
||||
import { userDisplayName } from '../services/user-display.js';
|
||||
import { toUserMessage } from '../services/ui-error-texts.js';
|
||||
import { avatarReferenceToRenderModel, parseAvatarReference } from '../services/avatar-reference.js';
|
||||
|
||||
export const pageMeta = { id: 'user-profile-list-view', title: 'Список' };
|
||||
@@ -17,12 +21,22 @@ const TITLES = {
|
||||
channels_owned: 'Каналы', channels_following: 'Подписки на каналы',
|
||||
};
|
||||
|
||||
function friendTabsHtml(activeKind) {
|
||||
return `
|
||||
<div class="profile-list-tabs" role="tablist" aria-label="Тип друзей">
|
||||
<button type="button" class="profile-list-tab${activeKind === 'friends' ? ' is-active' : ''}" data-friend-kind="friends" role="tab" aria-selected="${activeKind === 'friends'}">Друзья</button>
|
||||
<button type="button" class="profile-list-tab${activeKind === 'close_friends' ? ' is-active' : ''}" data-friend-kind="close_friends" role="tab" aria-selected="${activeKind === 'close_friends'}">Близкие друзья</button>
|
||||
</div>`;
|
||||
const EMPTY_TEXT = {
|
||||
friends: 'Друзей пока нет.',
|
||||
close_friends: 'Близких друзей пока нет.',
|
||||
primary_received: 'Пока никто не подтвердил.',
|
||||
primary_given: 'Пока никого не подтвердили.',
|
||||
shine_received: 'Пока никто не подтвердил.',
|
||||
shine_given: 'Пока никого не подтвердили.',
|
||||
channels_owned: 'Каналов пока нет.',
|
||||
channels_following: 'Подписок пока нет.',
|
||||
};
|
||||
|
||||
const RELATION_TEXT = { contact: 'контакт', friend: 'друг', close_friend: 'близкий друг' };
|
||||
const SEARCH_FROM = 12; // с какого размера списка появляется поиск по нему
|
||||
|
||||
function searchText(value) {
|
||||
return String(value || '').toLowerCase().replaceAll('ё', 'е').trim();
|
||||
}
|
||||
|
||||
export function render({ navigate, route, chrome }) {
|
||||
@@ -32,124 +46,158 @@ export function render({ navigate, route, chrome }) {
|
||||
const isFriendsScreen = initialKind === 'friends' || initialKind === 'close_friends';
|
||||
const isChannelsScreen = initialKind === 'channels_owned' || initialKind === 'channels_following';
|
||||
let includeDeleted = false;
|
||||
let disposed = false;
|
||||
let rows = [];
|
||||
let query = '';
|
||||
|
||||
const screen = document.createElement('section');
|
||||
screen.className = 'stack';
|
||||
screen.className = 'stack profile-list-screen';
|
||||
const body = document.createElement('div');
|
||||
body.className = 'stack';
|
||||
const status = document.createElement('div');
|
||||
status.className = 'status-line';
|
||||
status.textContent = 'Загрузка...';
|
||||
body.className = 'profile-list-body';
|
||||
|
||||
chrome?.setTopbar(createTopBar({
|
||||
title: TITLES[initialKind] || 'Список',
|
||||
back: { label: '←', onClick: () => navigateBack() },
|
||||
back: { onClick: () => navigateBack() },
|
||||
}));
|
||||
|
||||
if (isChannelsScreen) {
|
||||
const filter = document.createElement('label');
|
||||
filter.className = 'profile-list-deleted-filter';
|
||||
filter.innerHTML = '<input type="checkbox" id="profile-list-show-deleted"> <span>Показать удалённые</span>';
|
||||
screen.append(filter);
|
||||
}
|
||||
if (isFriendsScreen) {
|
||||
const tabs = document.createElement('div');
|
||||
tabs.innerHTML = friendTabsHtml(activeKind);
|
||||
screen.append(tabs.firstElementChild);
|
||||
tabs.className = 'tabs profile-list-kind';
|
||||
tabs.setAttribute('role', 'radiogroup');
|
||||
tabs.setAttribute('aria-label', 'Кого показать');
|
||||
for (const [kind, label] of [['friends', 'Друзья'], ['close_friends', 'Близкие друзья']]) {
|
||||
const button = document.createElement('button');
|
||||
button.type = 'button';
|
||||
button.className = 'tab-btn';
|
||||
button.dataset.kind = kind;
|
||||
button.setAttribute('role', 'radio');
|
||||
button.setAttribute('aria-checked', String(kind === activeKind));
|
||||
button.textContent = label;
|
||||
button.addEventListener('click', () => {
|
||||
if (kind === activeKind) return;
|
||||
activeKind = kind;
|
||||
tabs.querySelectorAll('.tab-btn').forEach((el) => el.setAttribute('aria-checked', String(el.dataset.kind === activeKind)));
|
||||
void load(activeKind);
|
||||
});
|
||||
tabs.append(button);
|
||||
}
|
||||
screen.append(tabs);
|
||||
}
|
||||
screen.append(status, body);
|
||||
|
||||
if (isChannelsScreen) {
|
||||
const filter = document.createElement('div');
|
||||
filter.className = 'nav-list';
|
||||
filter.innerHTML = `
|
||||
<label class="nav-row nav-row--switch">
|
||||
<span class="nav-row__text"><span class="nav-row__label">Показать удалённые</span></span>
|
||||
<input class="switch" type="checkbox" />
|
||||
</label>`;
|
||||
filter.querySelector('input').addEventListener('change', (event) => {
|
||||
includeDeleted = Boolean(event.currentTarget.checked);
|
||||
void load(activeKind);
|
||||
});
|
||||
screen.append(filter);
|
||||
}
|
||||
|
||||
// Поиск по списку – когда людей много (у «Друзей» их бывают сотни).
|
||||
const searchWrap = document.createElement('label');
|
||||
searchWrap.className = 'search-field profile-list-search';
|
||||
searchWrap.hidden = true;
|
||||
searchWrap.innerHTML = `<span class="search-field__icon" aria-hidden="true">${iconHtml('search')}</span><input class="search-field__input" type="search" placeholder="Имя или логин" autocomplete="off" enterkeyhint="search" aria-label="Поиск по списку" />`;
|
||||
const searchInput = searchWrap.querySelector('input');
|
||||
searchInput.addEventListener('input', () => {
|
||||
query = searchText(searchInput.value);
|
||||
renderRows();
|
||||
});
|
||||
screen.append(searchWrap, body);
|
||||
|
||||
let loadGeneration = 0;
|
||||
|
||||
function renderRelationRows(rows) {
|
||||
rows.forEach((row) => {
|
||||
const el = document.createElement('button');
|
||||
el.type = 'button';
|
||||
el.className = 'ui-button card row profile-list-row';
|
||||
el.append(renderUserAvatar({
|
||||
login: row.login,
|
||||
firstName: row.firstName,
|
||||
lastName: row.lastName,
|
||||
avatar: parseAvatar(row.avatarAr),
|
||||
size: 'md',
|
||||
}));
|
||||
const fullName = userDisplayName(row);
|
||||
const t = document.createElement('div');
|
||||
t.className = 'profile-list-row-text';
|
||||
const marks = [
|
||||
row.relationType && row.relationType !== 'none' ? ({ contact: 'контакт', friend: 'друг', close_friend: 'близкий друг' }[row.relationType] || row.relationType) : '',
|
||||
row.accountRole === 'primary' ? 'основной' : row.accountRole === 'non_voting' ? 'голос не учитывается' : '',
|
||||
row.shineStatus === 'shining' ? 'сияющий' : row.shineStatus === 'not_interested' ? 'сияние неинтересно' : '',
|
||||
row.primaryConfirmed ? 'основной подтверждён ✓' : '',
|
||||
row.shineConfirmed ? 'сияющий подтверждён ✓' : '',
|
||||
].filter(Boolean).join(' · ');
|
||||
t.innerHTML = `<b>${fullName}</b><small>@${String(row.login || '')}${marks ? ` · ${marks}` : ''}</small>`;
|
||||
el.append(t);
|
||||
el.addEventListener('click', () => navigate(`SHiNE/${encodeURIComponent(row.login)}`));
|
||||
body.append(el);
|
||||
function relationRow(row) {
|
||||
const marks = [
|
||||
RELATION_TEXT[row.relationType] || '',
|
||||
row.shineStatus === 'shining' ? 'сияющий' : '',
|
||||
row.accountRole === 'primary' ? 'официальный' : '',
|
||||
row.primaryConfirmed ? 'официальный подтверждён' : '',
|
||||
row.shineConfirmed ? 'сияние подтверждено' : '',
|
||||
].filter(Boolean);
|
||||
const name = userDisplayName(row);
|
||||
const sub = [name !== row.login ? `@${row.login}` : '', ...marks].filter(Boolean).join(' · ');
|
||||
return createPersonRow({
|
||||
login: row.login,
|
||||
name,
|
||||
firstName: row.firstName,
|
||||
lastName: row.lastName,
|
||||
avatar: parseAvatar(row.avatarAr),
|
||||
official: row.accountRole === 'primary',
|
||||
ring: row.shineStatus === 'shining' ? 'shining' : (row.relationType === 'close_friend' ? 'close' : ''),
|
||||
sub,
|
||||
onClick: () => navigate(`SHiNE/${encodeURIComponent(row.login)}`),
|
||||
actions: [{ icon: 'message', label: 'Написать', onClick: () => navigate(`chat/${encodeURIComponent(row.login)}`) }],
|
||||
});
|
||||
}
|
||||
|
||||
function channelRow(row) {
|
||||
const el = document.createElement('button');
|
||||
el.type = 'button';
|
||||
el.className = 'ui-button card row profile-list-row';
|
||||
el.append(renderUserAvatar({ login: row.ownerLogin, firstName: row.displayName, lastName: '', avatar: (row.avatarAr || row.avatarSha256) ? { ar: String(row.avatarAr || ''), sha256Hex: String(row.avatarSha256 || '') } : null, size: 'md' }));
|
||||
const text = document.createElement('div');
|
||||
text.className = 'profile-list-row-text';
|
||||
const title = document.createElement('b');
|
||||
title.textContent = `${String(row.displayName || row.slug || '')}${row.deleted ? ' · удалён' : ''}`;
|
||||
const sub = document.createElement('small');
|
||||
sub.textContent = `${String(row.ownerLogin || '')} / ${String(row.slug || '')}`;
|
||||
text.append(title, sub);
|
||||
el.append(text);
|
||||
el.addEventListener('click', () => navigate(`channel/${encodeURIComponent(row.ownerBlockchainName)}/${Number(row.rootBlockNumber || 0)}/${encodeURIComponent(row.rootBlockHashHex || '')}/about`));
|
||||
return el;
|
||||
}
|
||||
|
||||
function renderRows() {
|
||||
body.replaceChildren();
|
||||
const matches = (row) => !query || searchText(isChannelsScreen
|
||||
? `${row.displayName} ${row.slug} ${row.ownerLogin}`
|
||||
: `${userDisplayName(row)} ${row.login}`).includes(query);
|
||||
const visible = rows.filter(matches);
|
||||
if (!rows.length) {
|
||||
body.append(createStateMessage({ icon: isChannelsScreen ? 'channels' : 'network', title: EMPTY_TEXT[activeKind] || 'Пока никого.' }));
|
||||
return;
|
||||
}
|
||||
if (!visible.length) {
|
||||
body.append(createStateMessage({ icon: 'search', title: 'Никого не нашлось', text: 'Проверьте имя или логин.' }));
|
||||
return;
|
||||
}
|
||||
const frag = document.createDocumentFragment();
|
||||
visible.forEach((row) => frag.append(isChannelsScreen ? channelRow(row) : relationRow(row)));
|
||||
body.append(frag);
|
||||
}
|
||||
|
||||
async function load(kind) {
|
||||
const generation = ++loadGeneration;
|
||||
status.className = 'status-line';
|
||||
status.textContent = 'Загрузка...';
|
||||
body.replaceChildren();
|
||||
body.replaceChildren(createLoadingState({ label: 'Загружаю список' }));
|
||||
try {
|
||||
if (kind === 'channels_owned' || kind === 'channels_following') {
|
||||
const payload = await authService.listUserProfileChannels(login, kind === 'channels_owned' ? 'owned' : 'following', 200, 0, includeDeleted);
|
||||
if (generation !== loadGeneration) return;
|
||||
const rows = Array.isArray(payload?.channels) ? payload.channels : [];
|
||||
rows.forEach((row) => {
|
||||
const el = document.createElement('button');
|
||||
el.type = 'button';
|
||||
el.className = 'ui-button card row profile-list-row';
|
||||
el.append(renderUserAvatar({ login: row.ownerLogin, firstName: row.displayName, lastName: '', avatar: (row.avatarAr || row.avatarSha256) ? { ar: String(row.avatarAr || ''), sha256Hex: String(row.avatarSha256 || '') } : null, size: 'md' }));
|
||||
const t = document.createElement('div');
|
||||
t.className = 'profile-list-row-text';
|
||||
t.innerHTML = `<b>${String(row.displayName || row.slug || '')}${row.deleted ? ' · Удалён' : ''}</b><small>${String(row.ownerLogin || '')} / ${String(row.slug || '')}</small>`;
|
||||
el.append(t);
|
||||
el.addEventListener('click', () => navigate(`channel/${encodeURIComponent(row.ownerBlockchainName)}/${Number(row.rootBlockNumber || 0)}/${encodeURIComponent(row.rootBlockHashHex || '')}/about`));
|
||||
body.append(el);
|
||||
});
|
||||
status.textContent = rows.length ? '' : 'Список пуст.';
|
||||
return;
|
||||
}
|
||||
|
||||
const payload = await authService.listUserProfileRelations(login, kind, 200, 0);
|
||||
if (generation !== loadGeneration) return;
|
||||
const rows = Array.isArray(payload?.users) ? payload.users : [];
|
||||
renderRelationRows(rows);
|
||||
status.textContent = rows.length ? '' : 'Список пуст.';
|
||||
} catch (e) {
|
||||
if (generation !== loadGeneration) return;
|
||||
status.className = 'status-line is-unavailable';
|
||||
status.textContent = `Ошибка: ${e.message || 'unknown'}`;
|
||||
const payload = isChannelsScreen
|
||||
? await authService.listUserProfileChannels(login, kind === 'channels_owned' ? 'owned' : 'following', 200, 0, includeDeleted)
|
||||
: await authService.listUserProfileRelations(login, kind, 200, 0);
|
||||
if (disposed || generation !== loadGeneration) return;
|
||||
rows = Array.isArray(isChannelsScreen ? payload?.channels : payload?.users) ? (isChannelsScreen ? payload.channels : payload.users) : [];
|
||||
searchWrap.hidden = rows.length < SEARCH_FROM;
|
||||
renderRows();
|
||||
} catch (error) {
|
||||
if (disposed || generation !== loadGeneration) return;
|
||||
body.replaceChildren(createErrorState({
|
||||
title: 'Не удалось загрузить список',
|
||||
text: toUserMessage(error, 'Проверьте соединение и попробуйте ещё раз.'),
|
||||
onRetry: () => { void load(activeKind); },
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
if (isChannelsScreen) {
|
||||
screen.querySelector('#profile-list-show-deleted')?.addEventListener('change', (event) => {
|
||||
includeDeleted = !!event.currentTarget.checked;
|
||||
void load(activeKind);
|
||||
});
|
||||
}
|
||||
|
||||
if (isFriendsScreen) {
|
||||
screen.addEventListener('click', (event) => {
|
||||
const tab = event.target.closest('[data-friend-kind]');
|
||||
if (!tab) return;
|
||||
const nextKind = String(tab.dataset.friendKind || '');
|
||||
if (!nextKind || nextKind === activeKind) return;
|
||||
activeKind = nextKind;
|
||||
screen.querySelectorAll('[data-friend-kind]').forEach((button) => {
|
||||
const selected = button.dataset.friendKind === activeKind;
|
||||
button.classList.toggle('is-active', selected);
|
||||
button.setAttribute('aria-selected', selected ? 'true' : 'false');
|
||||
});
|
||||
void load(activeKind);
|
||||
});
|
||||
}
|
||||
screen.cleanup = () => {
|
||||
disposed = true;
|
||||
loadGeneration += 1;
|
||||
};
|
||||
|
||||
void load(activeKind);
|
||||
return screen;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { createTopBar } from '../components/topbar.js';
|
||||
import { createErrorState, createLoadingState } from '../components/feedback.js';
|
||||
import { authService, state } from '../state.js';
|
||||
import { loadRelationsForPair, loadUserProfileCard } from '../services/user-connections.js';
|
||||
import { navigateBack } from '../router.js';
|
||||
@@ -177,9 +178,9 @@ export function render({ route, chrome }) {
|
||||
}
|
||||
|
||||
async function refresh({ loading = true } = {}) {
|
||||
// «Загрузка…» – только если ответ задержался, иначе строка мелькает и сдвигает экран.
|
||||
// Спиннер – только если ответ задержался, иначе он мелькает и сдвигает экран.
|
||||
const loadingTimer = loading ? window.setTimeout(() => {
|
||||
if (screen.isConnected && !body.childElementCount) status.textContent = 'Загрузка…';
|
||||
if (screen.isConnected && !body.childElementCount) status.replaceChildren(createLoadingState({ label: 'Загрузка', delayMs: 0 }));
|
||||
}, 500) : 0;
|
||||
[selfCard, targetCard, flags] = await Promise.all([
|
||||
loadUserProfileCard(selfLogin),
|
||||
@@ -250,10 +251,18 @@ export function render({ route, chrome }) {
|
||||
return screen;
|
||||
}
|
||||
|
||||
refresh().catch((error) => {
|
||||
status.className = 'status-line relation-manage-status is-unavailable';
|
||||
status.textContent = `Ошибка: ${error?.message || 'Не удалось загрузить связи'}`;
|
||||
});
|
||||
const showLoadError = (error) => {
|
||||
status.className = 'relation-manage-status';
|
||||
status.replaceChildren(createErrorState({
|
||||
title: 'Не удалось загрузить связь',
|
||||
text: toUserMessage(error, 'Проверьте соединение и попробуйте ещё раз.'),
|
||||
onRetry: () => {
|
||||
status.replaceChildren();
|
||||
refresh().catch(showLoadError);
|
||||
},
|
||||
}));
|
||||
};
|
||||
refresh().catch(showLoadError);
|
||||
|
||||
return screen;
|
||||
}
|
||||
|
||||
@@ -989,7 +989,7 @@ export function render({navigate, chrome}) {
|
||||
const stateCard = document.createElement('div');
|
||||
stateCard.className = 'card stack';
|
||||
stateCard.innerHTML = `
|
||||
<p class="meta-muted" style="margin:0;">Текущее состояние покупки загружается...</p>
|
||||
<div class="loading-state" style="--loading-delay:250ms"><span class="spinner" role="status" aria-label="Загрузка"></span></div>
|
||||
`;
|
||||
|
||||
const amountLabel = document.createElement('label');
|
||||
|
||||
@@ -592,6 +592,7 @@ body { overflow-x: hidden; }
|
||||
background: var(--surface);
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
.search-field[hidden] { display: none; }
|
||||
.search-field:focus-within { border-color: var(--focus-ring); box-shadow: 0 0 0 1px var(--focus-ring); }
|
||||
.search-field__icon { display: inline-flex; }
|
||||
.search-field__icon svg { width: 20px; height: 20px; }
|
||||
|
||||
@@ -1947,39 +1947,12 @@
|
||||
padding-right: 6px;
|
||||
}
|
||||
|
||||
.profile-list-tabs {
|
||||
width: min(92%, 360px);
|
||||
margin: 4px auto 10px;
|
||||
padding: 3px;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 3px;
|
||||
border: 1px solid color-mix(in srgb, var(--accent) 12%, transparent);
|
||||
border-radius: 14px;
|
||||
background: color-mix(in srgb, var(--surface) 24%, transparent);
|
||||
}
|
||||
|
||||
.profile-list-tab {
|
||||
min-height: 36px;
|
||||
padding: 7px 10px;
|
||||
border: 0;
|
||||
border-radius: 11px;
|
||||
background: transparent;
|
||||
color: var(--text-secondary);
|
||||
font: inherit;
|
||||
font-size: 12px;
|
||||
font-weight: 650;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.profile-list-tab.is-active {
|
||||
background: color-mix(in srgb, var(--accent) 18%, transparent);
|
||||
color: var(--text-primary);
|
||||
box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text-primary) 6%, transparent);
|
||||
}
|
||||
|
||||
@media (max-height: 700px) {
|
||||
.user-profile-identity { margin-top: 8px; }
|
||||
.user-profile-social-metrics { margin-top: 16px; }
|
||||
.user-profile-about-card { margin-top: 15px; }
|
||||
}
|
||||
|
||||
/* Списки из профиля («Друзья», «Подтвердили…»): переключатель и поиск над строками людей. */
|
||||
.profile-list-kind { margin-bottom: var(--space-1); }
|
||||
.profile-list-search { margin-bottom: var(--space-1); }
|
||||
|
||||
Reference in New Issue
Block a user