Новый текст о шифровании в начале личного чата

Шесть абзацев заменены тремя пунктами: Zero-Knowledge Architecture,
Self-Custody & Open Source, Absolute Control (ru/en). Формулировка
«не имеет доступа к содержимому чатов» — сервер видит метаданные,
но не содержимое. Тест обновлён под редакцию от 27.11.2026.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Pixel
2026-11-29 18:15:04 +03:00
co-authored by Claude Opus 5.5
parent 55f2d11721
commit 4d78e87447
5 changed files with 28 additions and 44 deletions
+1 -1
View File
@@ -1,2 +1,2 @@
client.version=1.20.67 client.version=1.20.68
server.version=1.16.32 server.version=1.16.32
+6 -8
View File
@@ -2267,14 +2267,12 @@
"chat_view": { "chat_view": {
"security_notice": { "security_notice": {
"title": "Private chat security", "title": "Private chat security",
"encryption": "Messages in this chat are encrypted on the participants' devices.", "zero_knowledge_label": "Zero-Knowledge Architecture:",
"servers": "The server delivers encrypted data but should not be able to read the conversation.", "zero_knowledge": "We don't trust servers. SHiNE does not store your private keys and has no technical access to chat content.",
"derivation": "Chat keys are derived from account keys and stored on the devices.", "self_custody_label": "Self-Custody & Open Source:",
"rotation": "After key rotation, some messages may require the keys to be received again.", "self_custody": "Your key is generated locally from your login and password. No hidden algorithms — the code is fully open.",
"source": "Before sending, make sure you are communicating with the intended user and server.", "control_label": "Absolute Control:",
"warning_label": "Important:", "control": "Forget your password and you lose access to your messages forever."
"warning": "never share private keys or your account password with anyone.",
"recovery": "Access recovery depends on your saved keys and password. Keep them secure."
}, },
"text_002": "Muted", "text_002": "Muted",
"text_015": "Search", "text_015": "Search",
+6 -8
View File
@@ -2400,14 +2400,12 @@
"chat_view": { "chat_view": {
"security_notice": { "security_notice": {
"title": "Ваша переписка защищена сквозным шифрованием", "title": "Ваша переписка защищена сквозным шифрованием",
"encryption": "Все личные сообщения шифруются с использованием современных криптографических алгоритмов. Ключи шифрования хранятся ТОЛЬКО на устройствах участников переписки.", "zero_knowledge_label": "Zero-Knowledge Architecture:",
"servers": "Сервера SHiNE не имеют ваших приватных ключей и даже технически никак не могут прочитать ваши сообщения.", "zero_knowledge": "Мы не доверяем серверам. SHiNE не хранит ваши приватные ключи и технически не имеет доступа к содержимому чатов.",
"derivation": "Ваш ключ шифрования высчитывается из вашего логина и пароля", "self_custody_label": "Self-Custody & Open Source:",
"rotation": "При смене пароля перекодирование всех ваших сообщений со старого пароля на новый происходит на устройстве пользователя.", "self_custody": "Ваш ключ генерируется локально из вашего логина и пароля. Никаких скрытых алгоритмов — код полностью открыт.",
"source": "Код наших приложений полностью открыт и вы легко можете проверить всё это сами.", "control_label": "Absolute Control:",
"warning_label": "Важно:", "control": "Забудете пароль — навсегда потеряете доступ к переписке."
"warning": "если вы забудете свой пароль, восстановить доступ к вашей зашифрованной переписке будет невозможно.",
"recovery": "SHiNE не хранит ваши секретные ключи и никак не сможет помочь вам восстановить вашу переписку"
}, },
"text_001": "Чат", "text_001": "Чат",
"text_002": "Без звука", "text_002": "Без звука",
+7 -17
View File
@@ -1185,27 +1185,17 @@ function createDmEncryptionNotice() {
heading.textContent = `🔒 ${t('screens.chat_view.security_notice.title')}`; heading.textContent = `🔒 ${t('screens.chat_view.security_notice.title')}`;
notice.append(heading); notice.append(heading);
for (const text of [ for (const [label, text] of [
t('screens.chat_view.security_notice.encryption'), [t('screens.chat_view.security_notice.zero_knowledge_label'), t('screens.chat_view.security_notice.zero_knowledge')],
t('screens.chat_view.security_notice.servers'), [t('screens.chat_view.security_notice.self_custody_label'), t('screens.chat_view.security_notice.self_custody')],
t('screens.chat_view.security_notice.derivation'), [t('screens.chat_view.security_notice.control_label'), t('screens.chat_view.security_notice.control')],
t('screens.chat_view.security_notice.rotation'),
t('screens.chat_view.security_notice.source'),
]) { ]) {
const paragraph = document.createElement('p'); const paragraph = document.createElement('p');
paragraph.textContent = text; const strong = document.createElement('strong');
strong.textContent = `${label} `;
paragraph.append(strong, document.createTextNode(text));
notice.append(paragraph); notice.append(paragraph);
} }
const warning = document.createElement('p');
const warningLabel = document.createElement('strong');
warningLabel.textContent = `${t('screens.chat_view.security_notice.warning_label')} `;
warning.append(warningLabel, document.createTextNode(t('screens.chat_view.security_notice.warning')));
notice.append(warning);
const recovery = document.createElement('p');
recovery.textContent = t('screens.chat_view.security_notice.recovery');
notice.append(recovery);
return notice; return notice;
} }
+8 -10
View File
@@ -11,23 +11,21 @@ const en = JSON.parse(source('../js/i18n/locales/en.json'));
for (const [locale, language] of [['ru', ru], ['en', en]]) { for (const [locale, language] of [['ru', ru], ['en', en]]) {
test(`в ${locale} есть полный текст предупреждения DM`, () => { test(`в ${locale} есть полный текст предупреждения DM`, () => {
const note = language.screens.chat_view.security_notice; const note = language.screens.chat_view.security_notice;
for (const key of ['title', 'encryption', 'servers', 'derivation', 'rotation', 'source', 'warning_label', 'warning', 'recovery']) { for (const key of ['title', 'zero_knowledge_label', 'zero_knowledge', 'self_custody_label', 'self_custody', 'control_label', 'control']) {
assert.ok(typeof note[key] === 'string' && note[key].trim(), `${locale}/${key}`); assert.ok(typeof note[key] === 'string' && note[key].trim(), `${locale}/${key}`);
} }
}); });
} }
test('русский текст DM соответствует утверждённой пользователем редакции от 13.11.2026', () => { test('русский текст DM соответствует утверждённой пользователем редакции от 27.11.2026', () => {
assert.deepEqual(ru.screens.chat_view.security_notice, { assert.deepEqual(ru.screens.chat_view.security_notice, {
"title": "Ваша переписка защищена сквозным шифрованием", "title": "Ваша переписка защищена сквозным шифрованием",
"encryption": "Все личные сообщения шифруются с использованием современных криптографических алгоритмов. Ключи шифрования хранятся ТОЛЬКО на устройствах участников переписки.", "zero_knowledge_label": "Zero-Knowledge Architecture:",
"servers": "Сервера SHiNE не имеют ваших приватных ключей и даже технически никак не могут прочитать ваши сообщения.", "zero_knowledge": "Мы не доверяем серверам. SHiNE не хранит ваши приватные ключи и технически не имеет доступа к содержимому чатов.",
"derivation": "Ваш ключ шифрования высчитывается из вашего логина и пароля", "self_custody_label": "Self-Custody & Open Source:",
"rotation": "При смене пароля перекодирование всех ваших сообщений со старого пароля на новый происходит на устройстве пользователя.", "self_custody": "Ваш ключ генерируется локально из вашего логина и пароля. Никаких скрытых алгоритмов — код полностью открыт.",
"source": "Код наших приложений полностью открыт и вы легко можете проверить всё это сами.", "control_label": "Absolute Control:",
"warning_label": "Важно:", "control": "Забудете пароль — навсегда потеряете доступ к переписке."
"warning": "если вы забудете свой пароль, восстановить доступ к вашей зашифрованной переписке будет невозможно.",
"recovery": "SHiNE не хранит ваши секретные ключи и никак не сможет помочь вам восстановить вашу переписку"
}); });
// Текст должен отображаться напрямую через textContent, без HTML-сущностей. // Текст должен отображаться напрямую через textContent, без HTML-сущностей.
for (const text of Object.values(ru.screens.chat_view.security_notice)) { for (const text of Object.values(ru.screens.chat_view.security_notice)) {