fix: disable user-import from mediaserver for non-plex mediaservers until implemented
This commit is contained in:
@@ -16,6 +16,7 @@ import { defineMessages, useIntl } from 'react-intl';
|
|||||||
import { useToasts } from 'react-toast-notifications';
|
import { useToasts } from 'react-toast-notifications';
|
||||||
import useSWR from 'swr';
|
import useSWR from 'swr';
|
||||||
import * as Yup from 'yup';
|
import * as Yup from 'yup';
|
||||||
|
import { MediaServerType } from '../../../server/constants/server';
|
||||||
import type { UserResultsResponse } from '../../../server/interfaces/api/userInterfaces';
|
import type { UserResultsResponse } from '../../../server/interfaces/api/userInterfaces';
|
||||||
import { hasPermission } from '../../../server/lib/permissions';
|
import { hasPermission } from '../../../server/lib/permissions';
|
||||||
import useSettings from '../../hooks/useSettings';
|
import useSettings from '../../hooks/useSettings';
|
||||||
@@ -487,6 +488,10 @@ const UserList: React.FC = () => {
|
|||||||
className="flex-grow lg:mr-2"
|
className="flex-grow lg:mr-2"
|
||||||
buttonType="primary"
|
buttonType="primary"
|
||||||
onClick={() => setShowImportModal(true)}
|
onClick={() => setShowImportModal(true)}
|
||||||
|
disabled={
|
||||||
|
settings.currentSettings.mediaServerType !==
|
||||||
|
MediaServerType.PLEX
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<InboxInIcon />
|
<InboxInIcon />
|
||||||
<span>{intl.formatMessage(messages.importfromplex)}</span>
|
<span>{intl.formatMessage(messages.importfromplex)}</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user