Auto-formatted every file to keep everything consistent.
This commit is contained in:
@ -2,7 +2,8 @@
|
||||
<main>
|
||||
<mat-form-field>
|
||||
<mat-label>User to impersonate</mat-label>
|
||||
<mat-select (selectionChange)="onChange($event)" [(value)]="impersonated">
|
||||
<mat-select (selectionChange)="onChange($event)"
|
||||
[(value)]="impersonated">
|
||||
<mat-option>{{getUsername()}}</mat-option>
|
||||
@for (user of users; track user.id) {
|
||||
<mat-option [value]="user.id">{{ user.name }}</mat-option>
|
||||
|
@ -10,7 +10,7 @@ describe('ImpersonationComponent', () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [ImpersonationComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(ImpersonationComponent);
|
||||
component = fixture.componentInstance;
|
||||
|
@ -1,5 +1,6 @@
|
||||
<div class="login">
|
||||
<mat-card class="outer" appearance="outlined">
|
||||
<mat-card class="outer"
|
||||
appearance="outlined">
|
||||
<mat-card-header>
|
||||
<h1 class="title">Login</h1>
|
||||
</mat-card-header>
|
||||
@ -8,7 +9,9 @@
|
||||
<p>Log in with your favorite livestream service</p>
|
||||
|
||||
<a>
|
||||
<mat-card appearance="outlined" class="twitch" (click)="login()">
|
||||
<mat-card appearance="outlined"
|
||||
class="twitch"
|
||||
(click)="login()">
|
||||
<mat-card-content>
|
||||
Twitch
|
||||
</mat-card-content>
|
||||
|
@ -10,7 +10,7 @@ describe('LoginComponent', () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [LoginComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(LoginComponent);
|
||||
component = fixture.componentInstance;
|
||||
|
@ -5,29 +5,29 @@ import { Subscription } from 'rxjs';
|
||||
import { environment } from '../../../environments/environment';
|
||||
|
||||
@Component({
|
||||
selector: 'login',
|
||||
standalone: true,
|
||||
imports: [MatCardModule, RouterModule],
|
||||
templateUrl: './login.component.html',
|
||||
styleUrl: './login.component.scss'
|
||||
selector: 'login',
|
||||
standalone: true,
|
||||
imports: [MatCardModule, RouterModule],
|
||||
templateUrl: './login.component.html',
|
||||
styleUrl: './login.component.scss'
|
||||
})
|
||||
export class LoginComponent implements OnInit, OnDestroy {
|
||||
subscription: Subscription | null;
|
||||
subscription: Subscription | null;
|
||||
|
||||
constructor(private router: Router) {
|
||||
this.subscription = null;
|
||||
}
|
||||
constructor(private router: Router) {
|
||||
this.subscription = null;
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
|
||||
}
|
||||
ngOnInit(): void {
|
||||
|
||||
ngOnDestroy(): void {
|
||||
if (this.subscription)
|
||||
this.subscription.unsubscribe()
|
||||
}
|
||||
}
|
||||
|
||||
login() {
|
||||
document.location.replace(environment.API_HOST + '/auth');
|
||||
}
|
||||
ngOnDestroy(): void {
|
||||
if (this.subscription)
|
||||
this.subscription.unsubscribe()
|
||||
}
|
||||
|
||||
login() {
|
||||
document.location.replace(environment.API_HOST + '/auth');
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,8 @@
|
||||
</mat-form-field>
|
||||
</mat-card-content>
|
||||
<mat-card-actions align="end">
|
||||
<button mat-raised-button (click)="login()">Log In</button>
|
||||
<button mat-raised-button
|
||||
(click)="login()">Log In</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
</main>
|
@ -10,7 +10,7 @@ describe('TtsLoginComponent', () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [TtsLoginComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(TtsLoginComponent);
|
||||
component = fixture.componentInstance;
|
||||
|
@ -1,6 +1,7 @@
|
||||
@if (auth.isAuthenticated()) {
|
||||
<main>
|
||||
<mat-card appearance="outlined" class="card">
|
||||
<mat-card appearance="outlined"
|
||||
class="card">
|
||||
<mat-card-header>
|
||||
<mat-card-title>{{username}}</mat-card-title>
|
||||
</mat-card-header>
|
||||
@ -10,9 +11,11 @@
|
||||
<mat-card-actions class="actions">
|
||||
<div>
|
||||
@if (isTTSLoggedIn) {
|
||||
<button mat-raised-button (click)="client.disconnect()"><span class="disconnect">Disconnect</span></button>
|
||||
<button mat-raised-button
|
||||
(click)="client.disconnect()"><span class="disconnect">Disconnect</span></button>
|
||||
}
|
||||
<button mat-raised-button (click)="auth.logout()"><span class="logoff">Log Off</span></button>
|
||||
<button mat-raised-button
|
||||
(click)="auth.logout()"><span class="logoff">Log Off</span></button>
|
||||
</div>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
|
@ -14,10 +14,11 @@ main {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.disconnect, .logoff {
|
||||
.disconnect,
|
||||
.logoff {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.mdc-button ~ .mdc-button {
|
||||
.mdc-button~.mdc-button {
|
||||
margin-left: 1em;
|
||||
}
|
@ -10,7 +10,7 @@ describe('UserCardComponent', () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [UserCardComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(UserCardComponent);
|
||||
component = fixture.componentInstance;
|
||||
|
Reference in New Issue
Block a user