mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
adjust startup sequences
This commit is contained in:
parent
0a225d099d
commit
e2ebee7c31
7 changed files with 193 additions and 142 deletions
|
@ -4,7 +4,7 @@
|
|||
|
||||
var html = '<div class="viewMenuBar ui-bar-b">';
|
||||
|
||||
if ($.browser.safari && $.browser.mobile && window.navigator.standalone) {
|
||||
if (($.browser.safari && $.browser.mobile && window.navigator.standalone) || Dashboard.isRunningInCordova()) {
|
||||
html += '<a data-rel="back" data-role="none" href="#" class="headerButton headerButtonLeft headerBackButton"><div class="fa fa-arrow-circle-o-left"></div></a>';
|
||||
}
|
||||
|
||||
|
@ -253,38 +253,47 @@
|
|||
|
||||
html += '<div class="sidebarLinks librarySidebarLinks">';
|
||||
|
||||
//var userHref = user.localUser && user.localUser.Policy.EnableUserPreferenceAccess ?
|
||||
// 'mypreferencesdisplay.html?userId=' + user.localUser.Id :
|
||||
// (user.localUser ? 'index.html' : '#');
|
||||
var showUserAtTop = $.browser.mobile;
|
||||
|
||||
//var paddingLeft = user.imageUrl ? 'padding-left:.7em;' : '';
|
||||
//html += '<a style="margin-top:0;' + paddingLeft + 'display:block;color:#fff;text-decoration:none;font-size:16px;font-weight:400!important;background: #000;" href="' + userHref + '">';
|
||||
if (showUserAtTop) {
|
||||
|
||||
//var imgWidth = 44;
|
||||
var userHref = user.localUser && user.localUser.Policy.EnableUserPreferenceAccess ?
|
||||
'mypreferencesdisplay.html?userId=' + user.localUser.Id :
|
||||
(user.localUser ? 'index.html' : '#');
|
||||
|
||||
//if (user.imageUrl) {
|
||||
// var url = user.imageUrl;
|
||||
var paddingLeft = user.imageUrl ? 'padding-left:.7em;' : '';
|
||||
html += '<a style="margin-top:0;' + paddingLeft + 'display:block;color:#fff;text-decoration:none;font-size:16px;font-weight:400!important;background: #000;" href="' + userHref + '">';
|
||||
|
||||
// if (user.supportsImageParams) {
|
||||
// url += "&width=" + (imgWidth * Math.max(devicePixelRatio || 1, 2));
|
||||
// }
|
||||
var imgWidth = 44;
|
||||
|
||||
// html += '<img style="max-width:' + imgWidth + 'px;vertical-align:middle;margin-right:.8em;border-radius: 50px;" src="' + url + '" />';
|
||||
//} else {
|
||||
// html += '<span class="fa fa-user sidebarLinkIcon"></span>';
|
||||
//}
|
||||
if (user.imageUrl) {
|
||||
var url = user.imageUrl;
|
||||
|
||||
//html += user.name;
|
||||
//html += '</a>';
|
||||
if (user.supportsImageParams) {
|
||||
url += "&width=" + (imgWidth * Math.max(devicePixelRatio || 1, 2));
|
||||
}
|
||||
|
||||
html += '<img style="max-width:' + imgWidth + 'px;vertical-align:middle;margin-right:.8em;border-radius: 50px;" src="' + url + '" />';
|
||||
} else {
|
||||
html += '<span class="fa fa-user sidebarLinkIcon"></span>';
|
||||
}
|
||||
|
||||
html += user.name;
|
||||
html += '</a>';
|
||||
}
|
||||
|
||||
var homeHref = ConnectionManager.currentApiClient() ? 'index.html' : 'selectserver.html';
|
||||
|
||||
html += '<a class="lnkMediaFolder sidebarLink" style="margin-top:.5em;padding-left:1em;display:block;color:#fff;text-decoration:none;" href="' + homeHref + '">';
|
||||
if (showUserAtTop) {
|
||||
html += '<a class="lnkMediaFolder sidebarLink" href="' + homeHref + '"><span class="fa fa-home sidebarLinkIcon"></span><span>' + Globalize.translate('ButtonHome') + '</span></a>';
|
||||
} else {
|
||||
html += '<a class="lnkMediaFolder sidebarLink" style="margin-top:.5em;padding-left:1em;display:block;color:#fff;text-decoration:none;" href="' + homeHref + '">';
|
||||
|
||||
html += '<img style="max-width:36px;vertical-align:middle;margin-right:1em;" src="css/images/mblogoicon.png" />';
|
||||
html += '<img style="max-width:36px;vertical-align:middle;margin-right:1em;" src="css/images/mblogoicon.png" />';
|
||||
|
||||
html += Globalize.translate('ButtonHome');
|
||||
html += '</a>';
|
||||
html += Globalize.translate('ButtonHome');
|
||||
html += '</a>';
|
||||
}
|
||||
|
||||
html += '<div class="libraryMenuDivider" style="margin-top:0;"></div>';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue