Merge pull request #1095 from AStove/FixSideBarHidden

Hide sidebar for all widths according to state and correctly apply state
use-minification
Lorenz Hübschle-Schneider 6 years ago committed by GitHub
commit 3d042b125b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      css/glowingbear.css
  2. 9
      js/glowingbear.js

@ -264,6 +264,11 @@ input[type=text], input[type=password], #sendMessage {
width: 0; width: 0;
} }
#sidebar[data-state=hidden] {
transform: translate(-200px,0);
-webkit-transform: translate(-200px,0);
}
#nicklist { #nicklist {
position: fixed; position: fixed;
width: 100px; width: 100px;
@ -400,6 +405,7 @@ td.time {
margin-left: 0; margin-left: 0;
padding-left: 145px; padding-left: 145px;
} }
.footer.withnicklist { .footer.withnicklist {
padding-right: 100px; padding-right: 100px;
} }
@ -793,11 +799,6 @@ img.emojione {
-webkit-transform: translate(0,0); /* Safari */ -webkit-transform: translate(0,0); /* Safari */
} }
#sidebar[data-state=hidden] {
transform: translate(-200px,0);
-webkit-transform: translate(-200px,0);
}
.content[sidebar-state=visible] #bufferlines, .content[sidebar-state=visible] .footer { .content[sidebar-state=visible] #bufferlines, .content[sidebar-state=visible] .footer {
margin-left: 0px; margin-left: 0px;
transform: translate(200px,0); transform: translate(200px,0);

@ -326,11 +326,6 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
} }
}); });
$rootScope.wasMobileUi = false;
if (utils.isMobileUi()) {
$rootScope.wasMobileUi = true;
}
if (!settings.fontfamily) { if (!settings.fontfamily) {
if (utils.isMobileUi()) { if (utils.isMobileUi()) {
settings.fontfamily = 'sans-serif'; settings.fontfamily = 'sans-serif';
@ -583,12 +578,10 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
// Recalculation fails when not connected // Recalculation fails when not connected
if ($rootScope.connected) { if ($rootScope.connected) {
// Show the sidebar if switching away from mobile view, hide it when switching to mobile // Show the sidebar if switching away from mobile view, hide it when switching to mobile
// Wrap in a condition so we save ourselves the $apply if nothing changes (50ms or more) if (!utils.isMobileUi()) {
if ($scope.wasMobileUi && !utils.isMobileUi()) {
$scope.showSidebar(); $scope.showSidebar();
$scope.updateShowNicklist(); $scope.updateShowNicklist();
} }
$scope.wasMobileUi = utils.isMobileUi();
$scope.calculateNumLines(); $scope.calculateNumLines();
// if we're scrolled to the bottom, scroll down to the same position after the resize // if we're scrolled to the bottom, scroll down to the same position after the resize

Loading…
Cancel
Save