From 2b672555374265d0d5d012b68e724ef6e3c20f8b Mon Sep 17 00:00:00 2001 From: daria <95225431+dariiing@users.noreply.github.com> Date: Mon, 18 Aug 2025 17:36:58 +0300 Subject: [PATCH] update messenger icons --- www/common/common-icons.js | 5 +++-- www/common/messenger-ui.js | 26 ++++++++++++++++---------- www/contacts/inner.js | 5 ++++- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/www/common/common-icons.js b/www/common/common-icons.js index e6b02c5d5..38e272005 100644 --- a/www/common/common-icons.js +++ b/www/common/common-icons.js @@ -99,7 +99,7 @@ define([ "renamed": "flag", // XXX "restore": "restore", // XXX "all": "menu", - "history": "archive", + "history": "history", "chat": "message-circle-more", "mail": "mail", // XXX "upload-avatar": "image-up", @@ -194,7 +194,8 @@ define([ "badge-admin": "star", "badge-moderator": "life-buoy", "badge-premium": "ticket-check", - "badge-error": "circle-alert" + "badge-error": "circle-alert", + "remove-history": "eraser", }; Icons.get = (name, attrs = {}) => { diff --git a/www/common/messenger-ui.js b/www/common/messenger-ui.js index 5d317c440..0f66c39ef 100644 --- a/www/common/messenger-ui.js +++ b/www/common/messenger-ui.js @@ -243,7 +243,8 @@ define([ $(getChat(id)).find('.cp-app-contacts-messages').html(''); }; markup.chatbox = function (id, data, curvePublic) { - var moreHistory = h('span.cp-app-contacts-more-history.fa.fa-history', { + var moreHistory = Icons.get('history', { + class: 'cp-app-contacts-more-history', title: Messages.contacts_fetchHistory, }); @@ -307,7 +308,8 @@ define([ }); }); - var removeHistory = h('span.cp-app-contacts-remove-history.fa.fa-eraser', { + var removeHistory = Icons.get('remove-history', { + 'class': 'cp-app-contacts-remove-history', title: Messages.contacts_removeHistoryTitle }); @@ -343,7 +345,7 @@ define([ var priv = metadataMgr.getPrivateData(); - var closeTips = h('span.fa.fa-times.cp-app-contacts-tips-close'); + var closeTips = Icons.get('close', { 'class': 'cp-app-contacts-tips-close'}); var tips; if (isApp && Util.find(priv.settings, ['general', 'hidetips', 'chat']) !== true) { tips = h('div.cp-app-contacts-tips', [ @@ -360,9 +362,9 @@ define([ var input = h('textarea', { placeholder: Messages.contacts_typeHere }); - var sendButton = h('button.btn.btn-primary.fa.fa-paper-plane', { + var sendButton = h('button.btn.btn-primary', { title: Messages.contacts_send, - }); + }, Icons.get('send')); var rightCol = h('span.cp-app-contacts-right-col', [ h('span.cp-app-contacts-name', displayName), @@ -542,21 +544,24 @@ define([ curve = __channel.curvePublic; } - var unmute = h('span.cp-app-contacts-remove.fa.fa-bell.cp-unmute-icon', { + var unmute = Icons.get('notification', { + class: 'cp-app-contacts-remove cp-unmute-icon', title: Messages.contacts_unmute || 'unmute', style: (curve && mutedUsers[curve]) ? undefined : 'display: none;' }); - var mute = h('span.cp-app-contacts-remove.fa.fa-bell-slash.cp-mute-icon', { + var mute = Icons.get('mute', { + class: 'cp-app-contacts-remove cp-mute-icon', title: Messages.contacts_mute || 'mute', style: (curve && mutedUsers[curve]) ? 'display: none;' : undefined }); - var remove = h('span.cp-app-contacts-remove.fa.fa-user-times', { + var remove = Icons.get('unfriend', { + class: 'cp-app-contacts-remove', title: Messages.contacts_remove }); - var leaveRoom = h('span.cp-app-contacts-remove.fa.fa-sign-out', { + var leaveRoom = Icons.get('logout', { + class: 'cp-app-contacts-remove', title: Messages.contacts_leaveRoom }); - var status = h('span.cp-app-contacts-status', { title: Messages.contacts_online }); @@ -820,6 +825,7 @@ define([ $container.removeClass('cp-app-contacts-initializing'); display(room.id); } + setTimeout( () => Lucide.createIcons()); }); }; diff --git a/www/contacts/inner.js b/www/contacts/inner.js index 5c56a1639..9a892a885 100644 --- a/www/contacts/inner.js +++ b/www/contacts/inner.js @@ -12,6 +12,7 @@ define([ '/common/messenger-ui.js', '/customize/messages.js', '/common/common-interface.js', + '/customize/fonts/lucide.js', 'css!/components/bootstrap/dist/css/bootstrap.min.css', 'css!/components/components-font-awesome/css/font-awesome.min.css', @@ -25,7 +26,8 @@ define([ h, MessengerUI, Messages, - UI + UI, + Lucide ) { var APP = {}; @@ -62,5 +64,6 @@ define([ common.setTabTitle(Messages.contacts); UI.removeLoadingScreen(); + Lucide.createIcons(); }); });