From a15c85cbd18adb1bd3b7670946d4483b81bad28e Mon Sep 17 00:00:00 2001 From: Pikachu920 <28607612+Pikachu920@users.noreply.github.com> Date: Sat, 25 Mar 2023 10:22:30 -0500 Subject: [PATCH 1/4] Add helper text to email address field in setup --- src/components/Login/JellyfinLogin.tsx | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/components/Login/JellyfinLogin.tsx b/src/components/Login/JellyfinLogin.tsx index 5bd38301e..314a779fc 100644 --- a/src/components/Login/JellyfinLogin.tsx +++ b/src/components/Login/JellyfinLogin.tsx @@ -13,6 +13,7 @@ const messages = defineMessages({ password: 'Password', host: '{mediaServerName} URL', email: 'Email', + emailtooltip: 'This can be any valid email. It doesn\'t need to come from your {mediaServerName} instance.', validationhostrequired: '{mediaServerName} URL required', validationhostformat: 'Valid URL required', validationemailrequired: 'Email required', @@ -63,6 +64,12 @@ const JellyfinLogin: React.FC = ({ ), password: Yup.string(), }); + const mediaServerFormatValues = { + mediaServerName: + publicRuntimeConfig.JELLYFIN_TYPE == 'emby' + ? 'Emby' + : 'Jellyfin', + }; return ( = ({
@@ -114,12 +116,7 @@ const JellyfinLogin: React.FC = ({ id="host" name="host" type="text" - placeholder={intl.formatMessage(messages.host, { - mediaServerName: - publicRuntimeConfig.JELLYFIN_TYPE == 'emby' - ? 'Emby' - : 'Jellyfin', - })} + placeholder={intl.formatMessage(messages.host, mediaServerFormatValues)} />
{errors.host && touched.host && ( @@ -128,6 +125,9 @@ const JellyfinLogin: React.FC = ({
From cd7930eef98451a781e5c9dc5ec223600a379f42 Mon Sep 17 00:00:00 2001 From: Fallenbagel <98979876+Fallenbagel@users.noreply.github.com> Date: Sun, 11 Jun 2023 06:36:51 +0500 Subject: [PATCH 2/4] feat(tooltip): email tooltip now appears when hovered over info icon --- src/components/Login/JellyfinLogin.tsx | 30 ++++++++++++++++++++------ 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/src/components/Login/JellyfinLogin.tsx b/src/components/Login/JellyfinLogin.tsx index 314a779fc..1e7a1d35d 100644 --- a/src/components/Login/JellyfinLogin.tsx +++ b/src/components/Login/JellyfinLogin.tsx @@ -1,5 +1,7 @@ import Button from '@app/components/Common/Button'; +import Tooltip from '@app/components/Common/Tooltip'; import useSettings from '@app/hooks/useSettings'; +import { InformationCircleIcon } from '@heroicons/react/24/solid'; import axios from 'axios'; import { Field, Form, Formik } from 'formik'; import getConfig from 'next/config'; @@ -13,7 +15,7 @@ const messages = defineMessages({ password: 'Password', host: '{mediaServerName} URL', email: 'Email', - emailtooltip: 'This can be any valid email. It doesn\'t need to come from your {mediaServerName} instance.', + emailtooltip: 'Any valid email. Unrelated to your {mediaServerName} instance', validationhostrequired: '{mediaServerName} URL required', validationhostformat: 'Valid URL required', validationemailrequired: 'Email required', @@ -66,9 +68,7 @@ const JellyfinLogin: React.FC = ({ }); const mediaServerFormatValues = { mediaServerName: - publicRuntimeConfig.JELLYFIN_TYPE == 'emby' - ? 'Emby' - : 'Jellyfin', + publicRuntimeConfig.JELLYFIN_TYPE == 'emby' ? 'Emby' : 'Jellyfin', }; return ( = ({ id="host" name="host" type="text" - placeholder={intl.formatMessage(messages.host, mediaServerFormatValues)} + placeholder={intl.formatMessage( + messages.host, + mediaServerFormatValues + )} />
{errors.host && touched.host && (
{errors.host}
)}
-