improve UI for "remove history" message

This commit is contained in:
daria 2026-04-30 12:04:53 +03:00
parent 72d2289127
commit deeb4fce66
No known key found for this signature in database
GPG Key ID: 3B75240E6B2F2701
2 changed files with 7 additions and 4 deletions

View File

@ -465,6 +465,9 @@
}
.cp-app-contacts-system-notification {
align-items: center;
flex-direction: row;
justify-content: center;
color: fade(@cryptpad_text_col, 80%);
}
}
}

View File

@ -250,11 +250,11 @@ define([
}
};
var displaySystemMessage = function (id, message) {
var displaySystemMessage = function (id, icon, message) {
var $messagebox = $(getChat(id)).find('.cp-app-contacts-messages');
if (!$messagebox.length) { return; }
var noticeElement = h('div.cp-app-contacts-message.cp-app-contacts-system-notification', message);
$messagebox.append(noticeElement);
var content = icon ? [Icons.get(icon), h('span', message)] : message;
$messagebox.append(h('div.cp-app-contacts-message.cp-app-contacts-system-notification', content));
normalizeLabels($messagebox);
scrollChatToBottom();
};
@ -1151,7 +1151,7 @@ define([
}
if (cmd === 'CLEAR_CHANNEL') {
clearChannel(data);
displaySystemMessage(data, Messages.contacts_historyCleared);
displaySystemMessage(data, 'clear-canvas', Messages.contacts_historyCleared);
return;
}
if (cmd === 'PADCHAT_READY') {