aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/auth
diff options
context:
space:
mode:
authorLibravatar André Oliveira <oliveira.andrerodrigues95@gmail.com>2023-09-28 16:11:37 +0100
committerLibravatar André Oliveira <37463445+SpecialAro@users.noreply.github.com>2023-09-30 10:13:48 +0100
commitec0914ae254af409da1f0b775460d5234b6484b7 (patch)
treea72acbd7cea38b0e68a31b311de6da1c9fed244e /src/components/auth
parent6.5.0-nightly.19 [skip ci] (diff)
downloadferdium-app-ec0914ae254af409da1f0b775460d5234b6484b7.tar.gz
ferdium-app-ec0914ae254af409da1f0b775460d5234b6484b7.tar.zst
ferdium-app-ec0914ae254af409da1f0b775460d5234b6484b7.zip
fix: login and signup error messages
Diffstat (limited to 'src/components/auth')
-rw-r--r--src/components/auth/Login.tsx38
-rw-r--r--src/components/auth/Signup.tsx6
2 files changed, 24 insertions, 20 deletions
diff --git a/src/components/auth/Login.tsx b/src/components/auth/Login.tsx
index cf7abe654..9bad731c8 100644
--- a/src/components/auth/Login.tsx
+++ b/src/components/auth/Login.tsx
@@ -139,26 +139,30 @@ class Login extends Component<IProps> {
139 <Input {...form.$('password').bind()} showPasswordToggle /> 139 <Input {...form.$('password').bind()} showPasswordToggle />
140 {error.code === 'invalid-credentials' && ( 140 {error.code === 'invalid-credentials' && (
141 <> 141 <>
142 <p className="error-message center"> 142 <h2 className="error-message center">
143 {intl.formatMessage(messages.invalidCredentials)} 143 {intl.formatMessage(messages.invalidCredentials)}
144 </p> 144 </h2>
145 {window['ferdium'].stores.settings.all.app.server !== 145 {window['ferdium'].stores.settings.all.app.server !==
146 LIVE_FRANZ_API && ( 146 LIVE_FRANZ_API && (
147 <p className="error-message center"> 147 <>
148 {intl.formatMessage(messages.customServerQuestion)}{' '} 148 <p className="error-message center">
149 <Link 149 {intl.formatMessage(messages.customServerQuestion)}{' '}
150 to={`${window[ 150 </p>
151 'ferdium' 151 <p className="error-message center">
152 ].stores.settings.all.app.server.replace( 152 <Link
153 API_VERSION, 153 to={`${window[
154 '', 154 'ferdium'
155 )}/import`} 155 ].stores.settings.all.app.server.replace(
156 target="_blank" 156 API_VERSION,
157 style={{ cursor: 'pointer', textDecoration: 'underline' }} 157 '',
158 > 158 )}/import`}
159 {intl.formatMessage(messages.customServerSuggestion)} 159 target="_blank"
160 </Link> 160 style={{ cursor: 'pointer', textDecoration: 'underline' }}
161 </p> 161 >
162 {intl.formatMessage(messages.customServerSuggestion)}
163 </Link>
164 </p>
165 </>
162 )} 166 )}
163 </> 167 </>
164 )} 168 )}
diff --git a/src/components/auth/Signup.tsx b/src/components/auth/Signup.tsx
index fb2a2360e..06a9774aa 100644
--- a/src/components/auth/Signup.tsx
+++ b/src/components/auth/Signup.tsx
@@ -148,10 +148,10 @@ class Signup extends Component<IProps> {
148 showPasswordToggle 148 showPasswordToggle
149 scorePassword 149 scorePassword
150 /> 150 />
151 {error.code === 'email-duplicate' && ( 151 {error.status === 401 && (
152 <p className="error-message center"> 152 <h2 className="error-message center">
153 {intl.formatMessage(messages.emailDuplicate)} 153 {intl.formatMessage(messages.emailDuplicate)}
154 </p> 154 </h2>
155 )} 155 )}
156 {isSubmitting ? ( 156 {isSubmitting ? (
157 <Button 157 <Button