From 41a2aee38cf812510010da09de9bae53590ec119 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 27 May 2016 16:23:10 +0200 Subject: Follow the angular styleguide for the directories structure --- .../users/components/login/login.component.html | 14 --------- .../users/components/login/login.component.scss | 0 .../users/components/login/login.component.ts | 36 ---------------------- 3 files changed, 50 deletions(-) delete mode 100644 client/angular/users/components/login/login.component.html delete mode 100644 client/angular/users/components/login/login.component.scss delete mode 100644 client/angular/users/components/login/login.component.ts (limited to 'client/angular/users/components/login') diff --git a/client/angular/users/components/login/login.component.html b/client/angular/users/components/login/login.component.html deleted file mode 100644 index 940694515..000000000 --- a/client/angular/users/components/login/login.component.html +++ /dev/null @@ -1,14 +0,0 @@ -

Login

-
-
- - -
- -
- - -
- - -
diff --git a/client/angular/users/components/login/login.component.scss b/client/angular/users/components/login/login.component.scss deleted file mode 100644 index e69de29bb..000000000 diff --git a/client/angular/users/components/login/login.component.ts b/client/angular/users/components/login/login.component.ts deleted file mode 100644 index d339353ef..000000000 --- a/client/angular/users/components/login/login.component.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Component } from '@angular/core'; -import { Router } from '@angular/router-deprecated'; - -import { AuthService } from '../../services/auth.service'; -import { AuthStatus } from '../../models/authStatus'; -import { User } from '../../models/user'; - -@Component({ - selector: 'my-user-login', - styleUrls: [ 'app/angular/users/components/login/login.component.css' ], - templateUrl: 'app/angular/users/components/login/login.component.html' -}) - -export class UserLoginComponent { - constructor(private _authService: AuthService, private _router: Router) {} - - login(username: string, password: string) { - this._authService.login(username, password).subscribe( - result => { - const user = new User(username, result); - user.save(); - - this._authService.setStatus(AuthStatus.LoggedIn); - - this._router.navigate(['VideosList']); - }, - error => { - if (error.error === 'invalid_grant') { - alert('Credentials are invalid.'); - } else { - alert(`${error.error}: ${error.error_description}`); - } - } - ); - } -} -- cgit v1.2.3