diff --git a/src/app/login/login.component.css b/src/app/login/login.component.css index c1efa20..f4488f2 100644 --- a/src/app/login/login.component.css +++ b/src/app/login/login.component.css @@ -1,35 +1,59 @@ -.margin-left-5{ - margin-left: 5px; +.margin-left-5 { + margin-left: 5px; } .terms { - float: right; + float: right; } :host ::ng-deep .content .content-wrapper { - padding: 0!important; + padding: 0 !important; } :host ::ng-deep .btn-outline-twitter { - border: 1px solid #55acee!important; - color: #55acee !important; + border: 1px solid #55acee !important; + color: #55acee !important; } -:host ::ng-deep .icheckbox_square-blue, .iradio_square-blue { - display: inline-block; - vertical-align: middle; - margin: 0; - padding: 0; - width: 22px; - height: 22px; - background: url("../../assets/images/icons/blue.png") no-repeat; - border: none; - cursor: pointer; +:host ::ng-deep .icheckbox_square-blue, +.iradio_square-blue { + display: inline-block; + vertical-align: middle; + margin: 0; + padding: 0; + width: 22px; + height: 22px; + background: url("../../assets/images/icons/blue.png") no-repeat; + border: none; + cursor: pointer; } :host ::ng-deep .icheckbox_square-blue { - background-position: 0 0; + background-position: 0 0; } :host ::ng-deep .lb-remember { - color: #2b335e; - padding-left: 3px; - width: max-content; + color: #2b335e; + padding-left: 3px; + width: max-content; } :host ::ng-deep .icheckbox_square-blue.checked { - background-position: -48px 0; -} \ No newline at end of file + background-position: -48px 0; +} +.center-card { + margin-top: 150px; +} +.card { + background-color: rgba(255, 255, 255, 0.7); +} +.card-header { + background-color: rgba(255, 255, 255, 0); +} +.form-control { + background-color: rgba(255, 255, 255, 0.7); +} +.line-on-side span { + background-color: rgba(255, 255, 255, 0); +} +.btn-custom-login { + background-color: rgba(255, 255, 255, 0.7); +} +.btn-custom-login:hover { + color: #ffffff !important; + background-color: #1e9ff2 !important; + border-color: #dae0e5 !important; +} diff --git a/src/app/login/login.component.html b/src/app/login/login.component.html index cdebbab..8f24c09 100644 --- a/src/app/login/login.component.html +++ b/src/app/login/login.component.html @@ -1,95 +1,152 @@ 
-
-
-
-
-
-
-
-
-
-
-
- branding logo -
-
- Easily Using
-
-
- -

- OR Using Account Details

-
-
-
- -
- -
-
-
Username is required
-
-
-
- -
- -
-
-
Password is required
-
- -
-
-
-
-
- - -
- - -
-
- -
- -
-
-

- New to Modern ?

- - -
-
-
+
+
+
+
+
+
+
+
+
+
+ branding logo
-
- +
+
+
+
+
+ +
+ +
+
+
+ Username is required +
+
+
+
+ +
+ +
+
+
+ Password is required +
+
+
+
+
+
+
+ + +
+ +
+
+ +
+ +
+
+

+ New to Modern ? +

+ +
+
+
+
-
\ No newline at end of file + + diff --git a/src/app/login/login.component.ts b/src/app/login/login.component.ts index 1b55a70..a6903d4 100644 --- a/src/app/login/login.component.ts +++ b/src/app/login/login.component.ts @@ -1,12 +1,12 @@ -import { Component, OnInit, Renderer2 } from '@angular/core'; -import { Router, ActivatedRoute } from '@angular/router'; -import { FormBuilder, FormGroup, Validators } from '@angular/forms'; -import { AuthService } from '../_services/auth.service'; -import { AlertService } from '../_services/alert.service'; +import { Component, OnInit, Renderer2 } from "@angular/core"; +import { Router, ActivatedRoute } from "@angular/router"; +import { FormBuilder, FormGroup, Validators } from "@angular/forms"; +import { AuthService } from "../_services/auth.service"; +import { AlertService } from "../_services/alert.service"; @Component({ - templateUrl: 'login.component.html', - styleUrls: ['./login.component.css'] + templateUrl: "login.component.html", + styleUrls: ["./login.component.css"], }) export class LoginComponent implements OnInit { loginForm: FormGroup; @@ -23,24 +23,23 @@ export class LoginComponent implements OnInit { public authService: AuthService, private renderer: Renderer2 ) { - this.route.queryParams.subscribe(params => { - this.returnUrl = params['returnUrl']; + this.route.queryParams.subscribe((params) => { + this.returnUrl = params["returnUrl"]; }); - } ngOnInit() { this.loginForm = this.formBuilder.group({ - email: ['john@pixinvent.com', Validators.required], - password: ['password@123', Validators.required], - rememberMe: false + email: ["john@pixinvent.com", Validators.required], + password: ["password@123", Validators.required], + rememberMe: false, }); // Remember Me - if (localStorage.getItem('remember')) { - this.renderer.removeClass(document.body, 'bg-full-screen-image'); - localStorage.removeItem('currentLayoutStyle'); - this.router.navigate(['/monitoring']); - } else if (localStorage.getItem('currentUser')) { + if (localStorage.getItem("remember")) { + this.renderer.removeClass(document.body, "bg-full-screen-image"); + localStorage.removeItem("currentLayoutStyle"); + this.router.navigate(["/monitoring"]); + } else if (localStorage.getItem("currentUser")) { // Force logout on login if not remember me this.authService.doLogout(); this.isPageLoaded = true; @@ -63,42 +62,47 @@ export class LoginComponent implements OnInit { } const value = { email: this.f.email.value, - password: this.f.password.value + password: this.f.password.value, }; this.authService.doLogin(value).then( - res => { - if (this.loginForm.controls['rememberMe'] && this.loginForm.controls['rememberMe'].value) { - localStorage.setItem('remember', 'true'); + (res) => { + if ( + this.loginForm.controls["rememberMe"] && + this.loginForm.controls["rememberMe"].value + ) { + localStorage.setItem("remember", "true"); } else { - localStorage.removeItem('remember'); + localStorage.removeItem("remember"); } this.setUserInStorage(res); - localStorage.removeItem('currentLayoutStyle'); - let returnUrl = '/monitoring'; + localStorage.removeItem("currentLayoutStyle"); + let returnUrl = "/monitoring"; if (this.returnUrl) { returnUrl = this.returnUrl; } this.router.navigate([returnUrl]); }, - err => { + (err) => { this.submitted = false; this.alertService.error(err.message); } ); } -addCheckbox(event) { - const toggle = document.getElementById('icheckbox'); - if (event.currentTarget.className === 'icheckbox_square-blue') { - this.renderer.addClass(toggle, 'checked'); - } else if (event.currentTarget.className === 'icheckbox_square-blue checked') { - this.renderer.removeClass(toggle, 'checked'); + addCheckbox(event) { + const toggle = document.getElementById("icheckbox"); + if (event.currentTarget.className === "icheckbox_square-blue") { + this.renderer.addClass(toggle, "checked"); + } else if ( + event.currentTarget.className === "icheckbox_square-blue checked" + ) { + this.renderer.removeClass(toggle, "checked"); + } } -} setUserInStorage(res) { if (res.user) { - localStorage.setItem('currentUser', JSON.stringify(res.user)); + localStorage.setItem("currentUser", JSON.stringify(res.user)); } else { - localStorage.setItem('currentUser', JSON.stringify(res)); + localStorage.setItem("currentUser", JSON.stringify(res)); } } } diff --git a/src/app/register/register.component.css b/src/app/register/register.component.css index a72e6c0..c4d1c4b 100644 --- a/src/app/register/register.component.css +++ b/src/app/register/register.component.css @@ -1,3 +1,27 @@ .margin-left-5{ margin-left: 5px; -} \ No newline at end of file +} + +.center-card { + margin-top: 150px; + } + .card { + background-color: rgba(255, 255, 255, 0.7); + } + .card-header { + background-color: rgba(255, 255, 255, 0); + } + .form-control { + background-color: rgba(255, 255, 255, 0.7); + } + .line-on-side span { + background-color: rgba(255, 255, 255, 0); + } + .btn-custom-login { + background-color: rgba(255, 255, 255, 0.7); + } + .btn-custom-login:hover { + color: #ffffff !important; + background-color: #1e9ff2 !important; + border-color: #dae0e5 !important; + } \ No newline at end of file diff --git a/src/app/register/register.component.html b/src/app/register/register.component.html index 1fe116d..728e02c 100644 --- a/src/app/register/register.component.html +++ b/src/app/register/register.component.html @@ -68,7 +68,7 @@ href="recover-password.html" class="card-link">Forgot Password? - diff --git a/src/assets/images/backgrounds/smart.jpg b/src/assets/images/backgrounds/smart.jpg new file mode 100644 index 0000000..a0522ec Binary files /dev/null and b/src/assets/images/backgrounds/smart.jpg differ diff --git a/src/assets/images/backgrounds/smart2.jpg b/src/assets/images/backgrounds/smart2.jpg new file mode 100644 index 0000000..07ae2a7 Binary files /dev/null and b/src/assets/images/backgrounds/smart2.jpg differ diff --git a/src/assets/sass/scss/core/layouts/_content.scss b/src/assets/sass/scss/core/layouts/_content.scss index c01a8c2..17656df 100644 --- a/src/assets/sass/scss/core/layouts/_content.scss +++ b/src/assets/sass/scss/core/layouts/_content.scss @@ -167,7 +167,7 @@ html { } &.bg-full-screen-image { - background: url('/assets/images/backgrounds/bg-2.jpg') no-repeat center center fixed; + background: url('/assets/images/backgrounds/smart.jpg') no-repeat center center fixed; background-size: cover; }