mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
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 { appRouter } from '../components/appRouter';
|
||||||
import { appHost } from '../components/apphost';
|
import { appHost } from '../components/apphost';
|
||||||
import { playbackManager } from '../components/playback/playbackmanager';
|
import { playbackManager } from '../components/playback/playbackmanager';
|
||||||
|
import { pluginManager } from '../components/pluginManager';
|
||||||
import groupSelectionMenu from '../plugins/syncPlay/ui/groupSelectionMenu';
|
import groupSelectionMenu from '../plugins/syncPlay/ui/groupSelectionMenu';
|
||||||
import browser from './browser';
|
import browser from './browser';
|
||||||
import globalize from './globalize';
|
import globalize from './globalize';
|
||||||
|
@ -154,8 +155,14 @@ import '../assets/css/flexstyles.scss';
|
||||||
|
|
||||||
const policy = user.Policy ? user.Policy : user.localUser.Policy;
|
const policy = user.Policy ? user.Policy : user.localUser.Policy;
|
||||||
|
|
||||||
const apiClient = getCurrentApiClient();
|
if (
|
||||||
if (headerSyncButton && policy?.SyncPlayAccess !== 'None' && apiClient.isMinServerVersion('10.6.0')) {
|
// 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');
|
headerSyncButton.classList.remove('hide');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue