1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-20 02:03:39 +00:00

Feature/use hcaptcha if bot (#1000)

* Add captcha to login component

* Add catpcha to login page

* Update content width if captcha is visible

* extend submit to handle widening if captcha is required

* Improve login styling

* Add Captcha to registration page

* Remove padding from captcha div

The padding was messing up image selection of captcha items

* Update jslib

* PR review

* update jslib
This commit is contained in:
Matt Gibson
2021-07-23 13:48:10 -05:00
committed by GitHub
parent d7287e7aa3
commit c863d68057
7 changed files with 29 additions and 4 deletions

View File

@@ -106,4 +106,12 @@ export class LoginComponent extends BaseLoginComponent implements OnDestroy {
onWindowHidden() {
this.showPassword = false;
}
async submit() {
await super.submit();
if (this.captchaSiteKey) {
const content = document.getElementById('content') as HTMLDivElement;
content.setAttribute('style', 'width:335px');
}
}
}