mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update form
This commit is contained in:
parent
077f440dcc
commit
14519607f4
29 changed files with 306 additions and 188 deletions
|
@ -47,7 +47,7 @@
|
|||
html += '</div>';
|
||||
html += '</div>';
|
||||
|
||||
html += '<div class="viewMenuBarTabs hiddenScrollX hide">';
|
||||
html += '<div class="viewMenuBarTabs hiddenScrollX">';
|
||||
html += '</div>';
|
||||
|
||||
var viewMenuBar = document.createElement('div');
|
||||
|
@ -652,45 +652,6 @@
|
|||
return getParameterByName('topParentId') || null;
|
||||
}
|
||||
|
||||
function slideDownToShow(elem) {
|
||||
|
||||
if (!elem.classList.contains('hide')) {
|
||||
return;
|
||||
}
|
||||
|
||||
elem.classList.remove('hide');
|
||||
requestAnimationFrame(function () {
|
||||
|
||||
var keyframes = [
|
||||
{ height: '0', offset: 0 },
|
||||
{ height: elem.clientHeight + 'px', offset: 1 }];
|
||||
var timing = { duration: 200, iterations: 1, easing: 'ease-out' };
|
||||
elem.animate(keyframes, timing);
|
||||
});
|
||||
}
|
||||
|
||||
function slideUpToHide(elem) {
|
||||
|
||||
if (elem.classList.contains('hide')) {
|
||||
return;
|
||||
}
|
||||
|
||||
var height = elem.clientHeight;
|
||||
|
||||
requestAnimationFrame(function () {
|
||||
|
||||
elem.innerHTML = '';
|
||||
|
||||
var keyframes = [
|
||||
{ height: height + 'px', offset: 0 },
|
||||
{ height: '0', offset: 1 }];
|
||||
var timing = { duration: 200, iterations: 1, easing: 'ease-out' };
|
||||
elem.animate(keyframes, timing).onfinish = function () {
|
||||
elem.classList.add('hide');
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
window.LibraryMenu = {
|
||||
getTopParentId: getTopParentId,
|
||||
|
||||
|
@ -766,8 +727,8 @@
|
|||
|
||||
mainDrawerPanel.classList.remove('withTallToolbar');
|
||||
viewMenuBarTabs = document.querySelector('.viewMenuBarTabs');
|
||||
slideUpToHide(viewMenuBarTabs);
|
||||
//viewMenuBarTabs.innerHTML = '';
|
||||
viewMenuBarTabs.innerHTML = '';
|
||||
viewMenuBarTabs.classList.add('hide');
|
||||
LibraryMenu.tabType = null;
|
||||
}
|
||||
return;
|
||||
|
@ -775,35 +736,28 @@
|
|||
|
||||
viewMenuBarTabs = document.querySelector('.viewMenuBarTabs');
|
||||
|
||||
if (!LibraryMenu.tabType) {
|
||||
viewMenuBarTabs.classList.remove('hide');
|
||||
}
|
||||
|
||||
if (LibraryMenu.tabType != type) {
|
||||
|
||||
require(['paper-tabs'], function() {
|
||||
require(['paper-tabs'], function () {
|
||||
|
||||
var noInk = browserInfo.animate ? '' : ' noink';
|
||||
|
||||
viewMenuBarTabs.innerHTML = '<paper-tabs selected="' + selectedIndex + '" hidescrollbuttons ' + noInk + '>' + builder().map(function(t) {
|
||||
viewMenuBarTabs.innerHTML = '<paper-tabs selected="' + selectedIndex + '" hidescrollbuttons ' + noInk + '>' + builder().map(function (t) {
|
||||
|
||||
return '<paper-tab link><a class="clearLink paperTabLink" href="' + t.href + '"><div>' + t.name + '</div></a></paper-tab>';
|
||||
|
||||
}).join('') + '</paper-tabs>';
|
||||
mainDrawerPanel.classList.add('withTallToolbar');
|
||||
|
||||
if (!LibraryMenu.tabType) {
|
||||
//viewMenuBarTabs.classList.remove('hide');
|
||||
slideDownToShow(viewMenuBarTabs);
|
||||
}
|
||||
|
||||
LibraryMenu.tabType = type;
|
||||
});
|
||||
return;
|
||||
} else {
|
||||
viewMenuBarTabs.querySelector('paper-tabs').selected = selectedIndex;
|
||||
|
||||
if (!LibraryMenu.tabType) {
|
||||
//viewMenuBarTabs.classList.remove('hide');
|
||||
slideDownToShow(viewMenuBarTabs);
|
||||
}
|
||||
}
|
||||
|
||||
viewMenuBarTabs.querySelector('paper-tabs').selected = selectedIndex;
|
||||
LibraryMenu.tabType = type;
|
||||
},
|
||||
|
||||
|
@ -1180,7 +1134,6 @@
|
|||
});
|
||||
|
||||
Events.on(ConnectionManager, 'localusersignedin', function (e, user) {
|
||||
requiresDrawerRefresh = true;
|
||||
setDrawerClass();
|
||||
var apiClient = ConnectionManager.getApiClient(user.ServerId);
|
||||
ConnectionManager.user(ConnectionManager.getApiClient(user.ServerId)).then(function (user) {
|
||||
|
@ -1195,14 +1148,8 @@
|
|||
}
|
||||
});
|
||||
|
||||
Events.on(ConnectionManager, 'localusersignedout', function () {
|
||||
requiresDrawerRefresh = true;
|
||||
updateUserInHeader();
|
||||
});
|
||||
|
||||
Events.on(MediaController, 'playerchange', function () {
|
||||
updateCastIcon();
|
||||
});
|
||||
Events.on(ConnectionManager, 'localusersignedout', updateUserInHeader);
|
||||
Events.on(MediaController, 'playerchange', updateCastIcon);
|
||||
|
||||
setDrawerClass();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue