Merge pull request #551 from dkanada/header

Remove dashboard icon from header
This commit is contained in:
dkanada 2019-11-07 01:04:48 +09:00 committed by GitHub
commit 3a4892d71f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,14 +52,6 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
headerSearchButton.classList.remove("hide"); headerSearchButton.classList.remove("hide");
} }
if (headerSettingsButton) {
if (user.localUser.Policy.IsAdministrator) {
headerSettingsButton.classList.remove("hide");
} else {
headerSettingsButton.classList.add("hide");
}
}
headerCastButton.classList.remove("hide"); headerCastButton.classList.remove("hide");
} else { } else {
headerHomeButton.classList.add("hide"); headerHomeButton.classList.add("hide");
@ -68,10 +60,6 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
if (headerSearchButton) { if (headerSearchButton) {
headerSearchButton.classList.add("hide"); headerSearchButton.classList.add("hide");
} }
if (headerSettingsButton) {
headerSettingsButton.classList.add("hide");
}
} }
requiresUserRefresh = false; requiresUserRefresh = false;
@ -95,10 +83,6 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
Dashboard.navigate("mypreferencesmenu.html"); Dashboard.navigate("mypreferencesmenu.html");
} }
function onSettingsClick(e) {
Dashboard.navigate("dashboard.html");
}
function onHeaderHomeButtonClick() { function onHeaderHomeButtonClick() {
Dashboard.navigate("home.html"); Dashboard.navigate("home.html");
} }
@ -122,12 +106,9 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
headerUserButton.addEventListener("click", onHeaderUserButtonClick); headerUserButton.addEventListener("click", onHeaderUserButtonClick);
headerHomeButton.addEventListener("click", onHeaderHomeButtonClick); headerHomeButton.addEventListener("click", onHeaderHomeButtonClick);
initHeadRoom(skinHeader);
headerCastButton.addEventListener("click", onCastButtonClicked); headerCastButton.addEventListener("click", onCastButtonClicked);
if (headerSettingsButton) { initHeadRoom(skinHeader);
headerSettingsButton.addEventListener("click", onSettingsClick);
}
} }
function onCastButtonClicked() { function onCastButtonClicked() {
@ -747,7 +728,6 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
var headerBackButton; var headerBackButton;
var headerUserButton; var headerUserButton;
var currentUser; var currentUser;
var headerSettingsButton;
var headerCastButton; var headerCastButton;
var headerSearchButton; var headerSearchButton;
var enableLibraryNavDrawer = !layoutManager.tv; var enableLibraryNavDrawer = !layoutManager.tv;
@ -873,23 +853,20 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
html += '<button is="paper-icon-button-light" class="headerCastButton castButton headerButton headerButtonRight hide"><i class="md-icon">&#xE307;</i></button>'; html += '<button is="paper-icon-button-light" class="headerCastButton castButton headerButton headerButtonRight hide"><i class="md-icon">&#xE307;</i></button>';
html += '<button type="button" is="paper-icon-button-light" class="headerButton headerButtonRight headerSearchButton hide"><i class="md-icon">&#xE8B6;</i></button>'; html += '<button type="button" is="paper-icon-button-light" class="headerButton headerButtonRight headerSearchButton hide"><i class="md-icon">&#xE8B6;</i></button>';
html += '<button is="paper-icon-button-light" class="headerButton headerButtonRight headerUserButton hide"><i class="md-icon">&#xE7FD;</i></button>'; html += '<button is="paper-icon-button-light" class="headerButton headerButtonRight headerUserButton hide"><i class="md-icon">&#xE7FD;</i></button>';
if (!layoutManager.mobile) {
html += '<button is="paper-icon-button-light" class="headerButton headerButtonRight headerSettingsButton hide"><i class="md-icon">dashboard</i></button>';
}
html += "</div>"; html += "</div>";
html += "</div>"; html += "</div>";
html += '<div class="headerTabs sectionTabs hide">'; html += '<div class="headerTabs sectionTabs hide">';
html += "</div>"; html += "</div>";
skinHeader.classList.add("skinHeader-withBackground"); skinHeader.classList.add("skinHeader-withBackground");
skinHeader.classList.add("skinHeader-blurred");
skinHeader.innerHTML = html; skinHeader.innerHTML = html;
headerHomeButton = skinHeader.querySelector(".headerHomeButton"); headerHomeButton = skinHeader.querySelector(".headerHomeButton");
headerUserButton = skinHeader.querySelector(".headerUserButton"); headerUserButton = skinHeader.querySelector(".headerUserButton");
headerSettingsButton = skinHeader.querySelector(".headerSettingsButton");
headerCastButton = skinHeader.querySelector(".headerCastButton"); headerCastButton = skinHeader.querySelector(".headerCastButton");
headerSearchButton = skinHeader.querySelector(".headerSearchButton"); headerSearchButton = skinHeader.querySelector(".headerSearchButton");
skinHeader.classList.add("skinHeader-blurred");
lazyLoadViewMenuBarImages(); lazyLoadViewMenuBarImages();
bindMenuEvents(); bindMenuEvents();
})(); })();