prototype toolbar collapse

This commit is contained in:
ansuz 2021-07-16 14:59:27 +05:30
parent 99323f0560
commit d926930b4c
2 changed files with 17 additions and 0 deletions

View File

@ -431,6 +431,10 @@
}
}
.cp-toolbar-top {
&.toolbar-hidden {
display: none !important;
}
@media screen and (max-width: @browser_media-medium-screen),
screen and (max-height: 500px) {
flex-wrap: wrap;

View File

@ -455,6 +455,17 @@ MessengerUI, Messages, Pages) {
return $container;
};
createCollapse = function (toolbar) {
var $button = $(h('button', [
h('i.fa.fa-compress'),
h('span.cp-button-name', "COLLAPSE"), // XXX
]));
toolbar.$bottomR.append($button);
$button.click(function () {
toolbar.$top.toggleClass('toolbar-hidden');
});
};
var initChat = function (toolbar) {
var $container = $('<div>', {
id: 'cp-app-contacts-container',
@ -1334,6 +1345,7 @@ MessengerUI, Messages, Pages) {
// Create the subelements
var tb = {};
tb['userlist'] = createUserList;
tb['collapse'] = createCollapse; // XXX
tb['chat'] = createChat;
tb['share'] = createShare;
tb['access'] = createAccess;
@ -1355,6 +1367,7 @@ MessengerUI, Messages, Pages) {
tb['pad'] = function () {
toolbar.$file.show();
addElement([
'collapse', // XXX
'chat', 'userlist', 'title', 'useradmin', 'spinner',
'newpad', 'share', 'access', 'limit', 'unpinnedWarning',
'notifications'