Require user to verify email to use file Send (#915)

* Require user to verify email to use file Send

* bump jslib
This commit is contained in:
Thomas Rittson 2021-04-10 02:19:16 +10:00 committed by GitHub
parent f6e8c7152e
commit aba98ba944
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 3 deletions

2
jslib

@ -1 +1 @@
Subproject commit 78d40d9f18c23a185465d5fca238b258b2848193 Subproject commit 85893f5f9efb201a45c5af54896a82e6eb185108

View File

@ -139,6 +139,15 @@ export class AppComponent implements OnDestroy, OnInit {
this.router.navigate(['settings/premium']); this.router.navigate(['settings/premium']);
} }
break; break;
case 'emailVerificationRequired':
const emailVerificationConfirmed = await this.platformUtilsService.showDialog(
this.i18nService.t('emailVerificationRequiredDesc'),
this.i18nService.t('emailVerificationRequired'),
this.i18nService.t('learnMore'), this.i18nService.t('cancel'));
if (emailVerificationConfirmed) {
this.platformUtilsService.launchUri('https://bitwarden.com/help/article/create-bitwarden-account/');
}
break;
case 'showToast': case 'showToast':
this.showToast(message); this.showToast(message);
break; break;

View File

@ -8,6 +8,7 @@ import { MessagingService } from 'jslib/abstractions/messaging.service';
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service'; import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
import { PolicyService } from 'jslib/abstractions/policy.service'; import { PolicyService } from 'jslib/abstractions/policy.service';
import { SendService } from 'jslib/abstractions/send.service'; import { SendService } from 'jslib/abstractions/send.service';
import { TokenService } from 'jslib/abstractions/token.service';
import { UserService } from 'jslib/abstractions/user.service'; import { UserService } from 'jslib/abstractions/user.service';
import { AddEditComponent as BaseAddEditComponent } from 'jslib/angular/components/send/add-edit.component'; import { AddEditComponent as BaseAddEditComponent } from 'jslib/angular/components/send/add-edit.component';
@ -20,9 +21,9 @@ export class AddEditComponent extends BaseAddEditComponent {
constructor(i18nService: I18nService, platformUtilsService: PlatformUtilsService, constructor(i18nService: I18nService, platformUtilsService: PlatformUtilsService,
environmentService: EnvironmentService, datePipe: DatePipe, environmentService: EnvironmentService, datePipe: DatePipe,
sendService: SendService, userService: UserService, sendService: SendService, userService: UserService,
messagingService: MessagingService, policyService: PolicyService) { messagingService: MessagingService, policyService: PolicyService, tokenService: TokenService) {
super(i18nService, platformUtilsService, environmentService, datePipe, sendService, userService, super(i18nService, platformUtilsService, environmentService, datePipe, sendService, userService,
messagingService, policyService); messagingService, policyService, tokenService);
} }
copyLinkToClipboard(link: string) { copyLinkToClipboard(link: string) {

View File

@ -2636,6 +2636,12 @@
"emailVerifiedFailed": { "emailVerifiedFailed": {
"message": "Unable to verify your email. Try sending a new verification email." "message": "Unable to verify your email. Try sending a new verification email."
}, },
"emailVerificationRequired": {
"message": "Email Verification Required"
},
"emailVerificationRequiredDesc": {
"message": "You must verify your email to use this feature."
},
"updateBrowser": { "updateBrowser": {
"message": "Update Browser" "message": "Update Browser"
}, },