Commit 120f02d7 authored by Ariel Fuggini's avatar Ariel Fuggini Committed by JC Brand

Minimize chat when clicking on title bar

parent d77f8d9f
......@@ -483,8 +483,12 @@
min-height: calc(var(--overlayed-chat-height) / 2);
}
.chat-head {
cursor: pointer;
min-height: var(--overlayed-chat-head-height);
}
.minimized-chats-flyout .chat-head {
cursor: default;
}
.chat-textarea {
max-height: var(--overlayed-max-chat-textarea-height);
}
......
......@@ -29,7 +29,8 @@ export class BaseDropdown extends CustomElement {
this.button.setAttribute('aria-expanded', true);
}
toggleMenu () {
toggleMenu (event) {
event.stopPropagation();
if (u.hasClass('show', this.menu)) {
this.hideMenu();
} else {
......
......@@ -456,7 +456,8 @@ converse.plugins.add('converse-muc-views', {
'keyup .chat-textarea': 'onKeyUp',
'mousedown .dragresize-occupants-left': 'onStartResizeOccupants',
'paste .chat-textarea': 'onPaste',
'submit .muc-nickname-form': 'submitNickname'
'submit .muc-nickname-form': 'submitNickname',
'click .converse-overlayed .chat-head-chatroom': 'minimize'
},
async initialize () {
......@@ -990,6 +991,7 @@ converse.plugins.add('converse-muc-views', {
'i18n_text': __('Leave'),
'i18n_title': __('Leave and close this groupchat'),
'handler': async ev => {
ev.stopPropagation();
const messages = [__('Are you sure you want to leave this groupchat?')];
const result = await api.confirm(__('Confirm'), messages);
result && this.close(ev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment