Добавить систему поддержки SHiNE

This commit is contained in:
AidarKC
2026-11-12 11:01:31 +03:00
parent 6b120731a3
commit c97df82538
34 changed files with 1323 additions and 52 deletions
+8
View File
@@ -1,3 +1,5 @@
import { openShineSupportDialog } from '../components/shine-support-dialog.js';
import { attachSupportStats } from '../components/support-stats.js';
import { t } from '../i18n/index.js';
import { createTopBar } from '../components/topbar.js';
import { SHINE_CONNECTIONS_LOGO_SRC } from '../components/shine-logo.js';
@@ -61,9 +63,11 @@ export function render({ navigate, route, chrome }) {
profileTileHtml({ icon: 'user-plus', label: t('screens.user_profile_view.text_004'), attrs: 'data-profile-action="add"' }),
profileTileHtml({ label: t('screens.user_profile_view.text_005'), attrs: 'data-profile-action="links"', iconMarkup: `<img class="pf-tile-mandala" src="${SHINE_CONNECTIONS_LOGO_SRC}" alt="" aria-hidden="true">` }),
profileTileHtml({ icon: 'message', label: t('screens.user_profile_view.text_006'), attrs: 'data-profile-action="chat"' }),
profileTileHtml({ icon: 'heart', label: t('screens.support_phase2.donate'), attrs: 'data-profile-action="support"' }),
].join(''),
});
attachSupportStats(body, { login: card.login, solanaEndpoint: state.entrySettings.solanaServer, isActive: () => !disposed });
syncRelationTile();
avatarPreview = attachProfileAvatarPreview(body.querySelector('.user-profile-avatar-slot'), card);
@@ -121,6 +125,10 @@ export function render({ navigate, route, chrome }) {
navigate(makeProfileLinksRoute(card.login));
return;
}
if (action === 'support') {
openShineSupportDialog({ recipientLogin: card.login, onSuccess: () => { if (!disposed) renderProfile(); } });
return;
}
if (action === 'chat') {
navigate(`chat/${encodeURIComponent(card.login)}`);
}