This commit is contained in:
Tiago Kayaya
2020-08-28 15:44:03 +01:00
7 changed files with 35 additions and 8 deletions
+5
View File
@@ -1,5 +1,10 @@
<ion-header translucent="true">
<ion-toolbar>
<ion-buttons slot="start">
<button (click)="logout()" class="ion-icon-logout">
<ion-icon name="log-out-outline">Sair</ion-icon>
</button>
</ion-buttons>
<!-- customized TOGGLE button -->
<label class="switch"><input type="checkbox" id="togBtn">
<div class="slider round">
+1 -1
View File
@@ -243,4 +243,4 @@
.slider.round:before {
border-radius: 50%;
border: 1px solid #e16817;
}
}
+9 -2
View File
@@ -6,7 +6,7 @@ import { Router } from '@angular/router';
import { ActivatedRoute, NavigationEnd } from '@angular/router';
import { formatDate } from '@angular/common';
import { AlertService } from 'src/app/services/alert.service';
import { AuthService } from 'src/app/services/auth.service';
@Component({
selector: 'app-events',
@@ -41,7 +41,8 @@ export class EventsPage implements OnInit {
constructor(private eventService: EventsService,
private router: Router,
public activatedRoute: ActivatedRoute,
private alertController: AlertService) { }
private alertController: AlertService,
private authService: AuthService) { }
ngOnInit() {
//Inicializar segment
@@ -118,5 +119,11 @@ export class EventsPage implements OnInit {
this.alertController.presentAlert("Funcionalidade em desenvolvimento!");
}
logout()
{
this.authService.ValidatedUser.BasicAuthKey = "";
this.router.navigate(['/home/login']);
}
}