mirror of
https://github.com/fallenbagel/jellyseerr.git
synced 2026-01-08 15:48:08 -05:00
fix(ui): fix ui elements not reflecting the env variable
Fix emby ui elements not reflecting the emby env variable set during runtime
This commit is contained in:
@@ -14,6 +14,7 @@ import LoadingSpinner from '../../Common/LoadingSpinner';
|
||||
import PageTitle from '../../Common/PageTitle';
|
||||
import PermissionEdit from '../../PermissionEdit';
|
||||
import QuotaSelector from '../../QuotaSelector';
|
||||
import getConfig from 'next/config';
|
||||
|
||||
const messages = defineMessages({
|
||||
users: 'Users',
|
||||
@@ -42,6 +43,7 @@ const SettingsUsers: React.FC = () => {
|
||||
mutate: revalidate,
|
||||
} = useSWR<MainSettings>('/api/v1/settings/main');
|
||||
const settings = useSettings();
|
||||
const { publicRuntimeConfig } = getConfig();
|
||||
|
||||
if (!data && !error) {
|
||||
return <LoadingSpinner />;
|
||||
@@ -131,7 +133,7 @@ const SettingsUsers: React.FC = () => {
|
||||
<label htmlFor="newPlexLogin" className="checkbox-label">
|
||||
{intl.formatMessage(messages.newPlexLogin, {
|
||||
mediaServerName:
|
||||
process.env.JELLYFIN_TYPE == 'emby'
|
||||
publicRuntimeConfig.JELLYFIN_TYPE == 'emby'
|
||||
? 'Emby'
|
||||
: settings.currentSettings.mediaServerType ===
|
||||
MediaServerType.PLEX
|
||||
@@ -141,7 +143,7 @@ const SettingsUsers: React.FC = () => {
|
||||
<span className="label-tip">
|
||||
{intl.formatMessage(messages.newPlexLoginTip, {
|
||||
mediaServerName:
|
||||
process.env.JELLYFIN_TYPE == 'emby'
|
||||
publicRuntimeConfig.JELLYFIN_TYPE == 'emby'
|
||||
? 'Emby'
|
||||
: settings.currentSettings.mediaServerType ===
|
||||
MediaServerType.PLEX
|
||||
|
||||
Reference in New Issue
Block a user