mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update preferences menu
This commit is contained in:
parent
d4504e80a2
commit
63e7a14025
3 changed files with 12 additions and 41 deletions
|
@ -62,23 +62,23 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="userSection hide">
|
<div>
|
||||||
<h1 class="headerUser"></h1>
|
<h1 class="headerUser"></h1>
|
||||||
<div class="paperList">
|
<div class="paperList">
|
||||||
<a href="selectserver.html" class="clearLink">
|
<a href="selectserver.html" class="clearLink selectServer hide">
|
||||||
<paper-icon-item>
|
<paper-icon-item>
|
||||||
<paper-fab mini icon="wifi" style="background-color: #444;" item-icon></paper-fab>
|
<paper-fab mini icon="wifi" style="background-color: #444;" item-icon></paper-fab>
|
||||||
<paper-item-body two-line>
|
<paper-item-body two-line>
|
||||||
<div>${HeaderSelectServer}</div>
|
<div>${HeaderSelectServer}</div>
|
||||||
</paper-item-body>
|
</paper-item-body>
|
||||||
</paper-icon-item>
|
</paper-icon-item>
|
||||||
|
</a>
|
||||||
<paper-icon-item class="btnLogout">
|
<paper-icon-item class="btnLogout">
|
||||||
<paper-fab mini icon="lock" style="background-color: #444;" item-icon></paper-fab>
|
<paper-fab mini icon="lock" style="background-color: #444;" item-icon></paper-fab>
|
||||||
<paper-item-body two-line>
|
<paper-item-body two-line>
|
||||||
<div>${ButtonSignOut}</div>
|
<div>${ButtonSignOut}</div>
|
||||||
</paper-item-body>
|
</paper-item-body>
|
||||||
</paper-icon-item>
|
</paper-icon-item>
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -38,10 +38,10 @@ pageIdOn('pageshow', 'myPreferencesMenuPage', function () {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (AppInfo.isNativeApp && browserInfo.safari) {
|
if (Dashboard.isConnectMode()) {
|
||||||
page.querySelector('.userSection').classList.remove('hide');
|
page.querySelector('.selectServer').classList.remove('hide');
|
||||||
} else {
|
} else {
|
||||||
page.querySelector('.userSection').classList.add('hide');
|
page.querySelector('.selectServer').classList.add('hide');
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
|
@ -704,36 +704,7 @@ var Dashboard = {
|
||||||
|
|
||||||
showUserFlyout: function () {
|
showUserFlyout: function () {
|
||||||
|
|
||||||
require(['jqmpanel'], function () {
|
Dashboard.navigate('mypreferencesmenu.html?userId=' + ApiClient.getCurrentUserId());
|
||||||
var html = '<div data-role="panel" data-position="right" data-display="overlay" id="userFlyout" data-position-fixed="true" data-theme="a">';
|
|
||||||
|
|
||||||
html += '<h3 class="userHeader">';
|
|
||||||
|
|
||||||
html += '</h3>';
|
|
||||||
|
|
||||||
html += '<form>';
|
|
||||||
|
|
||||||
html += '<p class="preferencesContainer"></p>';
|
|
||||||
|
|
||||||
html += '<p><button data-mini="true" type="button" onclick="Dashboard.logout();" data-icon="lock">' + Globalize.translate('ButtonSignOut') + '</button></p>';
|
|
||||||
|
|
||||||
html += '</form>';
|
|
||||||
html += '</div>';
|
|
||||||
|
|
||||||
$(document.body).append(html);
|
|
||||||
|
|
||||||
var userFlyout = document.querySelector('#userFlyout');
|
|
||||||
ImageLoader.lazyChildren(userFlyout);
|
|
||||||
|
|
||||||
$(userFlyout).panel({}).panel("open").on("panelclose", function () {
|
|
||||||
|
|
||||||
$(this).off("panelclose").remove();
|
|
||||||
});
|
|
||||||
|
|
||||||
ConnectionManager.user(window.ApiClient).then(function (user) {
|
|
||||||
Dashboard.updateUserFlyout(userFlyout, user);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
updateUserFlyout: function (elem, user) {
|
updateUserFlyout: function (elem, user) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue