Доработать профильные кнопки и навигацию

This commit is contained in:
AidarKC
2026-07-22 15:20:05 +04:00
parent a56252c361
commit f640451257
7 changed files with 16 additions and 26 deletions
+2 -2
View File
@@ -1,2 +1,2 @@
client.version=1.2.341 client.version=1.2.342
server.version=1.2.313 server.version=1.2.314
+3 -9
View File
@@ -1,12 +1,6 @@
<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="6" y="6" width="52" height="52" rx="16" fill="#121A24" stroke="#E7EDF7" stroke-opacity="0.18" stroke-width="2"/> <rect x="6" y="6" width="52" height="52" rx="16" fill="#121A24" stroke="#E7EDF7" stroke-opacity="0.18" stroke-width="2"/>
<path d="M32 21V17" stroke="#F2F5FB" stroke-width="2.6" stroke-linecap="round"/> <circle cx="32" cy="32" r="10.2" stroke="#F2F5FB" stroke-width="2.8"/>
<path d="M32 47V43" stroke="#F2F5FB" stroke-width="2.6" stroke-linecap="round"/> <path d="M32 16.8L34.8 20.4L39.3 19.2L40.2 23.8L44.8 24.7L43.6 29.2L47.2 32L43.6 34.8L44.8 39.3L40.2 40.2L39.3 44.8L34.8 43.6L32 47.2L29.2 43.6L24.7 44.8L23.8 40.2L19.2 39.3L20.4 34.8L16.8 32L20.4 29.2L19.2 24.7L23.8 23.8L24.7 19.2L29.2 20.4L32 16.8Z" stroke="#F2F5FB" stroke-width="2.4" stroke-linejoin="round"/>
<path d="M43 32H47" stroke="#F2F5FB" stroke-width="2.6" stroke-linecap="round"/> <circle cx="32" cy="32" r="3.5" fill="#F2F5FB"/>
<path d="M17 32H21" stroke="#F2F5FB" stroke-width="2.6" stroke-linecap="round"/>
<path d="M39.8 24.2L42.7 21.3" stroke="#F2F5FB" stroke-width="2.6" stroke-linecap="round"/>
<path d="M21.3 42.7L24.2 39.8" stroke="#F2F5FB" stroke-width="2.6" stroke-linecap="round"/>
<path d="M39.8 39.8L42.7 42.7" stroke="#F2F5FB" stroke-width="2.6" stroke-linecap="round"/>
<path d="M21.3 21.3L24.2 24.2" stroke="#F2F5FB" stroke-width="2.6" stroke-linecap="round"/>
<circle cx="32" cy="32" r="7.5" stroke="#F2F5FB" stroke-width="2.6"/>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1007 B

After

Width:  |  Height:  |  Size: 667 B

