Browse Source

remove as auth0 works now

master
Quildra 2 years ago
parent
commit
9f257e43d3
  1. 18
      packages/bridge-ui/src/app/components/login-dialog/login-dialog.component.html
  2. 12
      packages/bridge-ui/src/app/components/login-dialog/login-dialog.component.scss
  3. 23
      packages/bridge-ui/src/app/components/login-dialog/login-dialog.component.spec.ts
  4. 62
      packages/bridge-ui/src/app/components/login-dialog/login-dialog.component.ts

18
packages/bridge-ui/src/app/components/login-dialog/login-dialog.component.html

@ -1,18 +0,0 @@
<div class="signInForm">
<h1 mat-dialog-title>Login</h1>
<div mat-dialog-content>
<mat-form-field class="full-width">
<mat-label>Username</mat-label>
<input matInput type="text" id="username" [formControl]="username" name="username" required>
</mat-form-field>
<br/>
<mat-form-field class="full-width">
<mat-label>Password</mat-label>
<input matInput type="password" id="password" [formControl]="password" name="password" required>
</mat-form-field>
</div>
<mat-dialog-actions align="end">
<button mat-button mat-dialog-close>Cancel</button>
<button mat-button mat-dialog-close (click)="login()">Login</button>
</mat-dialog-actions>
</div>

12
packages/bridge-ui/src/app/components/login-dialog/login-dialog.component.scss

@ -1,12 +0,0 @@
.signInForm {
width: 400px;
padding: 12px 24px 24px;
igx-input-group + igx-input-group {
margin-top: 24px;
}
}
.full-width {
width: 100%;
}

23
packages/bridge-ui/src/app/components/login-dialog/login-dialog.component.spec.ts

@ -1,23 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { LoginDialogComponent } from './login-dialog.component';
describe('LoginDialogComponent', () => {
let component: LoginDialogComponent;
let fixture: ComponentFixture<LoginDialogComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [LoginDialogComponent]
})
.compileComponents();
fixture = TestBed.createComponent(LoginDialogComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

62
packages/bridge-ui/src/app/components/login-dialog/login-dialog.component.ts

@ -1,62 +0,0 @@
import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';
import { ReactiveFormsModule, FormControl } from '@angular/forms';
import { FormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatDialogModule } from '@angular/material/dialog';
import { MatInputModule } from '@angular/material/input';
import { MatFormFieldModule } from '@angular/material/form-field';
import {
MatDialog,
MAT_DIALOG_DATA,
MatDialogRef,
MatDialogTitle,
MatDialogContent,
MatDialogActions,
MatDialogClose,
} from '@angular/material/dialog';
import { AuthService } from '../../services/auth.service';
@Component({
selector: 'app-login-dialog',
standalone: true,
imports: [
CommonModule,
ReactiveFormsModule,
MatButtonModule,
MatDialogModule,
MatInputModule,
MatFormFieldModule,
FormsModule,
MatDialogTitle,
MatDialogContent,
MatDialogActions,
MatDialogClose,
],
templateUrl: './login-dialog.component.html',
styleUrl: './login-dialog.component.scss'
})
export class LoginDialogComponent {
username = new FormControl('');
password = new FormControl('');
constructor(private authService: AuthService) {}
login(): void {
let username = this.username.value != undefined ? this.username.value : "";
let password = this.password.value != undefined ? this.password.value : "";
/*
this.authService.login(username, password).subscribe(data => {
console.log(data)
if (data.access_token) {
localStorage.setItem('token', data.access_token);
window.location.reload();
}
})
*/
}
}
Loading…
Cancel
Save