Node.js based forum software built for the modern web
chat controls now hidden instead of taking up space in chat modal
Julian Lam322d4052b06d
diff --git a/package.json b/package.jsonindex 9508cf07ec..00759d5780 100644--- a/package.json+++ b/package.json@@ -52,8 +52,8 @@"nodebb-plugin-spam-be-gone": "0.4.5","nodebb-rewards-essentials": "0.0.6","nodebb-theme-lavender": "3.0.8",- "nodebb-theme-persona": "4.0.77",- "nodebb-theme-vanilla": "5.0.46",+ "nodebb-theme-persona": "4.0.78",+ "nodebb-theme-vanilla": "5.0.47","nodebb-widget-essentials": "2.0.6","nodemailer": "2.0.0","nodemailer-sendmail-transport": "1.0.0",diff --git a/public/src/modules/chat.js b/public/src/modules/chat.jsindex d3d1ff0e02..8cd0e45d1c 100644--- a/public/src/modules/chat.js+++ b/public/src/modules/chat.js@@ -277,6 +277,13 @@ define('chat', ['components', 'taskbar', 'string', 'sounds', 'forum/chats', 'traChats.delete(messageId, data.roomId);});+ chatModal.find('[component="chat/controlsToggle"]').on('click', function() {+ var messagesEl = chatModal.find('[component="chat/messages"]');++ chatModal.find('[component="chat/controls"]').toggle();+ messagesEl.css('height', module.calculateChatListHeight(chatModal));+ });+Chats.addSinceHandler(chatModal.attr('roomId'), chatModal.find('.chat-content'), chatModal.find('[data-since]'));Chats.addRenameHandler(chatModal.attr('roomId'), chatModal.find('[component="chat/room/name"]'));@@ -375,7 +382,7 @@ define('chat', ['components', 'taskbar', 'string', 'sounds', 'forum/chats', 'trasinceHeight = modalEl.find('.since-bar').outerHeight(true),inputGroupHeight = modalEl.find('.input-group').outerHeight();- return totalHeight - padding - contentMargin - sinceHeight - inputGroupHeight;+ return totalHeight - padding - contentMargin - inputGroupHeight;};module.minimize = function(uuid) {