+1 -1
View File
@@ -96,7 +96,7 @@ export function render({ navigate }) {
screen.append( screen.append(
renderHeader({ renderHeader({
title: 'Редактирование профиля', title: 'Редактирование профиля',
leftAction: { label: '←', onClick: () => navigate('settings-view') }, leftAction: { label: '←', onClick: () => navigate('profile-view') },
}), }),
); );
+2 -2
View File
@@ -101,7 +101,7 @@ export function render({ navigate }) {
const topActions = document.createElement('div'); const topActions = document.createElement('div');
topActions.className = 'profile-top-actions'; topActions.className = 'profile-top-actions';
topActions.innerHTML = ` topActions.innerHTML = `
<button class="ghost-btn profile-top-action-btn profile-top-icon-btn is-active" type="button" data-top-action="profile" aria-label="Профиль" title="Профиль"> <button class="ghost-btn profile-top-action-btn profile-top-icon-btn" type="button" data-top-action="profile" aria-label="Редактировать профиль" title="Редактировать профиль">
<img src="/assets/profile-icon-profile.svg" alt="" aria-hidden="true" /> <img src="/assets/profile-icon-profile.svg" alt="" aria-hidden="true" />
</button> </button>
<button class="ghost-btn profile-top-action-btn profile-top-icon-btn" type="button" data-top-action="wallet" aria-label="Кошелёк" title="Кошелёк"> <button class="ghost-btn profile-top-action-btn profile-top-icon-btn" type="button" data-top-action="wallet" aria-label="Кошелёк" title="Кошелёк">
@@ -111,7 +111,7 @@ export function render({ navigate }) {
<img src="/assets/profile-icon-settings.svg" alt="" aria-hidden="true" /> <img src="/assets/profile-icon-settings.svg" alt="" aria-hidden="true" />
</button> </button>
`; `;
topActions.querySelector('[data-top-action="profile"]')?.addEventListener('click', () => navigate('profile')); topActions.querySelector('[data-top-action="profile"]')?.addEventListener('click', () => navigate('profile-edit-view'));
topActions.querySelector('[data-top-action="wallet"]')?.addEventListener('click', () => navigate('wallet')); topActions.querySelector('[data-top-action="wallet"]')?.addEventListener('click', () => navigate('wallet'));
topActions.querySelector('[data-top-action="settings"]')?.addEventListener('click', () => navigate('settings-view')); topActions.querySelector('[data-top-action="settings"]')?.addEventListener('click', () => navigate('settings-view'));
-4
View File
@@ -41,8 +41,6 @@ export function render({ navigate }) {
const card = document.createElement('div'); const card = document.createElement('div');
card.className = 'card stack'; card.className = 'card stack';
card.innerHTML = ` card.innerHTML = `
<button class="text-btn" type="button" id="settings-profile-edit">Редактировать профиль</button>
<button class="text-btn" type="button" id="settings-wallet">Кошелёк</button>
<button class="text-btn" type="button" id="settings-links">Показать связи</button> <button class="text-btn" type="button" id="settings-links">Показать связи</button>
<button class="text-btn" type="button" id="settings-device">Устройства</button> <button class="text-btn" type="button" id="settings-device">Устройства</button>
<button class="text-btn" type="button" id="settings-remote-addblock">Remote AddBlock через homeserver</button> <button class="text-btn" type="button" id="settings-remote-addblock">Remote AddBlock через homeserver</button>
@@ -52,8 +50,6 @@ export function render({ navigate }) {
<button class="text-btn" type="button" id="settings-signout">Завершить текущий сеанс</button> <button class="text-btn" type="button" id="settings-signout">Завершить текущий сеанс</button>
`; `;
card.querySelector('#settings-profile-edit').addEventListener('click', () => navigate('profile-edit-view'));
card.querySelector('#settings-wallet').addEventListener('click', () => navigate('wallet-view'));
card.querySelector('#settings-links').addEventListener('click', () => { card.querySelector('#settings-links').addEventListener('click', () => {
navigate(makeProfileLinksRoute(state.session.login)); navigate(makeProfileLinksRoute(state.session.login));
}); });
+1 -1
View File
@@ -433,7 +433,7 @@ export function render({ navigate }) {
screen.append( screen.append(
renderHeader({ renderHeader({
title: 'Кошелёк', title: 'Кошелёк',
leftAction: { label: '←', onClick: () => navigate('settings-view') }, leftAction: { label: '←', onClick: () => navigate('profile-view') },
}), }),
content, content,
status, status,
+7 -7
View File
@@ -5605,20 +5605,20 @@ html, body { overflow-x: hidden; }
.profile-top-action-btn { .profile-top-action-btn {
position: relative; position: relative;
width: 42px; width: 48px;
height: 42px; height: 48px;
min-width: 42px; min-width: 48px;
min-height: 42px; min-height: 48px;
padding: 0; padding: 0;
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
border-radius: 14px; border-radius: 15px;
} }
.profile-top-icon-btn img { .profile-top-icon-btn img {
width: 22px; width: 44px;
height: 22px; height: 44px;
display: block; display: block;
opacity: 0.94; opacity: 0.94;
filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.34)); filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.34));