fix: correctly set opacity when checkbox disabled

pull/2211/head
TheCatLady 3 years ago
parent 09e6d8e8c0
commit dc23d7698f
No known key found for this signature in database
GPG Key ID: 9DAC5971F01EE4AE

@ -28,8 +28,6 @@ const messages = defineMessages({
defaultPermissions: 'Default Permissions', defaultPermissions: 'Default Permissions',
defaultPermissionsTip: 'Initial permissions assigned to new users', defaultPermissionsTip: 'Initial permissions assigned to new users',
signinMethods: 'Sign-In Methods', signinMethods: 'Sign-In Methods',
plexSigninHoverTip:
'To disable Plex OAuth, email notifications must be enabled and the server owner must have a password configured for their account.',
passwordSignin: '{applicationTitle} Password', passwordSignin: '{applicationTitle} Password',
validationSigninMethods: 'At least one sign-in method must be selected', validationSigninMethods: 'At least one sign-in method must be selected',
}); });
@ -75,7 +73,7 @@ const SettingsUsers = () => {
const allowPlexSigninDisable = const allowPlexSigninDisable =
ownerData?.hasPassword && ownerData?.hasPassword &&
settings.currentSettings.applicationUrl && !!settings.currentSettings.applicationUrl &&
settings.currentSettings.emailEnabled; settings.currentSettings.emailEnabled;
return ( return (
@ -162,10 +160,7 @@ const SettingsUsers = () => {
<div className="form-input-area max-w-xl space-y-1.5"> <div className="form-input-area max-w-xl space-y-1.5">
<div <div
className={`relative flex items-start ${ className={`relative flex items-start ${
ownerData?.hasPassword && allowPlexSigninDisable ? '' : 'opacity-50'
settings.currentSettings.emailEnabled
? ''
: 'opacity-50'
}`} }`}
> >
<div className="flex h-6 items-center"> <div className="flex h-6 items-center">
@ -177,23 +172,11 @@ const SettingsUsers = () => {
setFieldValue('plexLogin', !values.plexLogin); setFieldValue('plexLogin', !values.plexLogin);
}} }}
disabled={!allowPlexSigninDisable} disabled={!allowPlexSigninDisable}
title={
!allowPlexSigninDisable
? intl.formatMessage(
messages.plexSigninHoverTip
)
: undefined
}
/> />
</div> </div>
<label <label
htmlFor="plexLogin" htmlFor="plexLogin"
className="ml-3 block text-sm font-semibold leading-6 text-white" className="ml-3 block text-sm font-semibold leading-6 text-white"
title={
!allowPlexSigninDisable
? intl.formatMessage(messages.plexSigninHoverTip)
: undefined
}
> >
Plex OAuth Plex OAuth
</label> </label>

@ -686,7 +686,6 @@
"components.Settings.SettingsUsers.newPlexLogin": "Enable New Plex Sign-Ins", "components.Settings.SettingsUsers.newPlexLogin": "Enable New Plex Sign-Ins",
"components.Settings.SettingsUsers.newPlexLoginTip": "Allow Plex users with access to the media server to sign in without being imported", "components.Settings.SettingsUsers.newPlexLoginTip": "Allow Plex users with access to the media server to sign in without being imported",
"components.Settings.SettingsUsers.passwordSignin": "{applicationTitle} Password", "components.Settings.SettingsUsers.passwordSignin": "{applicationTitle} Password",
"components.Settings.SettingsUsers.plexSigninHoverTip": "To disable Plex OAuth, email notifications must be enabled and the server owner must have a password configured for their account.",
"components.Settings.SettingsUsers.signinMethods": "Sign-In Methods", "components.Settings.SettingsUsers.signinMethods": "Sign-In Methods",
"components.Settings.SettingsUsers.toastSettingsFailure": "Something went wrong while saving settings.", "components.Settings.SettingsUsers.toastSettingsFailure": "Something went wrong while saving settings.",
"components.Settings.SettingsUsers.toastSettingsSuccess": "User settings saved successfully!", "components.Settings.SettingsUsers.toastSettingsSuccess": "User settings saved successfully!",

Loading…
Cancel
Save