SHA256
Личный чат: фоны «Затмение» и «Гроза», новая справка о шифровании, плавное сворачивание «Поддержки»
- Фоны «Затмение» и «Гроза» в двух темах. Сообщения, голосовые и поле ввода подхватывают свет фона: общий материал has-dm-glow, у фона только пять цветов на тему. - Срок вложения и время — в одной строке; свечение пузырей не срезается краем ленты. - Справка о шифровании: замок-значок вместо эмодзи, шрифт Source Serif 4 из файлов приложения (OFL). - Карточка «Поддержка» сворачивается мягко и без рывка в конце: анимируется только её добавка к строке. Версия клиента 1.21.18. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -20,9 +20,10 @@ export function openDmBackgroundSheet(chatId) {
|
||||
button.type = 'button';
|
||||
button.className = 'ui-button dm-bg-option';
|
||||
const preview = document.createElement('span');
|
||||
preview.className = 'dm-bg-option__preview dm-bg-image';
|
||||
preview.className = `dm-bg-option__preview dm-bg-image${findDmChatBackground(id)?.glow ? ' has-dm-glow' : ''}`;
|
||||
preview.setAttribute('aria-hidden', 'true');
|
||||
preview.innerHTML = `<span class="dm-bg-option__bubble"></span><span class="dm-bg-option__bubble is-out"></span><span class="dm-bg-option__check">${iconHtml('check')}</span>`;
|
||||
preview.dataset.dmBg = id;
|
||||
paintDmChatBackground(preview, findDmChatBackground(id));
|
||||
const name = document.createElement('span');
|
||||
name.className = 'dm-bg-option__name';
|
||||
|
||||
@@ -33,6 +33,7 @@ const paths = {
|
||||
profile: '<circle cx="12" cy="7" r="4"/><path d="M4 21v-2a8 8 0 0 1 16 0v2"/>',
|
||||
share: '<path d="m14.4 3.1 7.2 7.1-7.2 6.6v-4.4C8.5 12.4 5 15.1 2.4 20c.4-7.6 4.4-11.7 12-12.4Z"/>',
|
||||
search: '<circle cx="10.5" cy="10.5" r="6.5"/><path d="m16 16 5 5"/>',
|
||||
lock: '<path d="M8.2 10.5V7.8a3.8 3.8 0 0 1 7.6 0v2.7"/><rect x="5" y="10.5" width="14" height="10" rx="3"/><path d="M12 14.4v2.2"/>',
|
||||
link: '<path d="M10 14a4.5 4.5 0 0 0 6.4 0l3.2-3.2a4.5 4.5 0 0 0-6.4-6.4L12 5.6"/><path d="M14 10a4.5 4.5 0 0 0-6.4 0l-3.2 3.2a4.5 4.5 0 0 0 6.4 6.4l1.2-1.2"/>',
|
||||
gift: '<rect x="3" y="8" width="18" height="5" rx="1"/><path d="M5 13v7a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-7M12 8v13M12 8S10.5 3 8 3.5 7 8 12 8Zm0 0s1.5-5 4-4.5S17 8 12 8Z"/>',
|
||||
plus: '<path d="M12 5v14M5 12h14"/>',
|
||||
|
||||
@@ -1252,7 +1252,9 @@
|
||||
"title": "Chat background",
|
||||
"hint": "The background changes only in this chat and only on this device. The other person can't see it.",
|
||||
"none": "No background",
|
||||
"nebula": "Nebula"
|
||||
"nebula": "Nebula",
|
||||
"eclipse": "Eclipse",
|
||||
"storm": "Storm"
|
||||
},
|
||||
"dm_mute_menu": {
|
||||
"text_001": "Unmute",
|
||||
|
||||
@@ -1252,7 +1252,9 @@
|
||||
"title": "Фон чата",
|
||||
"hint": "Фон меняется только в этом чате и только на этом устройстве. Собеседник его не видит.",
|
||||
"none": "Без фона",
|
||||
"nebula": "Туманность"
|
||||
"nebula": "Туманность",
|
||||
"eclipse": "Затмение",
|
||||
"storm": "Гроза"
|
||||
},
|
||||
"dm_mute_menu": {
|
||||
"text_001": "Включить звук",
|
||||
|
||||
@@ -1069,8 +1069,11 @@ function createDmEncryptionNotice() {
|
||||
|
||||
const heading = document.createElement('strong');
|
||||
heading.className = 'dm-security-notice__title';
|
||||
heading.textContent = `🔒 ${t('screens.chat_view.security_notice.title')}`;
|
||||
notice.append(heading);
|
||||
heading.textContent = t('screens.chat_view.security_notice.title');
|
||||
const lock = document.createElement('span');
|
||||
lock.className = 'dm-security-notice__icon';
|
||||
lock.innerHTML = iconHtml('lock');
|
||||
notice.append(lock, heading);
|
||||
|
||||
for (const [label, text] of [
|
||||
[t('screens.chat_view.security_notice.zero_knowledge_label'), t('screens.chat_view.security_notice.zero_knowledge')],
|
||||
@@ -3008,7 +3011,12 @@ export function render({ navigate, route, chrome }) {
|
||||
const background = findDmChatBackground(getDmChatBackground(chatId));
|
||||
paintDmChatBackground(backgroundLayer, background);
|
||||
backgroundLayer.hidden = !background;
|
||||
[screen, form].forEach((node) => node.classList.toggle('has-dm-bg', Boolean(background)));
|
||||
[screen, form].forEach((node) => {
|
||||
node.classList.toggle('has-dm-bg', Boolean(background));
|
||||
node.classList.toggle('has-dm-glow', Boolean(background?.glow));
|
||||
});
|
||||
// По id стили берут оттенок сообщений и поля ввода (dm-background.css).
|
||||
[screen, form, backgroundLayer].forEach((node) => { node.dataset.dmBg = background?.id || ''; });
|
||||
};
|
||||
syncBackground();
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ import { t } from '../i18n/index.js';
|
||||
// Фоны личных чатов. Новый фон — одна запись здесь, подпись в обоих словарях (screens.dm_background.<id>)
|
||||
// и две картинки в img/chat-backgrounds/: для тёмной и светлой темы (вертикальные, до 250 КБ).
|
||||
// id хранится у пользователей (dm-chat-prefs.js): не переименовывать. Выбор чата — только id.
|
||||
// glow: сообщения и поле ввода светятся оттенком фона; сами цвета — блок [data-dm-bg='<id>'] в styles/features/dm-background.css.
|
||||
const BACKGROUNDS = [
|
||||
{
|
||||
id: 'nebula',
|
||||
@@ -10,6 +11,20 @@ const BACKGROUNDS = [
|
||||
dark: 'img/chat-backgrounds/nebula-dark.webp',
|
||||
light: 'img/chat-backgrounds/nebula-light.webp',
|
||||
},
|
||||
{
|
||||
id: 'eclipse',
|
||||
get label() { return t('screens.dm_background.eclipse'); },
|
||||
dark: 'img/chat-backgrounds/eclipse-dark.webp',
|
||||
light: 'img/chat-backgrounds/eclipse-light.webp',
|
||||
glow: true,
|
||||
},
|
||||
{
|
||||
id: 'storm',
|
||||
get label() { return t('screens.dm_background.storm'); },
|
||||
dark: 'img/chat-backgrounds/storm-dark.webp',
|
||||
light: 'img/chat-backgrounds/storm-light.webp',
|
||||
glow: true,
|
||||
},
|
||||
];
|
||||
|
||||
export function listDmChatBackgrounds() {
|
||||
|
||||
Reference in New Issue
Block a user