From 4fdb74d9d03c092a5b0293dd10641f355c6dfce7 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sun, 7 Mar 2021 15:33:29 +0100 Subject: [PATCH] Show current conversation image --- assets/css/components/conversations/windows.css | 4 ++++ assets/js/components/conversations/chatWindows.js | 13 ++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/assets/css/components/conversations/windows.css b/assets/css/components/conversations/windows.css index cc55bd5a..8c4fec11 100644 --- a/assets/css/components/conversations/windows.css +++ b/assets/css/components/conversations/windows.css @@ -95,6 +95,10 @@ transform: translate(0, 0); } +#conversationsElem .conversation-settings-pane .conversation-image-settings { + text-align: center; +} + #conversationsElem .conversation-settings-pane .conversation-image-settings .btn { margin: 5px; width: 100%; diff --git a/assets/js/components/conversations/chatWindows.js b/assets/js/components/conversations/chatWindows.js index 61788269..81b13951 100644 --- a/assets/js/components/conversations/chatWindows.js +++ b/assets/js/components/conversations/chatWindows.js @@ -730,10 +730,21 @@ const ConvChatWindow = { appendTo: settingsForm.rootElem, type: "div", class: "conversation-image-settings", - innerHTML: "

" + tr("Conversation image") + ":

" + innerHTML: "

" + tr("Conversation image") + "

" }) + // Show current + if (conversation.infos.logo != null) { + createElem2({ + appendTo: convImageSection, + type: "img", + src: conversation.infos.logo, + class: "current-image" + }) + } + + // Upload a new logo const newConvImagebutton = createElem2({ appendTo: convImageSection,