1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-22 11:13:46 +00:00

print folder, collections, and ciphers to vault

This commit is contained in:
Kyle Spearrin
2018-01-23 16:58:32 -05:00
parent 78b1f5df99
commit 881b581fe3
7 changed files with 64 additions and 35 deletions

View File

@@ -1,3 +1,8 @@
<form>
Login form.
<form (ngSubmit)="onSubmit()" #heroForm="ngForm">
<label for="email">Email Address</label>
<input id="email" type="text" [(ngModel)]="email" name="email" required /><br /><br />
<label for="master-password">Master Password</label>
<input id="master-password" type="password" [(ngModel)]="masterPassword"
name="masterPassword" required /><br /><br />
<button type="submit">Submit</button>
</form>

View File

@@ -5,6 +5,8 @@ import {
OnInit,
} from '@angular/core';
import { Router } from '@angular/router';
import { AuthService } from 'jslib/abstractions/auth.service';
@Component({
@@ -12,11 +14,19 @@ import { AuthService } from 'jslib/abstractions/auth.service';
template: template
})
export class LoginComponent implements OnInit {
constructor(authService: AuthService) {
console.log(authService);
email: string = '';
masterPassword: string = '';
constructor(private authService: AuthService, private router: Router) {
}
ngOnInit() {
// TODO?
}
async onSubmit() {
const response = await this.authService.logIn(this.email, this.masterPassword);
this.router.navigate(['vault']);
}
}