Skip to content

Commit

Permalink
Merge pull request #932 from MrTimscampi/mobile-fixes
Browse files Browse the repository at this point in the history
Show hamburger menu on mobile and fix title padding

(cherry picked from commit c49c45e)
Signed-off-by: Joshua M. Boniface <[email protected]>
  • Loading branch information
dkanada authored and joshuaboniface committed Mar 22, 2020
1 parent 253b0d9 commit 44c7b75
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
13 changes: 5 additions & 8 deletions src/assets/css/librarybrowser.css
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
display: -webkit-inline-box;
display: -webkit-inline-flex;
display: inline-flex;
margin: 0.3em 0 0 0.5em;
margin: 0 0 0 0.5em;
height: 1.7em;
-webkit-box-align: center;
-webkit-align-items: center;
Expand All @@ -128,6 +128,10 @@
margin-top: 0;
}

.layout-mobile .pageTitleWithDefaultLogo {
background-image: url(../img/icon-transparent.png);
}

.headerLeft,
.skinHeader {
display: -webkit-box;
Expand Down Expand Up @@ -242,7 +246,6 @@
}

@media all and (min-width: 40em) {
.dashboardDocument .adminDrawerLogo,
.dashboardDocument .mainDrawerButton {
display: none !important;
}
Expand All @@ -268,12 +271,6 @@
}
}

@media all and (max-width: 60em) {
.libraryDocument .mainDrawerButton {
display: none;
}
}

@media all and (max-width: 84em) {
.withSectionTabs .headerTop {
padding-bottom: 0.55em;
Expand Down
7 changes: 4 additions & 3 deletions src/scripts/librarymenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
}

if (user && user.localUser) {
if (headerHomeButton) {
if (headerHomeButton && !layoutManager.mobile) {
headerHomeButton.classList.remove("hide");
}

Expand Down Expand Up @@ -788,7 +788,7 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
var headerCastButton;
var headerSearchButton;
var headerAudioPlayerButton;
var enableLibraryNavDrawer = !layoutManager.tv;
var enableLibraryNavDrawer = layoutManager.desktop;
var skinHeader = document.querySelector(".skinHeader");
var requiresUserRefresh = true;
var lastOpenTime = new Date().getTime();
Expand Down Expand Up @@ -863,6 +863,7 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
pageClassOn("pageshow", "page", function (e) {
var page = this;
var isDashboardPage = page.classList.contains("type-interior");
var isHomePage = page.classList.contains("homePage");
var isLibraryPage = !isDashboardPage && page.classList.contains("libraryPage");
var apiClient = getCurrentApiClient();

Expand All @@ -874,7 +875,7 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
refreshDashboardInfoInDrawer(apiClient);
} else {
if (mainDrawerButton) {
if (enableLibraryNavDrawer) {
if (enableLibraryNavDrawer || isHomePage) {
mainDrawerButton.classList.remove("hide");
} else {
mainDrawerButton.classList.add("hide");
Expand Down

0 comments on commit 44c7b75

Please sign in to comment.