Skip to content

Commit

Permalink
Rename auth variables (#252)
Browse files Browse the repository at this point in the history
Co-authored-by: Mavrik <[email protected]>
  • Loading branch information
AgeManning and rickimoore authored Jul 1, 2024
1 parent 858c01e commit d71d90d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
13 changes: 9 additions & 4 deletions src/components/AuthPrompt/AuthPrompt.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { FC, useState } from 'react';
import { Controller } from 'react-hook-form';
import { useTranslation } from 'react-i18next';
import Lighthouse from '../../assets/images/lightHouse.svg'
import Lighthouse from '../../assets/images/lightHouse.svg';
import { UiMode } from '../../constants/enums';
import AuthenticationForm, { AuthFormProps } from '../../forms/AuthenticationForm';
import AnimatedHeader from '../AnimatedHeader/AnimatedHeader';
Expand Down Expand Up @@ -47,7 +47,10 @@ const AuthPrompt:FC<AuthModalProps> = ({onSubmit, isVisible, isLoading, mode, on
control={control as any}
render={({ field: { ref: _ref, ...props }, fieldState }) => (
<Input
label="User Name"
tooltip={t('authPrompt.tooltip.displayName')}
toolTipId="displayName"
toolTipMode={UiMode.LIGHT}
label={t('authPrompt.label.name')}
uiMode={mode}
error={fieldState.error?.message}
{...props}
Expand All @@ -61,7 +64,9 @@ const AuthPrompt:FC<AuthModalProps> = ({onSubmit, isVisible, isLoading, mode, on
render={({ field: { ref: _ref, ...props }, fieldState }) => (
<Input
isAutoFocus
label={isNamePrompt ? 'Password' : undefined}
tooltip={t('authPrompt.tooltip.sessionPassword')}
toolTipId="sessionPassword"
label={isNamePrompt ? t('authPrompt.label.sessionPassword') : undefined}
autoComplete="new-password"
type="password"
uiMode={mode}
Expand All @@ -82,4 +87,4 @@ const AuthPrompt:FC<AuthModalProps> = ({onSubmit, isVisible, isLoading, mode, on
)
}

export default AuthPrompt;
export default AuthPrompt;
2 changes: 1 addition & 1 deletion src/components/ValidatorGraffiti/ValidatorGraffiti.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const ValidatorGraffiti:FC<ValidatorGraffitiProps> = ({validator}) => {

return (
<>
<AuthPrompt isLoading={isLoading} mode={mode} onClose={closeAuth} isVisible={isAuth} onSubmit={updateGraffiti} />
<AuthPrompt isLoading={isLoading} maxHeight="400px" mode={mode} onClose={closeAuth} isVisible={isAuth} onSubmit={updateGraffiti} />
<ValidatorGraffitiInput isLoading={isLoading} onSubmit={storeGraffitiInput} value={graffiti} />
</>
)
Expand Down
10 changes: 9 additions & 1 deletion src/locales/translations/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,15 @@
"noPasswordFound": "No Session Password found",
"invalidPassword": "Invalid password. Please try again.",
"unableToReach": "Unable to reach backend.",
"defaultErrorMessage": "Error reaching backend server..."
"defaultErrorMessage": "Error reaching backend server...",
"tooltip": {
"displayName": "Display name for the Siren dashboard",
"sessionPassword": "Required password set in the configuration file"
},
"label": {
"name": "Name",
"sessionPassword": "Session Password"
}
},
"errorPage": {
"title": "Opps!",
Expand Down

0 comments on commit d71d90d

Please sign in to comment.