diff --git a/VERSION.properties b/VERSION.properties index fce437a..f423721 100644 --- a/VERSION.properties +++ b/VERSION.properties @@ -1,2 +1,2 @@ -client.version=1.2.15 -server.version=1.2.15 +client.version=1.2.16 +server.version=1.2.16 diff --git a/shine-UI/js/pages/network-view.js b/shine-UI/js/pages/network-view.js index 7f3cea6..5504dcc 100644 --- a/shine-UI/js/pages/network-view.js +++ b/shine-UI/js/pages/network-view.js @@ -514,6 +514,8 @@ export function render({ navigate, route }) { const screen = document.createElement('section'); screen.className = 'network-screen'; + const appScreenEl = document.getElementById('app-screen'); + appScreenEl?.classList.add('network-scroll-lock'); const stage = document.createElement('div'); stage.className = 'network-stage'; @@ -834,6 +836,7 @@ export function render({ navigate, route }) { screen.cleanup = () => { window.removeEventListener('resize', onResize); if (observer) observer.disconnect(); + appScreenEl?.classList.remove('network-scroll-lock'); }; if (keepHistory && centerLogin) { diff --git a/shine-UI/js/pages/profile-view.js b/shine-UI/js/pages/profile-view.js index f21ff76..f3efcb3 100644 --- a/shine-UI/js/pages/profile-view.js +++ b/shine-UI/js/pages/profile-view.js @@ -182,7 +182,6 @@ export function render({ navigate }) { const item = currentToggles.find((entry) => entry.key === toggleKey); const isEnabled = Boolean(item?.enabled); if (toggleKey === 'official') { - status.className = 'status-line is-available'; if (statusLineEl instanceof HTMLElement) statusLineEl.className = 'status-line is-available'; if (statusLineEl instanceof HTMLElement) statusLineEl.textContent = isEnabled ? 'Аккаунт является официальным.' diff --git a/shine-UI/js/pages/user-profile-view.js b/shine-UI/js/pages/user-profile-view.js index c50634d..9f20444 100644 --- a/shine-UI/js/pages/user-profile-view.js +++ b/shine-UI/js/pages/user-profile-view.js @@ -18,10 +18,6 @@ function escapeHtml(text) { .replaceAll("'", '''); } -function boolText(flag) { - return flag ? 'Да' : 'Нет'; -} - function genderText(value) { const normalized = String(value || '').trim().toLowerCase(); if (normalized === 'male') return 'Мужской'; @@ -31,7 +27,7 @@ function genderText(value) { function relationButtonLabel(kind, flags) { if (kind === 'follow') return flags.outFollow ? 'Отписаться' : 'Подписаться'; - if (kind === 'friend') return flags.outFriend ? 'Убрать из друзей' : 'Добавить в друзья'; + if (kind === 'friend') return flags.outFriend ? 'Убрать из близких друзей' : 'Добавить в близкие друзья'; return flags.outContact ? 'Убрать из контактов' : 'Добавить в контакты'; } @@ -43,10 +39,29 @@ function relationNextState(kind, flags) { function relationConfirmLabel(kind) { if (kind === 'follow') return 'подписку'; - if (kind === 'friend') return 'дружбу'; + if (kind === 'friend') return 'статус близкого друга'; return 'контакт'; } +function relationStateText(kind, flags) { + if (kind === 'follow') { + if (flags.outFollow && flags.inFollow) return 'Вы взаимно подписаны.'; + if (flags.outFollow) return 'Вы подписаны на этот профиль.'; + if (flags.inFollow) return 'Этот профиль подписан на вас.'; + return ''; + } + if (kind === 'friend') { + if (flags.outFriend && flags.inFriend) return 'Вы взаимно близкие друзья.'; + if (flags.outFriend) return 'Вы считаете этот профиль близким другом.'; + if (flags.inFriend) return 'Этот профиль считает вас близким другом.'; + return ''; + } + if (flags.outContact && flags.inContact) return 'Вы обменялись контактами.'; + if (flags.outContact) return 'Вы добавили этот профиль в контакты.'; + if (flags.inContact) return 'Этот профиль добавил вас в контакты.'; + return ''; +} + function renderIdentity(card) { const lines = buildIdentityLines({ login: card.login, @@ -91,14 +106,20 @@ function renderReadOnlyBadges(card) { } function renderRelations(flags) { + const rows = [ + { kind: 'follow', text: relationStateText('follow', flags), button: relationButtonLabel('follow', flags) }, + { kind: 'friend', text: relationStateText('friend', flags), button: relationButtonLabel('friend', flags) }, + { kind: 'contact', text: relationStateText('contact', flags), button: relationButtonLabel('contact', flags) }, + ]; + return `