1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-04 09:33:27 +00:00

verify email and outdated browser callouts

This commit is contained in:
Kyle Spearrin
2018-07-12 11:34:51 -04:00
parent 0c61e48977
commit ab4005ae00
6 changed files with 84 additions and 4 deletions

View File

@@ -49,12 +49,19 @@
</app-vault-ciphers>
</div>
<div class="col-3">
<div class="card">
<app-verify-email *ngIf="showVerifyEmail" class="d-block mb-4"></app-verify-email>
<div class="card border-warning mb-4" *ngIf="showBrowserOutdated">
<div class="card-header bg-warning text-white">
<i class="fa fa-warning fa-fw"></i> {{'updateBrowser' | i18n}}
</div>
<div class="card-body">
Some callout
<p>{{'updateBrowserDesc' | i18n}}</p>
<a class="btn btn-block btn-outline-secondary" target="_blank" href="https://browser-update.org/update-browser.html" rel="noopener">
{{'updateBrowser' | i18n}}
</a>
</div>
</div>
<div class="card mt-3">
<div class="card">
<div class="card-header">
{{'organizations' | i18n}}
</div>

View File

@@ -30,7 +30,9 @@ import { GroupingsComponent } from './groupings.component';
import { ShareComponent } from './share.component';
import { I18nService } from 'jslib/abstractions/i18n.service';
import { StorageService } from 'jslib/abstractions/storage.service';
import { SyncService } from 'jslib/abstractions/sync.service';
import { TokenService } from 'jslib/abstractions/token.service';
@Component({
selector: 'app-vault',
@@ -53,14 +55,22 @@ export class VaultComponent implements OnInit {
type: CipherType = null;
folderId: string = null;
collectionId: string = null;
showVerifyEmail = false;
showBrowserOutdated = false;
showUpdateKey = false;
private modal: ModalComponent = null;
constructor(private syncService: SyncService, private route: ActivatedRoute,
private router: Router, private location: Location,
private i18nService: I18nService, private componentFactoryResolver: ComponentFactoryResolver) { }
private i18nService: I18nService, private componentFactoryResolver: ComponentFactoryResolver,
private tokenService: TokenService, private storageService: StorageService) { }
async ngOnInit() {
this.showVerifyEmail = !(await this.tokenService.getEmailVerified());
this.showBrowserOutdated = window.navigator.userAgent.indexOf('MSIE') !== -1;
this.showUpdateKey = !this.showVerifyEmail && (await this.storageService.get<string>('encKey')) == null;
this.route.queryParams.subscribe(async (params) => {
await this.syncService.fullSync(false);
await Promise.all([