Refresh profile header action icons

This commit is contained in:
AidarKC
2026-07-22 15:12:48 +04:00
parent d24d1c178b
commit 38141ea5c7
6 changed files with 88 additions and 19 deletions
+11 -1
View File
@@ -101,8 +101,18 @@ export function render({ navigate }) {
const topActions = document.createElement('div');
topActions.className = 'profile-top-actions';
topActions.innerHTML = `
<button class="ghost-btn profile-top-action-btn profile-top-menu-btn" type="button" data-top-action="settings" aria-label="Настройки" title="Настройки">⋮</button>
<button class="ghost-btn profile-top-action-btn profile-top-icon-btn is-active" type="button" data-top-action="profile" aria-label="Профиль" title="Профиль">
<img src="/assets/profile-icon-profile.svg" alt="" aria-hidden="true" />
</button>
<button class="ghost-btn profile-top-action-btn profile-top-icon-btn" type="button" data-top-action="wallet" aria-label="Кошелёк" title="Кошелёк">
<img src="/assets/profile-icon-wallet.svg" alt="" aria-hidden="true" />
</button>
<button class="ghost-btn profile-top-action-btn profile-top-icon-btn" type="button" data-top-action="settings" aria-label="Настройки" title="Настройки">
<img src="/assets/profile-icon-settings.svg" alt="" aria-hidden="true" />
</button>
`;
topActions.querySelector('[data-top-action="profile"]')?.addEventListener('click', () => navigate('profile'));
topActions.querySelector('[data-top-action="wallet"]')?.addEventListener('click', () => navigate('wallet'));
topActions.querySelector('[data-top-action="settings"]')?.addEventListener('click', () => navigate('settings-view'));
const card = document.createElement('div');