Commit 849d6b26 authored by JC Brand's avatar JC Brand

Update the minimized chats widget

parent 9c0b7c71
...@@ -6233,19 +6233,28 @@ body.reset { ...@@ -6233,19 +6233,28 @@ body.reset {
border-radius: 4px; } border-radius: 4px; }
#conversejs:not(.fullscreen) #minimized-chats { #conversejs:not(.fullscreen) #minimized-chats {
order: 100;
position: relative; position: relative;
width: 100%; width: 100%;
min-height: 1px; min-height: 1px;
padding-right: 15px; padding-right: 15px;
padding-left: 15px; padding-left: 15px;
flex: 0 0 8.3333333333%; flex: 0 0 16.6666666667%;
max-width: 8.3333333333%; max-width: 16.6666666667%;
margin-bottom: -1em; margin-bottom: -1em;
border-top-left-radius: 4px; border-top-left-radius: 4px;
border-top-right-radius: 4px; border-top-right-radius: 4px;
color: white; color: white;
margin-right: 0.5em; margin-right: 0.5em;
padding: 0; } padding: 0; }
@media (min-width: 576px) {
#conversejs:not(.fullscreen) #minimized-chats {
flex: 0 0 16.6666666667%;
max-width: 16.6666666667%; } }
@media (min-width: 992px) {
#conversejs:not(.fullscreen) #minimized-chats {
flex: 0 0 8.3333333333%;
max-width: 8.3333333333%; } }
#conversejs:not(.fullscreen) #minimized-chats .badge { #conversejs:not(.fullscreen) #minimized-chats .badge {
bottom: 8px; bottom: 8px;
border: 1px solid #818479; } border: 1px solid #818479; }
...@@ -6261,7 +6270,8 @@ body.reset { ...@@ -6261,7 +6270,8 @@ body.reset {
white-space: nowrap; white-space: nowrap;
overflow-y: hidden; overflow-y: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
display: block; } display: block;
height: 50px; }
#conversejs:not(.fullscreen) #minimized-chats a.restore-chat { #conversejs:not(.fullscreen) #minimized-chats a.restore-chat {
padding: 1px 0 1px 5px; padding: 1px 0 1px 5px;
color: white; color: white;
...@@ -6276,7 +6286,8 @@ body.reset { ...@@ -6276,7 +6286,8 @@ body.reset {
color: white; } color: white; }
#conversejs:not(.fullscreen) #minimized-chats .minimized-chats-flyout { #conversejs:not(.fullscreen) #minimized-chats .minimized-chats-flyout {
flex-direction: column-reverse; flex-direction: column-reverse;
width: 100%; } width: 100%;
bottom: 48px; }
#conversejs:not(.fullscreen) #minimized-chats .minimized-chats-flyout .chat-head { #conversejs:not(.fullscreen) #minimized-chats .minimized-chats-flyout .chat-head {
padding: 0.3em; padding: 0.3em;
border-radius: 4px; border-radius: 4px;
......
...@@ -218,10 +218,10 @@ ...@@ -218,10 +218,10 @@
</div> </div>
<div id="minimized-chats"> <div id="minimized-chats">
<div class="flyout minimized-chats-flyout row"> <a id="toggle-minimized-chats" href="#" class="row no-gutters">
<a id="toggle-minimized-chats" href="#" class="row no-gutters"> <span class="badge badge-light">322</span> Minimized
<span class="badge badge-light">322</span> Minimized </a>
</a> <div class="flyout minimized-chats-flyout row no-gutters">
<div class="chat-head chat-head-chatroom row no-gutters"> <div class="chat-head chat-head-chatroom row no-gutters">
<a href="#" class="restore-chat w-100 align-self-center" title="Click to maximize this chat"> <a href="#" class="restore-chat w-100 align-self-center" title="Click to maximize this chat">
<span class="badge badge-light">42</span> <span class="badge badge-light">42</span>
......
#conversejs:not(.fullscreen) { #conversejs:not(.fullscreen) {
#minimized-chats { #minimized-chats {
order: 100;
@include make-col-ready(); @include make-col-ready();
@include make-col(1); @include media-breakpoint-up(xs) {
@include make-col(2);
}
@include media-breakpoint-up(sm) {
@include make-col(2);
}
@include media-breakpoint-up(lg) {
@include make-col(1);
}
margin-bottom: -2*$chat-gutter; margin-bottom: -2*$chat-gutter;
border-top-left-radius: $chatbox-border-radius; border-top-left-radius: $chatbox-border-radius;
...@@ -28,6 +37,7 @@ ...@@ -28,6 +37,7 @@
overflow-y: hidden; overflow-y: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
display: block; display: block;
height: 50px;
} }
a.restore-chat { a.restore-chat {
...@@ -50,6 +60,7 @@ ...@@ -50,6 +60,7 @@
.minimized-chats-flyout { .minimized-chats-flyout {
flex-direction: column-reverse; flex-direction: column-reverse;
width: 100%; width: 100%;
bottom: 48px;
.chat-head { .chat-head {
padding: 0.3em; padding: 0.3em;
......
...@@ -318,7 +318,7 @@ ...@@ -318,7 +318,7 @@
_converse.MinimizedChatBoxView = Backbone.NativeView.extend({ _converse.MinimizedChatBoxView = Backbone.NativeView.extend({
tagName: 'div', tagName: 'div',
className: 'chat-head', className: 'chat-head row no-gutters',
events: { events: {
'click .close-chatbox-button': 'close', 'click .close-chatbox-button': 'close',
'click .restore-chat': 'restore' 'click .restore-chat': 'restore'
...@@ -389,7 +389,7 @@ ...@@ -389,7 +389,7 @@
render () { render () {
if (!this.el.parentElement) { if (!this.el.parentElement) {
this.el.innerHTML = tpl_chats_panel(); this.el.innerHTML = tpl_chats_panel();
_converse.chatboxviews.el.appendChild(this.el); _converse.chatboxviews.insertRowColumn(this.el);
} }
if (this.keys().length === 0) { if (this.keys().length === 0) {
this.el.classList.add('hidden'); this.el.classList.add('hidden');
......
<a id="toggle-minimized-chats" href="#"></a> <a id="toggle-minimized-chats" href="#" class="row no-gutters"></a>
<div class="flyout minimized-chats-flyout"></div> <div class="flyout minimized-chats-flyout row no-gutters"></div>
{{{o.Minimized}}} <span id="minimized-count">({{{o.num_minimized}}})</span> <span class="badge badge-light">{{{o.num_minimized}}}</span> {{{o.Minimized}}}
<span class="unread-message-count <span class="unread-message-count
{[ if (!o.num_unread) { ]} unread-message-count-hidden {[ } ]}" {[ if (!o.num_unread) { ]} unread-message-count-hidden {[ } ]}"
href="#">{{{o.num_unread}}}</span> href="#">{{{o.num_unread}}}</span>
<a class="chatbox-btn close-chatbox-button icon-close"></a> <a class="chatbox-btn close-chatbox-button icon-close"></a>
<a class="chat-head-message-count <a href="#" class="restore-chat w-100 align-self-center" title="{{{o.tooltip}}}">
{[ if (!o.num_unread) { ]} chat-head-message-count-hidden {[ } ]}" {[ if (!o.num_unread) { ]}
href="#">{{{o.num_unread}}}</a> <span class="badge badge-light">{{{o.num_unread}}}2</span>
<a href="#" class="restore-chat" title="{{{o.tooltip}}}"> {[ } ]}"
{{{o. title }}} {{{o. title }}}
</a> </a>
...@@ -321,7 +321,6 @@ ...@@ -321,7 +321,6 @@
steps = duration/17; // We assume 17ms per animation which is ~60FPS steps = duration/17; // We assume 17ms per animation which is ~60FPS
let height = original_height; let height = original_height;
debugger;
el.style.overflow = 'hidden'; el.style.overflow = 'hidden';
function draw () { function draw () {
......
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