mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 19:38:20 -07:00
Hide QuickConnect options when not available
This commit is contained in:
parent
4a516337b5
commit
05b0a2518e
@ -38,7 +38,7 @@
|
|||||||
<span>${ButtonManualLogin}</span>
|
<span>${ButtonManualLogin}</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button is="emby-button" type="button" class="raised cancel block btnQuick">
|
<button is="emby-button" type="button" class="raised cancel block btnQuick hide">
|
||||||
<span>${ButtonUseQuickConnect}</span>
|
<span>${ButtonUseQuickConnect}</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
@ -263,6 +263,17 @@ import toast from '../../../components/toast/toast';
|
|||||||
}
|
}
|
||||||
|
|
||||||
const apiClient = getApiClient();
|
const apiClient = getApiClient();
|
||||||
|
|
||||||
|
apiClient.getQuickConnect('Status')
|
||||||
|
.then(status => {
|
||||||
|
if (status !== 'Unavailable') {
|
||||||
|
view.querySelector('.btnQuick').classList.remove('hide');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
console.debug('Failed to get QuickConnect status');
|
||||||
|
});
|
||||||
|
|
||||||
apiClient.getPublicUsers().then(function (users) {
|
apiClient.getPublicUsers().then(function (users) {
|
||||||
if (users.length) {
|
if (users.length) {
|
||||||
showVisualForm();
|
showVisualForm();
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
<a is="emby-linkbutton" data-ripple="false" href="#" style="display:block;padding:0;margin:0;" class="lnkQuickConnectPreferences listItem-border">
|
<a is="emby-linkbutton" data-ripple="false" href="#" style="display:block;padding:0;margin:0;" class="lnkQuickConnectPreferences listItem-border hide">
|
||||||
<div class="listItem">
|
<div class="listItem">
|
||||||
<em class="material-icons listItemIcon listItemIcon-transparent">tap_and_play</em>
|
<em class="material-icons listItemIcon listItemIcon-transparent">tap_and_play</em>
|
||||||
<div class="listItemBody">
|
<div class="listItemBody">
|
||||||
|
@ -41,6 +41,16 @@ export default function (view, params) {
|
|||||||
page.querySelector('.selectServer').classList.add('hide');
|
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) {
|
ApiClient.getUser(userId).then(function (user) {
|
||||||
page.querySelector('.headerUsername').innerHTML = user.Name;
|
page.querySelector('.headerUsername').innerHTML = user.Name;
|
||||||
if (user.Policy.IsAdministrator && !layoutManager.tv) {
|
if (user.Policy.IsAdministrator && !layoutManager.tv) {
|
||||||
|
Loading…
Reference in New Issue
Block a user