1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 00:33:44 +00:00

stub out angular with webpack

This commit is contained in:
Kyle Spearrin
2018-04-03 22:14:54 -04:00
parent 848117ff86
commit 4d56d12ccb
19 changed files with 1225 additions and 38 deletions

View File

@@ -0,0 +1,44 @@
import * as template from './login.component.html';
import {
Component,
ComponentFactoryResolver,
ViewChild,
ViewContainerRef,
} from '@angular/core';
import { Router } from '@angular/router';
import { ToasterService } from 'angular2-toaster';
import { Angulartics2 } from 'angulartics2';
import { AuthResult } from 'jslib/models/domain/authResult';
import { AuthService } from 'jslib/abstractions/auth.service';
import { I18nService } from 'jslib/abstractions/i18n.service';
import { SyncService } from 'jslib/abstractions/sync.service';
@Component({
selector: 'app-login',
template: template,
})
export class LoginComponent {
@ViewChild('environment', { read: ViewContainerRef }) environmentModal: ViewContainerRef;
email: string = '';
masterPassword: string = '';
showPassword: boolean = false;
formPromise: Promise<AuthResult>;
constructor(private router: Router, private analytics: Angulartics2,
private toasterService: ToasterService) { }
async submit() {
}
togglePassword() {
this.analytics.eventTrack.next({ action: 'Toggled Master Password on Login' });
this.showPassword = !this.showPassword;
document.getElementById('masterPassword').focus();
}
}