mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Hide QuickConnect options when not available
This commit is contained in:
parent
4a516337b5
commit
05b0a2518e
4 changed files with 24 additions and 3 deletions
|
@ -41,6 +41,16 @@ export default function (view, params) {
|
|||
page.querySelector('.selectServer').classList.add('hide');
|
||||
}
|
||||
|
||||
ApiClient.getQuickConnect('Status')
|
||||
.then(status => {
|
||||
if (status !== 'Unavailable') {
|
||||
page.querySelector('.lnkQuickConnectPreferences').classList.remove('hide');
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
console.debug('Failed to get QuickConnect status');
|
||||
});
|
||||
|
||||
ApiClient.getUser(userId).then(function (user) {
|
||||
page.querySelector('.headerUsername').innerHTML = user.Name;
|
||||
if (user.Policy.IsAdministrator && !layoutManager.tv) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue