From 99a6c653ff0754434e595486846df0e263c9cc0e Mon Sep 17 00:00:00 2001 From: MontejoJorge Date: Tue, 29 Apr 2025 22:56:58 +0200 Subject: [PATCH] use ForgotPasswordAction enum --- src/apps/stable/routes/session/forgotPassword/index.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/apps/stable/routes/session/forgotPassword/index.tsx b/src/apps/stable/routes/session/forgotPassword/index.tsx index 6a5a1094b..c75ac9d53 100644 --- a/src/apps/stable/routes/session/forgotPassword/index.tsx +++ b/src/apps/stable/routes/session/forgotPassword/index.tsx @@ -7,6 +7,7 @@ import Input from 'elements/emby-input/Input'; import { useMutation } from '@tanstack/react-query'; import Dashboard from 'utils/dashboard'; import { getUserApi } from '@jellyfin/sdk/lib/utils/api/user-api'; +import { ForgotPasswordAction } from '@jellyfin/sdk/lib/generated-client/models/forgot-password-action'; import ServerConnections from 'components/ServerConnections'; export const ForgotPasswordPage = () => { @@ -28,21 +29,21 @@ export const ForgotPasswordPage = () => { return response.data; }, onSuccess: (result) => { - if (result.Action == 'ContactAdmin') { + if (result.Action == ForgotPasswordAction.ContactAdmin) { Dashboard.alert({ message: globalize.translate('MessageContactAdminToResetPassword'), title: globalize.translate('ButtonForgotPassword') }); } - if (result.Action == 'InNetworkRequired') { + if (result.Action == ForgotPasswordAction.InNetworkRequired) { Dashboard.alert({ message: globalize.translate('MessageForgotPasswordInNetworkRequired'), title: globalize.translate('ButtonForgotPassword') }); } - if (result.Action == 'PinCode') { + if (result.Action == ForgotPasswordAction.PinCode) { let msg = globalize.translate('MessageForgotPasswordFileCreated'); msg += '

'; msg += globalize.translate('MessageForgotPasswordPinReset');