SHA256
Доработать UI личных сообщений
This commit is contained in:
@@ -1135,6 +1135,41 @@ function scrollToUnreadSeparator(list) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Постоянная справка в начале личного диалога. Это только UI: не DM, не запись в блокчейн.
|
||||
function createDmEncryptionNotice() {
|
||||
const notice = document.createElement('aside');
|
||||
notice.className = 'dm-security-notice';
|
||||
notice.setAttribute('role', 'note');
|
||||
|
||||
const heading = document.createElement('strong');
|
||||
heading.className = 'dm-security-notice__title';
|
||||
heading.textContent = `🔒 ${t('screens.chat_view.security_notice.title')}`;
|
||||
notice.append(heading);
|
||||
|
||||
for (const text of [
|
||||
t('screens.chat_view.security_notice.encryption'),
|
||||
t('screens.chat_view.security_notice.servers'),
|
||||
t('screens.chat_view.security_notice.derivation'),
|
||||
t('screens.chat_view.security_notice.rotation'),
|
||||
t('screens.chat_view.security_notice.source'),
|
||||
]) {
|
||||
const paragraph = document.createElement('p');
|
||||
paragraph.textContent = text;
|
||||
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;
|
||||
}
|
||||
|
||||
function renderLog(
|
||||
list,
|
||||
chatId,
|
||||
@@ -1148,6 +1183,7 @@ function renderLog(
|
||||
} = {},
|
||||
) {
|
||||
list.innerHTML = '';
|
||||
list.append(createDmEncryptionNotice());
|
||||
const messages = getChatMessages(chatId);
|
||||
let unreadSeparatorInserted = false;
|
||||
const separatorMessageKey = String(unreadSeparatorMessageKey || '').trim();
|
||||
|
||||
Reference in New Issue
Block a user