From c7df134863651568671c2d22343f5548ec9f451a Mon Sep 17 00:00:00 2001 From: Patrick Sun Date: Mon, 28 Dec 2020 14:59:17 +1100 Subject: [PATCH] ignore dist directory, it seems that those already in will be there for ever. --- .gitignore | 1 + src/app/auth/dist/auth.component.css | 1 + src/app/auth/dist/auth.component.js | 21 +++++++++++---------- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 758ca35..330d03c 100644 --- a/.gitignore +++ b/.gitignore @@ -48,3 +48,4 @@ Thumbs.db #dist file src/app/dist/* src/app/dist/main-menu-items.js +dist/* diff --git a/src/app/auth/dist/auth.component.css b/src/app/auth/dist/auth.component.css index 6bd83cb..7175a3d 100644 --- a/src/app/auth/dist/auth.component.css +++ b/src/app/auth/dist/auth.component.css @@ -8,6 +8,7 @@ div.parent { height: 100vh; opacity: 0.95; background: url("../../assets/img/body_bg.jpg") no-repeat center center fixed; + background-size: cover; } .form_login { diff --git a/src/app/auth/dist/auth.component.js b/src/app/auth/dist/auth.component.js index 46abeed..923ec0c 100644 --- a/src/app/auth/dist/auth.component.js +++ b/src/app/auth/dist/auth.component.js @@ -21,14 +21,7 @@ var AuthComponent = /** @class */ (function () { } AuthComponent.prototype.ngOnInit = function () { var _this = this; - this.loginSub = this.authService.loginSuccess.subscribe(function (ok) { - _this.loading = false; - console.log(" found login success " + ok); - if (ok) - _this.rounter.navigate(["/dashboard"]); - else - _this.show(); - }); + this.loginSub = this.authService.loginSuccess.subscribe(function (ok) { _this.onLogin(ok); }); }; AuthComponent.prototype.ngOnDestroy = function () { this.loginSub.unsubscribe(); @@ -38,14 +31,22 @@ var AuthComponent = /** @class */ (function () { this.loading = true; this.authService.login(this.userForm.value.email, this.userForm.value.password); }; + AuthComponent.prototype.onLogin = function (ok) { + this.loading = false; + console.log(" found login success " + ok); + if (ok) + this.rounter.navigate(["/dashboard"]); + else + this.show(); + }; AuthComponent.prototype.show = function () { this.notificationService.show({ content: 'Your loggin is failed, please try again.', cssClass: 'button-notification', animation: { type: 'slide', duration: 400 }, - position: { horizontal: 'center', vertical: 'bottom' }, + position: { horizontal: 'center', vertical: 'top' }, type: { style: 'error', icon: true }, - closable: true + hideAfter: 2000 }); }; AuthComponent = __decorate([