diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-20 13:47:49 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:19 +0200 |
commit | 7f28f2ddbaeecf451d501e99ded0408c14a33600 (patch) | |
tree | 62388dff577fc765c0df0be6a3619527b1fbca21 /client/src | |
parent | 01af646261264befde7ce6ca5130fd07c0b23aa1 (diff) | |
download | PeerTube-7f28f2ddbaeecf451d501e99ded0408c14a33600.tar.gz PeerTube-7f28f2ddbaeecf451d501e99ded0408c14a33600.tar.zst PeerTube-7f28f2ddbaeecf451d501e99ded0408c14a33600.zip |
Warning when using capitalized letter in login
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/app/+login/login.component.html | 4 | ||||
-rw-r--r-- | client/src/app/+login/login.component.ts | 4 | ||||
-rw-r--r-- | client/src/sass/application.scss | 8 |
3 files changed, 14 insertions, 2 deletions
diff --git a/client/src/app/+login/login.component.html b/client/src/app/+login/login.component.html index 5f5b0f565..27793ff0c 100644 --- a/client/src/app/+login/login.component.html +++ b/client/src/app/+login/login.component.html | |||
@@ -28,6 +28,10 @@ | |||
28 | <div *ngIf="formErrors.username" class="form-error"> | 28 | <div *ngIf="formErrors.username" class="form-error"> |
29 | {{ formErrors.username }} | 29 | {{ formErrors.username }} |
30 | </div> | 30 | </div> |
31 | |||
32 | <div *ngIf="hasUsernameUppercase()" i18n class="form-warning"> | ||
33 | ⚠️ Most email addresses do not include capital letters. | ||
34 | </div> | ||
31 | </div> | 35 | </div> |
32 | 36 | ||
33 | <div class="form-group"> | 37 | <div class="form-group"> |
diff --git a/client/src/app/+login/login.component.ts b/client/src/app/+login/login.component.ts index d8ad49081..9731383af 100644 --- a/client/src/app/+login/login.component.ts +++ b/client/src/app/+login/login.component.ts | |||
@@ -141,6 +141,10 @@ The link will expire within 1 hour.` | |||
141 | this.accordion = instanceAboutAccordion.accordion | 141 | this.accordion = instanceAboutAccordion.accordion |
142 | } | 142 | } |
143 | 143 | ||
144 | hasUsernameUppercase () { | ||
145 | return this.form.value['username'].match(/[A-Z]/) | ||
146 | } | ||
147 | |||
144 | private loadExternalAuthToken (username: string, token: string) { | 148 | private loadExternalAuthToken (username: string, token: string) { |
145 | this.isAuthenticatedWithExternalAuth = true | 149 | this.isAuthenticatedWithExternalAuth = true |
146 | 150 | ||
diff --git a/client/src/sass/application.scss b/client/src/sass/application.scss index 30d487b11..bd834db70 100644 --- a/client/src/sass/application.scss +++ b/client/src/sass/application.scss | |||
@@ -123,12 +123,16 @@ code { | |||
123 | vertical-align: middle; | 123 | vertical-align: middle; |
124 | } | 124 | } |
125 | 125 | ||
126 | .form-error { | 126 | .form-error, |
127 | .form-warning { | ||
127 | display: block; | 128 | display: block; |
128 | color: $red; | ||
129 | margin-top: 5px; | 129 | margin-top: 5px; |
130 | } | 130 | } |
131 | 131 | ||
132 | .form-error { | ||
133 | color: $red; | ||
134 | } | ||
135 | |||
132 | .input-error, | 136 | .input-error, |
133 | my-input-toggle-hidden ::ng-deep input { | 137 | my-input-toggle-hidden ::ng-deep input { |
134 | border-color: $red !important; | 138 | border-color: $red !important; |