Add check that SyncPlay plugin is enabled
This commit is contained in:
parent
496508ee4d
commit
3a07d34884
1 changed files with 9 additions and 2 deletions
|
@ -9,6 +9,7 @@ import viewManager from '../components/viewManager/viewManager';
|
|||
import { appRouter } from '../components/appRouter';
|
||||
import { appHost } from '../components/apphost';
|
||||
import { playbackManager } from '../components/playback/playbackmanager';
|
||||
import { pluginManager } from '../components/pluginManager';
|
||||
import groupSelectionMenu from '../plugins/syncPlay/ui/groupSelectionMenu';
|
||||
import browser from './browser';
|
||||
import globalize from './globalize';
|
||||
|
@ -154,8 +155,14 @@ import '../assets/css/flexstyles.scss';
|
|||
|
||||
const policy = user.Policy ? user.Policy : user.localUser.Policy;
|
||||
|
||||
const apiClient = getCurrentApiClient();
|
||||
if (headerSyncButton && policy?.SyncPlayAccess !== 'None' && apiClient.isMinServerVersion('10.6.0')) {
|
||||
if (
|
||||
// Button is present
|
||||
headerSyncButton
|
||||
// SyncPlay plugin is loaded
|
||||
&& pluginManager.plugins.filter(plugin => plugin.id === 'syncplay').length > 0
|
||||
// SyncPlay enabled for user
|
||||
&& policy?.SyncPlayAccess !== 'None'
|
||||
) {
|
||||
headerSyncButton.classList.remove('hide');
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue