SHA256
Связи: список, поиск, фильтры со счётчиками, понятные состояния
- «Списком / На карте»: тот же состав людей списком – по близости (Близкие, Друзья, Контакты, Друзья друзей) или по алфавиту, «Написать» и меню у каждой строки; сотни строк без тормозов (content-visibility); - чипы фильтров вместо вкладок: один выбор, у каждого число людей, пустые скрыты; «Добавили вас» – связи только с той стороны («хочет дружить», «вас добавили»), в карточке – «Дружить в ответ» / «Добавить в ответ»; - поиск в шапке: сначала люди на карте (выбор – показать на карте), затем вся сеть (выбор – открыть его связи); - карточка человека: аватар, кто он вам («Друг · взаимно»), не прячется под карточкой; - чужая карта: в шапке аватар, имя и число связей, стрелка – к своей карте; - загрузка – спиннер с задержкой вместо текста, ошибка – с «Повторить», пустая карта – с подсказкой и действием; лишние панели в это время скрыты. Общие компоненты: feedback.js (спиннер, загрузка, пусто, ошибка), person-row.js (строка человека как в списке чатов), createSearchTopBar (шапка-поиск; поиск в чате переведён на неё).
This commit is contained in:
+1
-1
@@ -1,2 +1,2 @@
|
|||||||
client.version=1.19.2
|
client.version=1.19.3
|
||||||
server.version=1.15.0
|
server.version=1.15.0
|
||||||
|
|||||||
+2
-2
@@ -39,13 +39,13 @@
|
|||||||
}());
|
}());
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
window.__SHINE_BUILD_HASH__ = '20261013003000';
|
window.__SHINE_BUILD_HASH__ = '20261013020000';
|
||||||
window.__SHINE_CLIENT_VERSION__ = '1.2.10';
|
window.__SHINE_CLIENT_VERSION__ = '1.2.10';
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
(function attachStylesWithBuildHash() {
|
(function attachStylesWithBuildHash() {
|
||||||
const v = encodeURIComponent(window.__SHINE_BUILD_HASH__ || 'dev');
|
const v = encodeURIComponent(window.__SHINE_BUILD_HASH__ || 'dev');
|
||||||
const cssFiles = ['./styles/main.css', './styles/layout.css', './styles/app-shell.css', './styles/buttons-white.css', './styles/components/topbar.css', './styles/components/dropdown-menu.css', './styles/components/primitives.css', './styles/components/tabs.css', './styles/components/chips.css', './styles/components/nav-list.css', './styles/components/palette-editor.css', './styles/components/avatar.css', './styles/components/modal.css', './styles/components/person-note.css', './styles/components/compose.css', './styles/components/attachments.css', './styles/components/media-viewer.css', './styles/components/channel-editor.css', './styles/components/emoji-picker.css', './styles/components/call-ui.css', './styles/components/scroll-to-bottom.css', './styles/components/overflow-dots.css', './styles/components/toolbar.css', './styles/features/preauth.css', './styles/features/messages.css', './styles/features/chat.css', './styles/features/channels-common.css', './styles/features/channels-list.css', './styles/features/channel.css', './styles/features/channel-thread.css', './styles/features/notifications.css', './styles/features/network.css', './styles/features/profile.css', './styles/features/profile-page.css', './styles/features/settings.css', './styles/features/devices.css', './styles/features/developer-tools.css', './styles/network-graph.css'];
|
const cssFiles = ['./styles/main.css', './styles/layout.css', './styles/app-shell.css', './styles/buttons-white.css', './styles/components/topbar.css', './styles/components/dropdown-menu.css', './styles/components/primitives.css', './styles/components/feedback.css', './styles/components/tabs.css', './styles/components/chips.css', './styles/components/nav-list.css', './styles/components/palette-editor.css', './styles/components/avatar.css', './styles/components/modal.css', './styles/components/person-note.css', './styles/components/person-row.css', './styles/components/compose.css', './styles/components/attachments.css', './styles/components/media-viewer.css', './styles/components/channel-editor.css', './styles/components/emoji-picker.css', './styles/components/call-ui.css', './styles/components/scroll-to-bottom.css', './styles/components/overflow-dots.css', './styles/components/toolbar.css', './styles/features/preauth.css', './styles/features/messages.css', './styles/features/chat.css', './styles/features/channels-common.css', './styles/features/channels-list.css', './styles/features/channel.css', './styles/features/channel-thread.css', './styles/features/notifications.css', './styles/features/network.css', './styles/features/profile.css', './styles/features/profile-page.css', './styles/features/settings.css', './styles/features/devices.css', './styles/features/developer-tools.css', './styles/network-graph.css'];
|
||||||
// Стили, добавленные скриптом, браузер не ждёт перед первой отрисовкой: без этого
|
// Стили, добавленные скриптом, браузер не ждёт перед первой отрисовкой: без этого
|
||||||
// на долю секунды виден экран без CSS (логотип 640×640), а потом он «прыгает» на место.
|
// на долю секунды виден экран без CSS (логотип 640×640), а потом он «прыгает» на место.
|
||||||
const root = document.documentElement;
|
const root = document.documentElement;
|
||||||
|
|||||||
+2
-2
@@ -102,7 +102,7 @@ import * as solanaUsersInitView from './pages/solana-users-init-view.js';
|
|||||||
import * as solanaRpcCheckView from './pages/solana-rpc-check-view.js';
|
import * as solanaRpcCheckView from './pages/solana-rpc-check-view.js';
|
||||||
import * as messagesList from './pages/messages-list.js?v=202609260900';
|
import * as messagesList from './pages/messages-list.js?v=202609260900';
|
||||||
import * as contactSearchView from './pages/contact-search-view.js';
|
import * as contactSearchView from './pages/contact-search-view.js';
|
||||||
import * as chatView from './pages/chat-view.js?v=202609260900';
|
import * as chatView from './pages/chat-view.js?v=202610130200';
|
||||||
import * as chatMediaView from './pages/chat-media-view.js';
|
import * as chatMediaView from './pages/chat-media-view.js';
|
||||||
import { isDmChatMuted } from './services/dm-chat-prefs.js';
|
import { isDmChatMuted } from './services/dm-chat-prefs.js';
|
||||||
import * as userProfileView from './pages/user-profile-view.js';
|
import * as userProfileView from './pages/user-profile-view.js';
|
||||||
@@ -116,7 +116,7 @@ import * as channelDonateView from './pages/channel-donate-view.js';
|
|||||||
import * as channelThreadView from './pages/channel-thread-view.js';
|
import * as channelThreadView from './pages/channel-thread-view.js';
|
||||||
import * as addChannelView from './pages/add-channel-view.js';
|
import * as addChannelView from './pages/add-channel-view.js';
|
||||||
import * as addPersonalPublicChatView from './pages/add-personal-public-chat-view.js';
|
import * as addPersonalPublicChatView from './pages/add-personal-public-chat-view.js';
|
||||||
import * as networkView from './pages/network-view.js?v=202609260900';
|
import * as networkView from './pages/network-view.js?v=202610130200';
|
||||||
import * as notificationsView from './pages/notifications-view.js?v=202609260900';
|
import * as notificationsView from './pages/notifications-view.js?v=202609260900';
|
||||||
|
|
||||||
const CONVERSATION_CLEAR_NOTICE_TEXT = 'История переписки очищена с этого места';
|
const CONVERSATION_CLEAR_NOTICE_TEXT = 'История переписки очищена с этого места';
|
||||||
|
|||||||
@@ -0,0 +1,71 @@
|
|||||||
|
// Общие состояния экрана: загрузка, «пусто» и ошибка – один вид на всё приложение.
|
||||||
|
// Индикатор загрузки появляется с задержкой (CSS): если данные пришли быстро, его не видно
|
||||||
|
// вовсе, и экран не мелькает.
|
||||||
|
import { iconHtml } from './ui-icon.js';
|
||||||
|
|
||||||
|
export function createSpinner({ size = 'md', label = 'Загрузка' } = {}) {
|
||||||
|
const el = document.createElement('span');
|
||||||
|
el.className = `spinner spinner--${size}`;
|
||||||
|
el.setAttribute('role', 'status');
|
||||||
|
el.setAttribute('aria-label', label);
|
||||||
|
return el;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function createLoadingState({ label = 'Загрузка', delayMs = 350, className = '' } = {}) {
|
||||||
|
const el = document.createElement('div');
|
||||||
|
el.className = `loading-state${className ? ` ${className}` : ''}`;
|
||||||
|
el.style.setProperty('--loading-delay', `${Math.max(0, Number(delayMs) || 0)}ms`);
|
||||||
|
el.append(createSpinner({ label }));
|
||||||
|
return el;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Сообщение вместо содержимого: пусто или ошибка, с необязательным действием.
|
||||||
|
* @param {{ kind?: 'empty'|'error', icon?: string, title?: string, text?: string,
|
||||||
|
* actionLabel?: string, onAction?: Function, className?: string }} opts
|
||||||
|
*/
|
||||||
|
export function createStateMessage({
|
||||||
|
kind = 'empty', icon = '', title = '', text = '', actionLabel = '', onAction = null, className = '',
|
||||||
|
} = {}) {
|
||||||
|
const el = document.createElement('div');
|
||||||
|
el.className = `state-message state-message--${kind}${className ? ` ${className}` : ''}`;
|
||||||
|
if (kind === 'error') el.setAttribute('role', 'alert');
|
||||||
|
if (icon) {
|
||||||
|
const badge = document.createElement('span');
|
||||||
|
badge.className = 'state-message__icon';
|
||||||
|
badge.innerHTML = iconHtml(icon);
|
||||||
|
el.append(badge);
|
||||||
|
}
|
||||||
|
if (title) {
|
||||||
|
const heading = document.createElement('p');
|
||||||
|
heading.className = 'state-message__title';
|
||||||
|
heading.textContent = title;
|
||||||
|
el.append(heading);
|
||||||
|
}
|
||||||
|
if (text) {
|
||||||
|
const body = document.createElement('p');
|
||||||
|
body.className = 'state-message__text';
|
||||||
|
body.textContent = text;
|
||||||
|
el.append(body);
|
||||||
|
}
|
||||||
|
if (actionLabel && typeof onAction === 'function') {
|
||||||
|
const button = document.createElement('button');
|
||||||
|
button.type = 'button';
|
||||||
|
button.className = `${kind === 'error' ? 'secondary-btn' : 'primary-btn'} state-message__action`;
|
||||||
|
button.textContent = actionLabel;
|
||||||
|
button.addEventListener('click', onAction);
|
||||||
|
el.append(button);
|
||||||
|
}
|
||||||
|
return el;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function createErrorState({
|
||||||
|
title = 'Не удалось загрузить',
|
||||||
|
text = 'Проверьте соединение и попробуйте ещё раз.',
|
||||||
|
onRetry = null,
|
||||||
|
className = '',
|
||||||
|
} = {}) {
|
||||||
|
return createStateMessage({
|
||||||
|
kind: 'error', icon: 'alert', title, text, actionLabel: onRetry ? 'Повторить' : '', onAction: onRetry, className,
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
// Строка человека в списках (связи, поиск людей, списки профиля): аватар, имя, строка под
|
||||||
|
// ним и действия справа. Вид совпадает со строками списка чатов.
|
||||||
|
import { renderUserAvatar } from './avatar-image.js';
|
||||||
|
import { iconHtml } from './ui-icon.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {Object} opts
|
||||||
|
* @param {string} opts.login
|
||||||
|
* @param {string} [opts.name] – как показывать (по умолчанию логин)
|
||||||
|
* @param {string} [opts.firstName] [opts.lastName] – для инициалов
|
||||||
|
* @param {Object|null} [opts.avatar]
|
||||||
|
* @param {string} [opts.sub] – строка под именем
|
||||||
|
* @param {string} [opts.note] – личная заметка (третья строка, курсивом)
|
||||||
|
* @param {string} [opts.markColor] – метка заметки: green/yellow/red/blue/violet, 'note' – без цвета, '' – нет
|
||||||
|
* @param {'close'|'shining'|''} [opts.ring] – цветное кольцо вокруг аватара
|
||||||
|
* @param {boolean} [opts.official]
|
||||||
|
* @param {string} [opts.tag] – короткая пометка цветом в начале второй строки («ждёт ответа»)
|
||||||
|
* @param {Function} [opts.onClick]
|
||||||
|
* @param {Array<{icon:string,label:string,onClick:Function}>} [opts.actions]
|
||||||
|
*/
|
||||||
|
export function createPersonRow({
|
||||||
|
login, name = '', firstName = '', lastName = '', avatar = null, sub = '', note = '', markColor = '',
|
||||||
|
ring = '', official = false, tag = '', onClick = null, actions = [],
|
||||||
|
} = {}) {
|
||||||
|
const row = document.createElement('div');
|
||||||
|
row.className = `person-row${ring ? ` person-row--${ring}` : ''}`;
|
||||||
|
row.dataset.login = String(login || '');
|
||||||
|
|
||||||
|
const main = document.createElement('button');
|
||||||
|
main.type = 'button';
|
||||||
|
main.className = 'person-row__main';
|
||||||
|
const avatarWrap = document.createElement('span');
|
||||||
|
avatarWrap.className = 'person-row__avatar';
|
||||||
|
avatarWrap.append(renderUserAvatar({ login, firstName, lastName, avatar, size: 'md', official }));
|
||||||
|
if (markColor) {
|
||||||
|
// Метка заметки – та же цветная точка, что на карте связей; 'note' – заметка без цвета.
|
||||||
|
const mark = document.createElement('span');
|
||||||
|
mark.className = 'person-row__mark';
|
||||||
|
mark.dataset.mark = markColor;
|
||||||
|
mark.setAttribute('aria-hidden', 'true');
|
||||||
|
avatarWrap.append(mark);
|
||||||
|
}
|
||||||
|
const text = document.createElement('span');
|
||||||
|
text.className = 'person-row__text';
|
||||||
|
const title = document.createElement('span');
|
||||||
|
title.className = 'person-row__name';
|
||||||
|
const titleText = document.createElement('span');
|
||||||
|
titleText.className = 'person-row__name-text';
|
||||||
|
titleText.textContent = name || login;
|
||||||
|
title.append(titleText);
|
||||||
|
text.append(title);
|
||||||
|
if (sub || tag) {
|
||||||
|
// Пометка («ждёт ответа») – в начале второй строки, чтобы не съедать место у имени.
|
||||||
|
const subEl = document.createElement('span');
|
||||||
|
subEl.className = 'person-row__sub';
|
||||||
|
if (tag) {
|
||||||
|
const tagEl = document.createElement('span');
|
||||||
|
tagEl.className = 'person-row__tag';
|
||||||
|
tagEl.textContent = tag;
|
||||||
|
subEl.append(tagEl);
|
||||||
|
if (sub) subEl.append(' · ');
|
||||||
|
}
|
||||||
|
if (sub) subEl.append(sub);
|
||||||
|
text.append(subEl);
|
||||||
|
}
|
||||||
|
if (note) {
|
||||||
|
const noteEl = document.createElement('span');
|
||||||
|
noteEl.className = 'person-row__note';
|
||||||
|
noteEl.textContent = note;
|
||||||
|
text.append(noteEl);
|
||||||
|
}
|
||||||
|
main.append(avatarWrap, text);
|
||||||
|
if (typeof onClick === 'function') main.addEventListener('click', onClick);
|
||||||
|
row.append(main);
|
||||||
|
|
||||||
|
for (const action of actions) {
|
||||||
|
if (!action) continue;
|
||||||
|
const button = document.createElement('button');
|
||||||
|
button.type = 'button';
|
||||||
|
button.className = 'icon-btn person-row__action';
|
||||||
|
button.innerHTML = iconHtml(action.icon);
|
||||||
|
button.setAttribute('aria-label', action.label);
|
||||||
|
button.title = action.label;
|
||||||
|
button.addEventListener('click', (event) => action.onClick?.(event, button));
|
||||||
|
row.append(button);
|
||||||
|
}
|
||||||
|
return row;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Заголовок группы в списке («Друзья · 58», «А»).
|
||||||
|
export function createListSection(text) {
|
||||||
|
const el = document.createElement('div');
|
||||||
|
el.className = 'person-list-section';
|
||||||
|
el.textContent = text;
|
||||||
|
return el;
|
||||||
|
}
|
||||||
@@ -116,3 +116,67 @@ export function createTopBar({
|
|||||||
|
|
||||||
return topbar;
|
return topbar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Шапка-строка поиска (поиск по переписке, по связям и т. п.): «назад» закрывает поиск,
|
||||||
|
* крестик очищает поле, Enter – onSubmit, Escape – onClose.
|
||||||
|
* trailing – узел справа внутри поля (например, счётчик «3 из 12»).
|
||||||
|
*/
|
||||||
|
export function createSearchTopBar({
|
||||||
|
placeholder = 'Поиск',
|
||||||
|
value = '',
|
||||||
|
onInput = null,
|
||||||
|
onSubmit = null,
|
||||||
|
onClose = null,
|
||||||
|
trailing = null,
|
||||||
|
actions = [],
|
||||||
|
className = '',
|
||||||
|
} = {}) {
|
||||||
|
const field = document.createElement('label');
|
||||||
|
field.className = 'topbar-search';
|
||||||
|
field.innerHTML = `
|
||||||
|
<span class="topbar-search__icon" aria-hidden="true">${iconHtml('search')}</span>
|
||||||
|
<input class="topbar-search__input" type="search" autocomplete="off" autocapitalize="off" spellcheck="false" enterkeyhint="search" />
|
||||||
|
`;
|
||||||
|
const input = field.querySelector('input');
|
||||||
|
input.placeholder = placeholder;
|
||||||
|
input.setAttribute('aria-label', placeholder);
|
||||||
|
input.value = value;
|
||||||
|
if (trailing instanceof Node) field.append(trailing);
|
||||||
|
const clear = document.createElement('button');
|
||||||
|
clear.type = 'button';
|
||||||
|
clear.className = 'topbar-search__clear';
|
||||||
|
clear.innerHTML = iconHtml('close');
|
||||||
|
clear.setAttribute('aria-label', 'Очистить');
|
||||||
|
clear.title = 'Очистить';
|
||||||
|
clear.hidden = !value;
|
||||||
|
clear.addEventListener('click', (event) => {
|
||||||
|
event.preventDefault();
|
||||||
|
input.value = '';
|
||||||
|
clear.hidden = true;
|
||||||
|
input.focus();
|
||||||
|
onInput?.('');
|
||||||
|
});
|
||||||
|
field.append(clear);
|
||||||
|
input.addEventListener('input', () => {
|
||||||
|
clear.hidden = !input.value;
|
||||||
|
onInput?.(input.value);
|
||||||
|
});
|
||||||
|
input.addEventListener('keydown', (event) => {
|
||||||
|
if (event.key === 'Enter') {
|
||||||
|
event.preventDefault();
|
||||||
|
onSubmit?.(input.value, event);
|
||||||
|
} else if (event.key === 'Escape') {
|
||||||
|
event.preventDefault();
|
||||||
|
onClose?.();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const topbar = createTopBar({
|
||||||
|
center: field,
|
||||||
|
className: `topbar--search${className ? ` ${className}` : ''}`,
|
||||||
|
back: { onClick: () => onClose?.(), ariaLabel: 'Закрыть поиск', title: 'Закрыть поиск' },
|
||||||
|
actions,
|
||||||
|
});
|
||||||
|
topbar.searchInput = input;
|
||||||
|
return topbar;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { appendShineMessageLinks } from '../services/shine-message-links.js';
|
import { appendShineMessageLinks } from '../services/shine-message-links.js';
|
||||||
import { iconHtml } from '../components/ui-icon.js';
|
import { iconHtml } from '../components/ui-icon.js';
|
||||||
import { createTopBar } from '../components/topbar.js';
|
import { createSearchTopBar, createTopBar } from '../components/topbar.js';
|
||||||
import { createDropdownMenu } from '../components/dropdown-menu.js';
|
import { createDropdownMenu } from '../components/dropdown-menu.js';
|
||||||
import { renderUserAvatar } from '../components/avatar-image.js';
|
import { renderUserAvatar } from '../components/avatar-image.js';
|
||||||
import { createOverflowDots } from '../components/overflow-dots.js';
|
import { createOverflowDots } from '../components/overflow-dots.js';
|
||||||
@@ -1763,25 +1763,33 @@ export function render({ navigate, route, chrome }) {
|
|||||||
|
|
||||||
function openChatSearch() {
|
function openChatSearch() {
|
||||||
if (search) return;
|
if (search) return;
|
||||||
const field = document.createElement('label');
|
const counter = document.createElement('span');
|
||||||
field.className = 'chat-search-field';
|
counter.className = 'topbar-search__counter';
|
||||||
field.innerHTML = `
|
counter.setAttribute('aria-live', 'polite');
|
||||||
<span class="chat-search-field__icon" aria-hidden="true">${iconHtml('search')}</span>
|
const searchBar = createSearchTopBar({
|
||||||
<input class="chat-search-field__input" type="search" placeholder="Поиск в переписке" autocomplete="off" enterkeyhint="search" aria-label="Поиск в переписке" />
|
placeholder: 'Поиск в переписке',
|
||||||
<span class="chat-search-field__counter" aria-live="polite"></span>
|
trailing: counter,
|
||||||
`;
|
onClose: () => closeChatSearch(),
|
||||||
const input = field.querySelector('input');
|
onInput: () => {
|
||||||
const counter = field.querySelector('.chat-search-field__counter');
|
window.clearTimeout(searchDebounce);
|
||||||
const searchBar = createTopBar({
|
searchDebounce = window.setTimeout(() => runSearch(), 180);
|
||||||
center: field,
|
},
|
||||||
className: 'topbar--chat-search',
|
onSubmit: (value, event) => {
|
||||||
back: { onClick: () => closeChatSearch(), ariaLabel: 'Закрыть поиск', title: 'Закрыть поиск' },
|
window.clearTimeout(searchDebounce);
|
||||||
|
if (!search.hits.length || normalizeSearchText(value).trim() !== search.lastQuery) {
|
||||||
|
runSearch();
|
||||||
|
search.lastQuery = normalizeSearchText(value).trim();
|
||||||
|
} else {
|
||||||
|
stepSearch(event.shiftKey ? 1 : -1);
|
||||||
|
}
|
||||||
|
},
|
||||||
actions: [
|
actions: [
|
||||||
{ id: 'date', icon: 'calendar', title: 'Перейти к дате', ariaLabel: 'Перейти к дате', className: 'chat-header-icon-btn', onClick: () => openDateJump() },
|
{ id: 'date', icon: 'calendar', title: 'Перейти к дате', ariaLabel: 'Перейти к дате', className: 'chat-header-icon-btn', onClick: () => openDateJump() },
|
||||||
{ id: 'older', icon: 'chevron-up', title: 'Раньше', ariaLabel: 'Предыдущее совпадение', className: 'chat-header-icon-btn', onClick: () => stepSearch(-1) },
|
{ id: 'older', icon: 'chevron-up', title: 'Раньше', ariaLabel: 'Предыдущее совпадение', className: 'chat-header-icon-btn', onClick: () => stepSearch(-1) },
|
||||||
{ id: 'newer', icon: 'chevron-down', title: 'Позже', ariaLabel: 'Следующее совпадение', className: 'chat-header-icon-btn', onClick: () => stepSearch(1) },
|
{ id: 'newer', icon: 'chevron-down', title: 'Позже', ariaLabel: 'Следующее совпадение', className: 'chat-header-icon-btn', onClick: () => stepSearch(1) },
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
const input = searchBar.searchInput;
|
||||||
search = {
|
search = {
|
||||||
input,
|
input,
|
||||||
counter,
|
counter,
|
||||||
@@ -1791,25 +1799,6 @@ export function render({ navigate, route, chrome }) {
|
|||||||
index: -1,
|
index: -1,
|
||||||
layer: openHistoryLayer(() => closeChatSearch({ fromHistory: true })),
|
layer: openHistoryLayer(() => closeChatSearch({ fromHistory: true })),
|
||||||
};
|
};
|
||||||
input.addEventListener('input', () => {
|
|
||||||
window.clearTimeout(searchDebounce);
|
|
||||||
searchDebounce = window.setTimeout(() => runSearch(), 180);
|
|
||||||
});
|
|
||||||
input.addEventListener('keydown', (event) => {
|
|
||||||
if (event.key === 'Enter') {
|
|
||||||
event.preventDefault();
|
|
||||||
window.clearTimeout(searchDebounce);
|
|
||||||
if (!search.hits.length || normalizeSearchText(input.value).trim() !== search.lastQuery) {
|
|
||||||
runSearch();
|
|
||||||
search.lastQuery = normalizeSearchText(input.value).trim();
|
|
||||||
} else {
|
|
||||||
stepSearch(event.shiftKey ? 1 : -1);
|
|
||||||
}
|
|
||||||
} else if (event.key === 'Escape') {
|
|
||||||
event.preventDefault();
|
|
||||||
closeChatSearch();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
chrome?.setTopbar(searchBar);
|
chrome?.setTopbar(searchBar);
|
||||||
syncSearchControls();
|
syncSearchControls();
|
||||||
window.requestAnimationFrame(() => input.focus());
|
window.requestAnimationFrame(() => input.focus());
|
||||||
|
|||||||
+719
-328
File diff suppressed because it is too large
Load Diff
@@ -35,7 +35,7 @@ function personFromMark(login, mark) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {{centerLogin:string, centerMark:object|null, relations:Array}} graphModel
|
* @param {{centerLogin:string, centerMark:object|null, relations:Array}} graphModel
|
||||||
* @returns {{ center: object, peers: Array<{ person: object, relationType: string, mutual: boolean }> }}
|
* @returns {{ center: object, peers: Array<{ person: object, relationType: string, mutual: boolean, direction: string }> }}
|
||||||
*/
|
*/
|
||||||
export function peopleFromGraphModel(graphModel) {
|
export function peopleFromGraphModel(graphModel) {
|
||||||
const centerLogin = normLogin(graphModel?.centerLogin);
|
const centerLogin = normLogin(graphModel?.centerLogin);
|
||||||
@@ -47,11 +47,15 @@ export function peopleFromGraphModel(graphModel) {
|
|||||||
const key = normKey(login);
|
const key = normKey(login);
|
||||||
if (!login || seen.has(key)) continue;
|
if (!login || seen.has(key)) continue;
|
||||||
seen.add(key);
|
seen.add(key);
|
||||||
|
const forward = Boolean(relation?.forward);
|
||||||
|
const backward = Boolean(relation?.backward);
|
||||||
peers.push({
|
peers.push({
|
||||||
person: personFromMark(login, relation?.mark || null),
|
person: personFromMark(login, relation?.mark || null),
|
||||||
relationType: relationTypeFromRelation(relation),
|
relationType: relationTypeFromRelation(relation),
|
||||||
// Пунктир на карте – связь только с одной стороны.
|
// Пунктир на карте – связь только с одной стороны.
|
||||||
mutual: Boolean(relation?.forward && relation?.backward),
|
mutual: forward && backward,
|
||||||
|
// Со стороны центра: взаимно, только центр (out) или только этот человек (in – «ждёт ответа»).
|
||||||
|
direction: forward && backward ? 'mutual' : (forward ? 'out' : 'in'),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return { center, peers };
|
return { center, peers };
|
||||||
|
|||||||
@@ -1368,8 +1368,14 @@ export function createGraphCanvas({ stage, onSelect, onNodeMoved, getInsets } =
|
|||||||
const w = node.labelWidth + padX * 2;
|
const w = node.labelWidth + padX * 2;
|
||||||
const p = toScreen(node.x, node.y);
|
const p = toScreen(node.x, node.y);
|
||||||
const x = p.x - w / 2;
|
const x = p.x - w / 2;
|
||||||
const y = p.y + node.r * zoom + (node.isFocus ? 5 : 3);
|
const gap = node.isFocus ? 5 : 3;
|
||||||
if (!fits(x - 2, y - 1, w + 4, h + 2) && !(node.isFocus || node.id === selectedId)) continue;
|
// Под точкой, а если там занято – над ней.
|
||||||
|
let y = p.y + node.r * zoom + gap;
|
||||||
|
if (!fits(x - 2, y - 1, w + 4, h + 2)) {
|
||||||
|
const above = p.y - node.r * zoom - gap - h;
|
||||||
|
if (fits(x - 2, above - 1, w + 4, h + 2)) y = above;
|
||||||
|
else if (!(node.isFocus || node.id === selectedId)) continue;
|
||||||
|
}
|
||||||
labelsDrawn += 1;
|
labelsDrawn += 1;
|
||||||
ctx.globalAlpha = Math.max(nodeAlpha(node), node.id === selectedId ? 1 : 0);
|
ctx.globalAlpha = Math.max(nodeAlpha(node), node.id === selectedId ? 1 : 0);
|
||||||
ctx.fillStyle = rgba(colors.background, colors.dark ? 0.82 : 0.88);
|
ctx.fillStyle = rgba(colors.background, colors.dark ? 0.82 : 0.88);
|
||||||
@@ -1407,6 +1413,13 @@ export function createGraphCanvas({ stage, onSelect, onNodeMoved, getInsets } =
|
|||||||
maxY = Math.max(maxY, node.ty + r + 22);
|
maxY = Math.max(maxY, node.ty + r + 22);
|
||||||
});
|
});
|
||||||
if (!Number.isFinite(minX)) return { minX: -100, minY: -100, maxX: 100, maxY: 100 };
|
if (!Number.isFinite(minX)) return { minX: -100, minY: -100, maxX: 100, maxY: 100 };
|
||||||
|
// Внешнее кольцо групп с подписью сверху тоже должно попасть в кадр.
|
||||||
|
const anchor = nodes.get(focusId);
|
||||||
|
if (guides?.kind === 'rings' && guides.items.length && anchor) {
|
||||||
|
const r = guides.items[guides.items.length - 1].to + 32;
|
||||||
|
minY = Math.min(minY, anchor.ty - r * guides.stretch.y - 16);
|
||||||
|
maxY = Math.max(maxY, anchor.ty + r * guides.stretch.y);
|
||||||
|
}
|
||||||
return { minX, minY, maxX, maxY };
|
return { minX, minY, maxX, maxY };
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1903,6 +1916,8 @@ export function createGraphCanvas({ stage, onSelect, onNodeMoved, getInsets } =
|
|||||||
select,
|
select,
|
||||||
// Найти человека на карте: выбрать и подвести камеру поближе.
|
// Найти человека на карте: выбрать и подвести камеру поближе.
|
||||||
reveal: (id) => { if (nodes.has(id)) { select(id); revealNode(id, { minZoom: 1 }); } },
|
reveal: (id) => { if (nodes.has(id)) { select(id); revealNode(id, { minZoom: 1 }); } },
|
||||||
|
// Сдвинуть карту, только если точка ушла под панели (карточку, нижнее меню).
|
||||||
|
ensureVisible: (id) => revealNode(id, { minZoom: 0 }),
|
||||||
fit: (animate = true) => fitCamera({ animate }),
|
fit: (animate = true) => fitCamera({ animate }),
|
||||||
zoomBy,
|
zoomBy,
|
||||||
// Сколько точек сейчас видно после фильтра (без центра).
|
// Сколько точек сейчас видно после фильтра (без центра).
|
||||||
|
|||||||
@@ -75,3 +75,18 @@ export function setLayoutMode(mode) {
|
|||||||
view.mode = mode === 'groups' ? 'groups' : 'rings';
|
view.mode = mode === 'groups' ? 'groups' : 'rings';
|
||||||
writeJson(VIEW_PREFIX + owner, view);
|
writeJson(VIEW_PREFIX + owner, view);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Прочие настройки экрана на этом устройстве: карта или список, порядок списка.
|
||||||
|
export function getViewSetting(key, fallback) {
|
||||||
|
const owner = ownerLogin();
|
||||||
|
const value = readJson(VIEW_PREFIX + owner)[key];
|
||||||
|
return value === undefined ? fallback : value;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function setViewSetting(key, value) {
|
||||||
|
const owner = ownerLogin();
|
||||||
|
if (!owner) return;
|
||||||
|
const view = readJson(VIEW_PREFIX + owner);
|
||||||
|
view[key] = value;
|
||||||
|
writeJson(VIEW_PREFIX + owner, view);
|
||||||
|
}
|
||||||
|
|||||||
@@ -54,3 +54,18 @@
|
|||||||
-webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
|
-webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
|
||||||
mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
|
mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Число людей/элементов в чипе («Друзья 58»): тише подписи. */
|
||||||
|
.chip__count {
|
||||||
|
color: var(--text-secondary);
|
||||||
|
font-weight: var(--weight-medium);
|
||||||
|
font-variant-numeric: tabular-nums;
|
||||||
|
}
|
||||||
|
.chip__count:empty { display: none; }
|
||||||
|
.chip.is-active .chip__count { color: var(--text-primary); }
|
||||||
|
.chip[hidden] { display: none; }
|
||||||
|
|
||||||
|
/* Чип-переключатель (вкл/выкл, а не выбор одного из ряда): со значком и пунктирной рамкой. */
|
||||||
|
.chip--toggle { border-style: dashed; }
|
||||||
|
.chip--toggle[aria-pressed='true'] { border-style: solid; color: var(--accent); }
|
||||||
|
.chip--toggle svg { flex: 0 0 auto; }
|
||||||
|
|||||||
@@ -0,0 +1,90 @@
|
|||||||
|
/* Общие состояния экрана (js/components/feedback.js): спиннер, загрузка с задержкой,
|
||||||
|
* «пусто» и ошибка с «Повторить». */
|
||||||
|
|
||||||
|
.spinner {
|
||||||
|
display: inline-block;
|
||||||
|
flex: 0 0 auto;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 2px solid color-mix(in srgb, var(--text-secondary) 26%, transparent);
|
||||||
|
border-top-color: var(--accent);
|
||||||
|
animation: spinner-spin 0.8s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
.spinner--sm { width: 16px; height: 16px; }
|
||||||
|
.spinner--lg { width: 28px; height: 28px; border-width: 2.5px; }
|
||||||
|
|
||||||
|
@keyframes spinner-spin {
|
||||||
|
to { transform: rotate(360deg); }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Появляется только если ждать дольше --loading-delay: быстрые загрузки не мелькают. */
|
||||||
|
.loading-state {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: var(--space-6) 0;
|
||||||
|
opacity: 0;
|
||||||
|
animation: loading-state-in 180ms ease forwards;
|
||||||
|
animation-delay: var(--loading-delay, 350ms);
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes loading-state-in {
|
||||||
|
to { opacity: 1; }
|
||||||
|
}
|
||||||
|
|
||||||
|
.state-message {
|
||||||
|
display: grid;
|
||||||
|
justify-items: center;
|
||||||
|
gap: var(--space-2);
|
||||||
|
max-width: 340px;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: var(--space-6) var(--space-4);
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.state-message__icon {
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
width: 52px;
|
||||||
|
height: 52px;
|
||||||
|
margin-bottom: var(--space-1);
|
||||||
|
border-radius: 50%;
|
||||||
|
color: var(--text-secondary);
|
||||||
|
background: var(--surface-raised);
|
||||||
|
}
|
||||||
|
|
||||||
|
.state-message__icon svg {
|
||||||
|
width: 26px;
|
||||||
|
height: 26px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.state-message--error .state-message__icon {
|
||||||
|
color: var(--danger);
|
||||||
|
background: color-mix(in srgb, var(--danger) 13%, transparent);
|
||||||
|
}
|
||||||
|
|
||||||
|
.state-message__title {
|
||||||
|
margin: 0;
|
||||||
|
color: var(--text-primary);
|
||||||
|
font-size: var(--text-md);
|
||||||
|
font-weight: var(--weight-bold);
|
||||||
|
}
|
||||||
|
|
||||||
|
.state-message__text {
|
||||||
|
margin: 0;
|
||||||
|
color: var(--text-secondary);
|
||||||
|
font-size: var(--text-sm);
|
||||||
|
line-height: var(--leading-sm, 1.45);
|
||||||
|
}
|
||||||
|
|
||||||
|
.state-message__action {
|
||||||
|
margin-top: var(--space-2);
|
||||||
|
min-width: 160px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-reduced-motion: reduce) {
|
||||||
|
.spinner { animation-duration: 1.6s; }
|
||||||
|
.loading-state { animation: none; opacity: 1; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,170 @@
|
|||||||
|
/* Строка человека в списках (js/components/person-row.js) – как строка списка чатов:
|
||||||
|
* аватар 48 px, имя, строка под ним, разделитель от текста, действия справа. */
|
||||||
|
|
||||||
|
.person-row {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
min-height: 68px;
|
||||||
|
background: linear-gradient(var(--border-subtle), var(--border-subtle)) right bottom / calc(100% - 64px) 1px no-repeat;
|
||||||
|
/* Строки за экраном не отрисовываются – список на сотни людей остаётся лёгким. */
|
||||||
|
content-visibility: auto;
|
||||||
|
contain-intrinsic-size: auto 68px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.person-row:last-child {
|
||||||
|
background: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.person-row__main {
|
||||||
|
flex: 1 1 auto;
|
||||||
|
min-width: 0;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 12px;
|
||||||
|
min-height: 68px;
|
||||||
|
/* Слева запас под кольцо аватара: content-visibility обрезает всё, что за краем строки. */
|
||||||
|
padding: 10px 0 10px 4px;
|
||||||
|
border: 0;
|
||||||
|
border-radius: 0;
|
||||||
|
background: transparent;
|
||||||
|
color: var(--text-primary);
|
||||||
|
font: inherit;
|
||||||
|
text-align: left;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background-color var(--duration-fast) ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.person-row__main:hover {
|
||||||
|
background-color: color-mix(in srgb, var(--surface) 66%, transparent);
|
||||||
|
}
|
||||||
|
|
||||||
|
.person-row__main:active {
|
||||||
|
background-color: var(--surface-selected);
|
||||||
|
}
|
||||||
|
|
||||||
|
.person-row__main:focus-visible {
|
||||||
|
outline: 2px solid var(--focus-ring);
|
||||||
|
outline-offset: -2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.person-row__avatar {
|
||||||
|
position: relative;
|
||||||
|
flex: 0 0 48px;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
width: 48px;
|
||||||
|
height: 48px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.person-row__avatar .avatar.avatar-md {
|
||||||
|
width: 48px;
|
||||||
|
height: 48px;
|
||||||
|
min-width: 48px;
|
||||||
|
min-height: 48px;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Близкие и сияющие – цветное кольцо, как на карте связей и в чатах. */
|
||||||
|
.person-row--close .person-row__avatar .avatar {
|
||||||
|
border-radius: 50%;
|
||||||
|
box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--rel-family);
|
||||||
|
}
|
||||||
|
|
||||||
|
.person-row--shining .person-row__avatar .avatar {
|
||||||
|
border-radius: 50%;
|
||||||
|
box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--rel-shining);
|
||||||
|
}
|
||||||
|
|
||||||
|
.person-row__mark {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
z-index: 5;
|
||||||
|
width: 12px;
|
||||||
|
height: 12px;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 2px solid var(--background);
|
||||||
|
background: var(--note-mark-green);
|
||||||
|
}
|
||||||
|
|
||||||
|
.person-row__mark[data-mark='yellow'] { background: var(--note-mark-yellow); }
|
||||||
|
.person-row__mark[data-mark='red'] { background: var(--note-mark-red); }
|
||||||
|
.person-row__mark[data-mark='blue'] { background: var(--note-mark-blue); }
|
||||||
|
.person-row__mark[data-mark='violet'] { background: var(--note-mark-violet); }
|
||||||
|
.person-row__mark[data-mark='note'] {
|
||||||
|
background: var(--background);
|
||||||
|
box-shadow: inset 0 0 0 2px var(--text-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.person-row__text {
|
||||||
|
flex: 1 1 auto;
|
||||||
|
min-width: 0;
|
||||||
|
display: grid;
|
||||||
|
gap: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.person-row__name {
|
||||||
|
display: flex;
|
||||||
|
align-items: baseline;
|
||||||
|
gap: 8px;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.person-row__name-text {
|
||||||
|
min-width: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
font-size: var(--text-md);
|
||||||
|
font-weight: var(--weight-bold);
|
||||||
|
}
|
||||||
|
|
||||||
|
.person-row__tag {
|
||||||
|
color: var(--accent);
|
||||||
|
font-weight: var(--weight-medium);
|
||||||
|
}
|
||||||
|
|
||||||
|
.person-row__sub,
|
||||||
|
.person-row__note {
|
||||||
|
min-width: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
color: var(--text-secondary);
|
||||||
|
font-size: var(--text-sm);
|
||||||
|
}
|
||||||
|
|
||||||
|
.person-row__note {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.person-row__action {
|
||||||
|
flex: 0 0 auto;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
width: 44px;
|
||||||
|
height: 44px;
|
||||||
|
margin-left: 2px;
|
||||||
|
border-radius: 50%;
|
||||||
|
color: var(--text-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.person-row__action:hover {
|
||||||
|
color: var(--accent);
|
||||||
|
background: var(--surface);
|
||||||
|
}
|
||||||
|
|
||||||
|
.person-row__action svg {
|
||||||
|
width: 21px;
|
||||||
|
height: 21px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.person-list-section {
|
||||||
|
padding: var(--space-4) 0 var(--space-1) 4px;
|
||||||
|
color: var(--text-secondary);
|
||||||
|
font-size: var(--text-xs);
|
||||||
|
line-height: var(--leading-xs);
|
||||||
|
font-weight: var(--weight-bold);
|
||||||
|
letter-spacing: 0.02em;
|
||||||
|
}
|
||||||
@@ -26,3 +26,21 @@
|
|||||||
.topbar-identity__text { display: grid; min-width: 0; }
|
.topbar-identity__text { display: grid; min-width: 0; }
|
||||||
.topbar-identity__title { font-size: 1.0625rem; line-height: 1.3; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
.topbar-identity__title { font-size: 1.0625rem; line-height: 1.3; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||||
.topbar-identity__sub { margin-top: 0; color: var(--text-secondary); font-size: .75rem; line-height: 1rem; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
.topbar-identity__sub { margin-top: 0; color: var(--text-secondary); font-size: .75rem; line-height: 1rem; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||||
|
|
||||||
|
/* Шапка-строка поиска (createSearchTopBar): «назад», поле во всю ширину, действия справа. */
|
||||||
|
.topbar--search { grid-template-columns: auto minmax(0, 1fr) auto; }
|
||||||
|
.topbar--search .topbar__center { justify-content: stretch; }
|
||||||
|
.topbar--search .topbar__action { min-width: 38px; padding: 4px; }
|
||||||
|
.topbar-search { display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0; height: 40px; padding: 0 4px 0 12px; border: 1px solid var(--border-control); border-radius: var(--radius-pill); background: var(--background); color: var(--text-secondary); }
|
||||||
|
.topbar-search:focus-within { border-color: var(--accent); }
|
||||||
|
.topbar-search__icon { display: inline-flex; flex: 0 0 auto; }
|
||||||
|
.topbar-search__icon svg { width: 18px; height: 18px; }
|
||||||
|
.topbar-search__input { flex: 1 1 auto; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: var(--text-primary); font: inherit; font-size: 16px; }
|
||||||
|
.topbar-search__input::placeholder { color: color-mix(in srgb, var(--text-secondary) 70%, transparent); }
|
||||||
|
.topbar-search__input::-webkit-search-cancel-button { display: none; }
|
||||||
|
.topbar-search__counter { flex: 0 0 auto; padding-right: 4px; font-size: var(--text-xs); white-space: nowrap; font-variant-numeric: tabular-nums; }
|
||||||
|
.topbar-search__counter.is-empty { color: var(--danger); }
|
||||||
|
.topbar .topbar-search__clear { flex: 0 0 auto; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--text-secondary); cursor: pointer; }
|
||||||
|
.topbar .topbar-search__clear:hover { color: var(--text-primary); background: var(--surface-selected); }
|
||||||
|
.topbar-search__clear svg { width: 16px; height: 16px; }
|
||||||
|
.topbar-search__clear[hidden] { display: none; }
|
||||||
|
|||||||
@@ -1481,40 +1481,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/* ===== Поиск по переписке: строка поиска вместо шапки ===== */
|
/* ===== Поиск по переписке: строка поиска вместо шапки ===== */
|
||||||
.topbar--chat-search { grid-template-columns: auto minmax(0, 1fr) auto; }
|
/* Сама строка поиска – общая (createSearchTopBar, styles/components/topbar.css). */
|
||||||
.topbar--chat-search .topbar__center { justify-content: stretch; }
|
|
||||||
.chat-search-field {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 6px;
|
|
||||||
width: 100%;
|
|
||||||
min-width: 0;
|
|
||||||
height: 40px;
|
|
||||||
padding: 0 10px;
|
|
||||||
border: 1px solid var(--border-control);
|
|
||||||
border-radius: 20px;
|
|
||||||
background: var(--background);
|
|
||||||
color: var(--text-secondary);
|
|
||||||
}
|
|
||||||
.chat-search-field:focus-within { border-color: var(--accent); }
|
|
||||||
.chat-search-field__icon { display: inline-flex; flex: 0 0 auto; }
|
|
||||||
.chat-search-field__icon svg { width: 18px; height: 18px; }
|
|
||||||
.chat-search-field__input {
|
|
||||||
flex: 1 1 auto;
|
|
||||||
min-width: 0;
|
|
||||||
height: 100%;
|
|
||||||
padding: 0;
|
|
||||||
border: 0;
|
|
||||||
outline: 0;
|
|
||||||
background: transparent;
|
|
||||||
color: var(--text-primary);
|
|
||||||
font: inherit;
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
.chat-search-field__input::-webkit-search-cancel-button { display: none; }
|
|
||||||
.chat-search-field__counter { flex: 0 0 auto; font-size: var(--text-xs); white-space: nowrap; font-variant-numeric: tabular-nums; }
|
|
||||||
.chat-search-field__counter.is-empty { color: var(--danger); }
|
|
||||||
.topbar--chat-search .topbar__action { min-width: 38px; padding: 4px; }
|
|
||||||
|
|
||||||
/* Найденные сообщения: текущее выделено рамкой, совпадения в тексте – маркером. */
|
/* Найденные сообщения: текущее выделено рамкой, совпадения в тексте – маркером. */
|
||||||
.dm-messages-log .bubble.is-search-current { box-shadow: 0 0 0 2px var(--accent); }
|
.dm-messages-log .bubble.is-search-current { box-shadow: 0 0 0 2px var(--accent); }
|
||||||
|
|||||||
@@ -1,347 +1,218 @@
|
|||||||
/* Connections/network feature styles layered before network-graph.css. */
|
/* «Связи»: раскладка экрана – карта или список на всю высоту между шапкой и нижним меню,
|
||||||
|
* поверх – чипы фильтров, переключатель «Списком / На карте», состояния. Стили самой карты,
|
||||||
.node-dot img {
|
* карточки человека и масштаба – в styles/network-graph.css. */
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
object-fit: cover;
|
|
||||||
object-position: center;
|
|
||||||
border-radius: 50%;
|
|
||||||
display: block;
|
|
||||||
opacity: 0;
|
|
||||||
transition: opacity 120ms ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.network-board {
|
|
||||||
position: relative;
|
|
||||||
height: 290px;
|
|
||||||
border: 1px solid var(--border-subtle);
|
|
||||||
border-radius: var(--radius-lg);
|
|
||||||
background: radial-gradient(circle at center, color-mix(in srgb, var(--rel-shining) 8%, transparent), color-mix(in srgb, var(--text-primary) 1%, transparent));
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.network-screen {
|
.network-screen {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin: -14px -14px -24px;
|
|
||||||
min-height: calc(100dvh - 74px);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.app-shell--scroll-locked .screen-content .network-screen {
|
|
||||||
margin: 0 0 -24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.network-stage {
|
|
||||||
position: relative;
|
|
||||||
height: calc(100dvh - 74px);
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.network-board--full {
|
|
||||||
position: absolute;
|
|
||||||
inset: 0;
|
|
||||||
min-height: 0;
|
|
||||||
height: 100%;
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.network-legend {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
gap: 10px;
|
|
||||||
font-size: 12px;
|
|
||||||
color: var(--text-primary);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.network-legend span {
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.legend-line,
|
|
||||||
.legend-arrow {
|
|
||||||
width: 18px;
|
|
||||||
height: 2px;
|
|
||||||
display: inline-block;
|
|
||||||
border-radius: 2px;
|
|
||||||
background: color-mix(in srgb, var(--rel-shining) 95%, transparent);
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.legend-line.relative {
|
|
||||||
background: color-mix(in srgb, var(--rel-family) 95%, transparent);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.legend-arrow::after {
|
|
||||||
content: "";
|
|
||||||
position: absolute;
|
|
||||||
right: -1px;
|
|
||||||
top: -3px;
|
|
||||||
border-top: 4px solid transparent;
|
|
||||||
border-bottom: 4px solid transparent;
|
|
||||||
border-left: 6px solid color-mix(in srgb, var(--rel-shining) 95%, transparent);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.network-svg {
|
|
||||||
position: absolute;
|
|
||||||
inset: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.network-link {
|
|
||||||
stroke-width: 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.network-link.is-friend {
|
|
||||||
stroke: var(--rel-shining);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.network-link.is-relative {
|
|
||||||
stroke: var(--rel-family);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.node-dot {
|
|
||||||
position: relative;
|
|
||||||
width: 52px;
|
|
||||||
height: 52px;
|
|
||||||
margin: 0 auto 4px;
|
|
||||||
border-radius: 50%;
|
|
||||||
display: grid;
|
|
||||||
place-items: center;
|
|
||||||
font-weight: 700;
|
|
||||||
background: var(--surface);
|
|
||||||
border: 1px solid var(--border-subtle);
|
|
||||||
box-shadow: 0 8px 16px rgba(4, 8, 15, 0.35);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.node-badge-official {
|
|
||||||
position: absolute;
|
|
||||||
left: 50%;
|
|
||||||
top: -8px;
|
|
||||||
transform: translateX(-50%);
|
|
||||||
min-width: 26px;
|
|
||||||
height: 18px;
|
|
||||||
padding: 0 6px;
|
|
||||||
border-radius: 999px;
|
|
||||||
border: 1px solid transparent;
|
|
||||||
background: linear-gradient(180deg, var(--rel-family), var(--rel-family));
|
|
||||||
color: var(--rel-family);
|
|
||||||
font-size: 11px;
|
|
||||||
line-height: 16px;
|
|
||||||
font-weight: 800;
|
|
||||||
letter-spacing: 0.3px;
|
|
||||||
text-transform: uppercase;
|
|
||||||
box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
|
|
||||||
z-index: 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.node.is-shine .node-dot::before {
|
|
||||||
content: "";
|
|
||||||
position: absolute;
|
|
||||||
inset: -14px;
|
|
||||||
border-radius: 50%;
|
|
||||||
background: radial-gradient(circle, color-mix(in srgb, var(--rel-shining) 62%, transparent) 0%, color-mix(in srgb, var(--rel-shining) 28%, transparent) 42%, color-mix(in srgb, var(--rel-shining) 0%, transparent) 76%);
|
|
||||||
filter: blur(2px);
|
|
||||||
z-index: -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.node.is-shine .node-dot {
|
|
||||||
box-shadow: 0 0 0 2px color-mix(in srgb, var(--rel-shining) 50%, transparent), 0 0 28px color-mix(in srgb, var(--rel-shining) 58%, transparent), 0 8px 16px rgba(4, 8, 15, 0.35);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.node.is-friend .node-dot {
|
|
||||||
background: linear-gradient(165deg, var(--rel-contact), var(--surface));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.node.is-relative .node-dot {
|
|
||||||
background: linear-gradient(165deg, var(--rel-family), var(--surface));
|
|
||||||
border-color: color-mix(in srgb, var(--rel-family) 55%, transparent);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.node.center .node-dot {
|
|
||||||
width: 60px;
|
|
||||||
height: 60px;
|
|
||||||
background: linear-gradient(130deg, var(--rel-shining), var(--rel-shining));
|
|
||||||
color: var(--on-accent);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.node-label {
|
|
||||||
display: grid;
|
|
||||||
gap: 1px;
|
|
||||||
margin-top: 1px;
|
|
||||||
font-size: 11px;
|
|
||||||
color: var(--text-primary);
|
|
||||||
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.28);
|
|
||||||
line-height: 1.12;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.node-label.is-login-only .node-name {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.node-name {
|
|
||||||
display: grid;
|
|
||||||
gap: 1px;
|
|
||||||
color: var(--text-primary);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.node-name-line {
|
|
||||||
display: block;
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.node-login {
|
|
||||||
display: block;
|
|
||||||
color: var(--text-primary);
|
|
||||||
font-size: 11px;
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.node-relation {
|
|
||||||
display: block;
|
|
||||||
color: var(--text-primary);
|
|
||||||
font-size: 11px;
|
|
||||||
font-weight: 600;
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.network-search-candidate {
|
|
||||||
width: 100%;
|
|
||||||
justify-content: flex-start;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.network-search-candidate.is-selected {
|
|
||||||
border-color: color-mix(in srgb, var(--rel-shining) 78%, transparent);
|
|
||||||
background: color-mix(in srgb, var(--rel-shining) 24%, transparent);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.node:focus-visible .node-dot,
|
|
||||||
.node:hover .node-dot {
|
|
||||||
border-color: color-mix(in srgb, var(--rel-shining) 92%, transparent);
|
|
||||||
box-shadow: 0 0 0 3px color-mix(in srgb, var(--rel-shining) 20%, transparent), 0 8px 16px rgba(4, 8, 15, 0.35);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.node-menu {
|
|
||||||
position: absolute;
|
|
||||||
z-index: 3;
|
|
||||||
min-width: 240px;
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.node-menu-actions {
|
|
||||||
display: grid;
|
|
||||||
gap: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Граф занимает ровно доступную область между общей шапкой и нижним toolbar. */
|
|
||||||
.app-shell--scroll-locked .screen-content .network-screen {
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
background: radial-gradient(ellipse at 50% 45%, color-mix(in srgb, var(--rel-shining) 7%, transparent), transparent 70%);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.network-screen[data-view='list'] {
|
||||||
|
background: var(--background);
|
||||||
|
}
|
||||||
|
|
||||||
.app-shell--scroll-locked .screen-content .network-stage {
|
.network-stage {
|
||||||
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.network-board--full {
|
||||||
/* В «Связях» screen-content намеренно без padding, поэтому тот же отступ задаём явно. */
|
|
||||||
.network-stage > .fg-filter-bar.app-top-tabs {
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: var(--app-primary-tabs-top-gap);
|
inset: 0;
|
||||||
left: 14px;
|
border: 0;
|
||||||
right: 14px;
|
border-radius: 0;
|
||||||
z-index: 11;
|
background: transparent;
|
||||||
min-height: var(--app-primary-tab-min-height);
|
|
||||||
padding: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.network-board--full[hidden] {
|
||||||
/* Одинаковая фактическая высота и типографика самих верхних чипов. */
|
display: none;
|
||||||
|
|
||||||
|
|
||||||
/* «Связи»: фильтры остаются ниже интерактивной части общего TopBar. */
|
|
||||||
.app-shell--scroll-locked .network-stage > .fg-filter-bar.app-top-tabs {
|
|
||||||
top: calc(var(--topbar-height, 64px) + var(--app-primary-tabs-top-gap, 14px));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Чипы фильтров – под шапкой, поверх карты и над списком. */
|
||||||
.network-screen { background: radial-gradient(ellipse at 50% 45%, color-mix(in srgb, var(--rel-shining) 7%, transparent), transparent 70%); }
|
.net-chips {
|
||||||
.network-board--full { border: 0; background: transparent; }
|
position: absolute;
|
||||||
.network-screen .fg-stage { background: transparent; }
|
top: var(--topbar-height, 64px);
|
||||||
|
|
||||||
|
|
||||||
.network-stage > .fg-filter-bar.app-top-tabs {
|
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
padding-inline: var(--page-gutter);
|
z-index: 11;
|
||||||
|
padding: calc(var(--app-primary-tabs-top-gap, 14px) - 4px) var(--page-gutter) 0;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.net-chips__row {
|
||||||
pointer-events: auto;
|
pointer-events: auto;
|
||||||
}
|
}
|
||||||
/* Тот же блок-переключатель, что на других вкладках: на всю ширину, все пункты видны. */
|
|
||||||
.network-stage .fg-filter-tabs { width: 100%; }
|
/* В списке строки уезжают под чипы – подложка до самой шапки. */
|
||||||
.network-stage .fg-filter-tabs .tab-btn:disabled { opacity: .45; cursor: default; }
|
.network-screen[data-view='list'] .net-chips {
|
||||||
@media (max-width: 360px) {
|
padding-bottom: var(--space-1);
|
||||||
/* На самых узких экранах длинный пункт («Друзья друзей») переносится, а не обрезается. */
|
background: var(--background);
|
||||||
.network-stage .fg-filter-tabs .tab-btn { white-space: normal; line-height: 1.1; }
|
pointer-events: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.net-list-more {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 12px;
|
||||||
|
width: 100%;
|
||||||
|
min-height: 52px;
|
||||||
|
padding: 0 0 0 4px;
|
||||||
|
border: 0;
|
||||||
|
background: none;
|
||||||
|
color: var(--accent);
|
||||||
|
font: inherit;
|
||||||
|
font-size: var(--text-sm);
|
||||||
|
font-weight: var(--weight-bold);
|
||||||
|
text-align: left;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.net-list-more svg {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
margin-inline: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.net-chips__fof {
|
||||||
|
margin-left: var(--space-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.net-chips__fof svg {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Список: свой скролл (страница «Связей» не прокручивается), отступы сверху и снизу
|
||||||
|
* под чипы и нижнее меню задаёт JS. */
|
||||||
|
.net-list {
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
overflow-y: auto;
|
||||||
|
overscroll-behavior: contain;
|
||||||
|
padding-inline: var(--page-gutter);
|
||||||
|
scrollbar-width: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.net-list::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.net-list[hidden] {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Загрузка, ошибка, «пока нет связей» – по центру свободной части экрана. */
|
||||||
|
.net-overlay {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
top: 32%;
|
||||||
|
z-index: 10;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
padding-inline: var(--page-gutter);
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.net-overlay > * {
|
||||||
|
pointer-events: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.net-overlay--below-center {
|
||||||
|
top: 56%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.network-screen.is-blank .net-chips,
|
||||||
|
.network-screen.is-blank .net-zoom,
|
||||||
|
.network-screen.is-blank .net-mode-pill {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.net-overlay .state-message {
|
||||||
|
border-radius: var(--radius-lg);
|
||||||
|
background: color-mix(in srgb, var(--background) 88%, transparent);
|
||||||
|
}
|
||||||
|
|
||||||
|
.net-overlay[hidden],
|
||||||
|
.net-busy[hidden] {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Подгрузка поверх уже показанной карты: маленький кружок, появляется с задержкой. */
|
||||||
|
.net-busy {
|
||||||
|
position: absolute;
|
||||||
|
top: calc(var(--topbar-height, 64px) + 64px);
|
||||||
|
left: 50%;
|
||||||
|
z-index: 12;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
width: 36px;
|
||||||
|
height: 36px;
|
||||||
|
margin-left: -18px;
|
||||||
|
border: 1px solid var(--border-subtle);
|
||||||
|
border-radius: 50%;
|
||||||
|
background: var(--surface);
|
||||||
|
box-shadow: var(--shadow-sm);
|
||||||
|
opacity: 0;
|
||||||
|
animation: loading-state-in 160ms ease 300ms forwards;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* «Списком / На карте» – внизу по центру, над нижним меню (bottom задаёт JS). */
|
||||||
|
.net-mode-pill {
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
z-index: 12;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
height: 40px;
|
||||||
|
padding: 0 18px 0 14px;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
border: 1px solid var(--border-subtle);
|
||||||
|
border-radius: var(--radius-pill);
|
||||||
|
background: var(--surface);
|
||||||
|
box-shadow: var(--shadow);
|
||||||
|
color: var(--text-primary);
|
||||||
|
font: inherit;
|
||||||
|
font-size: var(--text-sm);
|
||||||
|
font-weight: var(--weight-bold);
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.net-mode-pill svg {
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
color: var(--accent);
|
||||||
|
}
|
||||||
|
|
||||||
|
.net-mode-pill:hover {
|
||||||
|
background: var(--surface-raised);
|
||||||
|
}
|
||||||
|
|
||||||
|
.net-mode-pill:active {
|
||||||
|
transform: translateX(-50%) scale(0.97);
|
||||||
|
}
|
||||||
|
|
||||||
|
.net-mode-pill:focus-visible {
|
||||||
|
outline: 2px solid var(--focus-ring);
|
||||||
|
outline-offset: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.net-mode-pill[hidden] {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.net-row-menu-anchor {
|
||||||
|
position: absolute;
|
||||||
|
width: 1px;
|
||||||
|
height: 1px;
|
||||||
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,41 +58,6 @@
|
|||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Панель фильтров (оверлей под шапкой) */
|
|
||||||
.fg-filter-bar {
|
|
||||||
position: absolute;
|
|
||||||
top: max(72px, calc(env(safe-area-inset-top) + 68px));
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
z-index: 11;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
gap: 8px;
|
|
||||||
padding: 0 12px;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.net-status {
|
|
||||||
position: absolute;
|
|
||||||
top: calc(var(--topbar-height, 64px) + var(--app-primary-tabs-top-gap, 14px) + var(--app-primary-tab-min-height, 44px) + 14px);
|
|
||||||
left: 50%;
|
|
||||||
z-index: 11;
|
|
||||||
transform: translateX(-50%);
|
|
||||||
padding: 6px 14px;
|
|
||||||
border-radius: 999px;
|
|
||||||
border: 1px solid var(--border-subtle);
|
|
||||||
background: var(--surface);
|
|
||||||
color: var(--text-secondary);
|
|
||||||
font-size: 13px;
|
|
||||||
white-space: nowrap;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.net-status[hidden] {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Кнопки масштаба: справа внизу, над нижним меню и карточкой (bottom задаёт JS). */
|
/* Кнопки масштаба: справа внизу, над нижним меню и карточкой (bottom задаёт JS). */
|
||||||
.net-zoom {
|
.net-zoom {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -107,6 +72,10 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.net-zoom[hidden] {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.net-zoom__btn {
|
.net-zoom__btn {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
@@ -135,7 +104,7 @@
|
|||||||
height: 20px;
|
height: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Карточка выбранного человека */
|
/* Карточка выбранного человека: аватар, имя, кто это вам, действия. */
|
||||||
.net-card {
|
.net-card {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: var(--page-gutter, 14px);
|
left: var(--page-gutter, 14px);
|
||||||
@@ -159,8 +128,25 @@
|
|||||||
|
|
||||||
.net-card__head {
|
.net-card__head {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: center;
|
||||||
gap: 8px;
|
gap: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.net-card__avatar {
|
||||||
|
flex: 0 0 auto;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.net-card__avatar.is-shining .avatar {
|
||||||
|
border-radius: 50%;
|
||||||
|
box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--rel-shining);
|
||||||
|
}
|
||||||
|
|
||||||
|
.net-card__answer {
|
||||||
|
width: 100%;
|
||||||
|
min-height: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.net-card__titles {
|
.net-card__titles {
|
||||||
@@ -186,6 +172,7 @@
|
|||||||
|
|
||||||
.net-card__close {
|
.net-card__close {
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
|
align-self: flex-start;
|
||||||
width: 32px;
|
width: 32px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
display: grid;
|
display: grid;
|
||||||
@@ -233,6 +220,11 @@
|
|||||||
color: var(--accent);
|
color: var(--accent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.net-card__action .spinner {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
.net-card__action:hover {
|
.net-card__action:hover {
|
||||||
background: var(--surface-selected);
|
background: var(--surface-selected);
|
||||||
}
|
}
|
||||||
@@ -322,5 +314,43 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.net-legend__tips {
|
.net-legend__tips {
|
||||||
margin: 4px 0 0;
|
display: grid;
|
||||||
|
gap: 8px;
|
||||||
|
margin: 8px 0 0;
|
||||||
|
padding-left: 18px;
|
||||||
|
color: var(--text-secondary);
|
||||||
|
font-size: var(--text-sm);
|
||||||
|
line-height: var(--leading-sm, 1.45);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Поиск по связям поверх карты: найденные на карте и во всей сети. */
|
||||||
|
.net-search-panel {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
z-index: 13;
|
||||||
|
overflow-y: auto;
|
||||||
|
overscroll-behavior: contain;
|
||||||
|
padding: 0 var(--page-gutter) var(--space-4);
|
||||||
|
background: var(--background);
|
||||||
|
scrollbar-width: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.net-search-panel::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.net-search-panel[hidden] {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.net-search-note {
|
||||||
|
margin: var(--space-4) 0;
|
||||||
|
color: var(--text-secondary);
|
||||||
|
font-size: var(--text-sm);
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.net-search-loading {
|
||||||
|
padding: var(--space-3) 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user