SHA256
UI: доработать профиль и связи
This commit is contained in:
@@ -42,7 +42,7 @@ function openProfileInfoModal({ title, text }) {
|
||||
|
||||
function officialInfoText() {
|
||||
return 'Можно создавать несколько альтернативных или анонимных каналов. '
|
||||
+ 'Но для корректного учёта голосов на одного реального человека используется только один официальный канал.';
|
||||
+ 'Но для корректного учёта голосов на одного реального человека используется только один основной аккаунт.';
|
||||
}
|
||||
|
||||
function shineInfoText() {
|
||||
@@ -177,10 +177,15 @@ function renderIdentity(card) {
|
||||
}
|
||||
|
||||
function renderReadOnlyBadges(card) {
|
||||
const accountRole = String(card.accountRole || '').trim().toLowerCase();
|
||||
const shineStatus = String(card.shineStatus || '').trim().toLowerCase();
|
||||
const accountLabel = accountRole === 'primary' ? 'Основной аккаунт' : accountRole === 'non_voting' ? 'Голос не учитывать' : '';
|
||||
const shineLabel = shineStatus === 'shining' ? 'Сияющий' : '';
|
||||
return `
|
||||
<div class="row wrap-row">
|
||||
<button class="badge profile-badge-trigger ${card.official ? 'is-yes-official' : 'is-no'}" type="button" data-profile-info="official">Официальный: ${card.official ? 'Yes' : 'No'}</button>
|
||||
<button class="badge profile-badge-trigger ${card.shine ? 'is-yes-shine' : 'is-no'}" type="button" data-profile-info="shine">Сияющий: ${card.shine ? 'Yes' : 'No'}</button>
|
||||
${accountLabel ? `<button class="badge profile-badge-trigger ${accountRole === 'primary' ? 'is-yes-official' : 'is-no'}" type="button" data-profile-info="official">${escapeHtml(accountLabel)}</button>` : ''}
|
||||
${shineLabel ? `<button class="badge profile-badge-trigger is-yes-shine" type="button" data-profile-info="shine">${escapeHtml(shineLabel)}</button>` : ''}
|
||||
${shineStatus === 'not_interested' ? `<span class="profile-shine-not-interested" title="Сияние неинтересно"><img src="/assets/shine-status-not-interested.svg" alt="Сияние неинтересно" /></span>` : ''}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
@@ -193,6 +198,8 @@ function renderReadOnlyParams(card) {
|
||||
{ label: 'Адрес', value: card.address },
|
||||
{ label: 'Web', value: card.web },
|
||||
{ label: 'Телефон', value: card.phone },
|
||||
{ label: 'О себе', value: card.about },
|
||||
{ label: 'Духовный путь', value: card.spiritualPath },
|
||||
];
|
||||
|
||||
return `
|
||||
@@ -341,7 +348,7 @@ export function render({ navigate, route }) {
|
||||
const infoKind = String(infoBtn?.getAttribute('data-profile-info') || '');
|
||||
if (infoKind === 'official') {
|
||||
openProfileInfoModal({
|
||||
title: 'Официальный канал',
|
||||
title: 'Основной аккаунт',
|
||||
text: officialInfoText(),
|
||||
});
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user