26 lines
746 B
TypeScript
26 lines
746 B
TypeScript
import {ChangeDetectionStrategy, Component, inject} from '@angular/core';
|
|
import {KeycloakService} from 'keycloak-angular';
|
|
import {MatDialog} from "@angular/material/dialog";
|
|
import {DepositComponent} from "../deposit/deposit.component";
|
|
|
|
@Component({
|
|
selector: 'app-homepage',
|
|
standalone: true,
|
|
imports: [],
|
|
templateUrl: './home.component.html',
|
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
})
|
|
export class HomeComponent {
|
|
private keycloakService: KeycloakService = inject(KeycloakService);
|
|
public dialog: MatDialog = inject(MatDialog);
|
|
|
|
public logout() {
|
|
const baseUrl = window.location.origin;
|
|
|
|
this.keycloakService.logout(`${baseUrl}/`);
|
|
}
|
|
|
|
public openDialog() {
|
|
this.dialog.open(DepositComponent);
|
|
}
|
|
}
|