mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Fix currentViewId
This commit is contained in:
parent
ab02f210ca
commit
11256c0171
3 changed files with 10 additions and 11 deletions
|
@ -155,10 +155,9 @@
|
|||
<div class="mainDrawer-scrollContainer scrollContainer focuscontainer-y"></div>
|
||||
</div>
|
||||
<div class="skinHeader focuscontainer-x"></div>
|
||||
<div class="mainAnimatedPages skinBody">
|
||||
<div id="reactRoot" class="mainAnimatedPages skinBody">
|
||||
<div class="splashLogo"></div>
|
||||
</div>
|
||||
<div id="reactRoot"></div>
|
||||
<div class="mainDrawerHandle"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -47,7 +47,7 @@ const AppRoutes = () => (
|
|||
}
|
||||
/>
|
||||
<Route
|
||||
path='userLibraryAccessPage.html'
|
||||
path='userlibraryaccess.html'
|
||||
element={
|
||||
<ConnectionRequired>
|
||||
<UserLibraryAccessPage />
|
||||
|
|
|
@ -355,14 +355,14 @@ import '../assets/css/flexstyles.scss';
|
|||
}
|
||||
}
|
||||
|
||||
function refreshDashboardInfoInDrawer(apiClient) {
|
||||
function refreshDashboardInfoInDrawer(page, apiClient) {
|
||||
currentDrawerType = 'admin';
|
||||
loadNavDrawer();
|
||||
|
||||
if (navDrawerScrollContainer.querySelector('.adminDrawerLogo')) {
|
||||
updateDashboardMenuSelectedItem();
|
||||
updateDashboardMenuSelectedItem(page);
|
||||
} else {
|
||||
createDashboardMenu(apiClient);
|
||||
createDashboardMenu(page, apiClient);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -370,9 +370,9 @@ import '../assets/css/flexstyles.scss';
|
|||
return window.location.href.toString().toLowerCase().indexOf(url.toLowerCase()) !== -1;
|
||||
}
|
||||
|
||||
function updateDashboardMenuSelectedItem() {
|
||||
function updateDashboardMenuSelectedItem(page) {
|
||||
const links = navDrawerScrollContainer.querySelectorAll('.navMenuOption');
|
||||
const currentViewId = viewManager.currentView().id;
|
||||
const currentViewId = page.id;
|
||||
|
||||
for (let i = 0, length = links.length; i < length; i++) {
|
||||
let link = links[i];
|
||||
|
@ -590,7 +590,7 @@ import '../assets/css/flexstyles.scss';
|
|||
});
|
||||
}
|
||||
|
||||
function createDashboardMenu(apiClient) {
|
||||
function createDashboardMenu(page, apiClient) {
|
||||
return getToolsMenuHtml(apiClient).then(function (toolsMenuHtml) {
|
||||
let html = '';
|
||||
html += '<a class="adminDrawerLogo clearLink" is="emby-linkbutton" href="#/home.html">';
|
||||
|
@ -598,7 +598,7 @@ import '../assets/css/flexstyles.scss';
|
|||
html += '</a>';
|
||||
html += toolsMenuHtml;
|
||||
navDrawerScrollContainer.innerHTML = html;
|
||||
updateDashboardMenuSelectedItem();
|
||||
updateDashboardMenuSelectedItem(page);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1017,7 +1017,7 @@ import '../assets/css/flexstyles.scss';
|
|||
mainDrawerButton.classList.remove('hide');
|
||||
}
|
||||
|
||||
refreshDashboardInfoInDrawer(apiClient);
|
||||
refreshDashboardInfoInDrawer(page, apiClient);
|
||||
} else {
|
||||
if (mainDrawerButton) {
|
||||
if (enableLibraryNavDrawer || (isHomePage && enableLibraryNavDrawerHome)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue