2020-04-14 11:28:33 +02:00
|
|
|
import { Component, OnInit } from '@angular/core';
|
|
|
|
import { ConfigService } from '../services/config.service';
|
2019-08-10 16:21:12 +02:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'framadate-debugger',
|
|
|
|
templateUrl: './debugger.component.html',
|
2020-04-14 11:28:33 +02:00
|
|
|
styleUrls: ['./debugger.component.scss'],
|
2019-08-10 16:21:12 +02:00
|
|
|
})
|
|
|
|
export class DebuggerComponent implements OnInit {
|
2019-08-11 16:21:49 +02:00
|
|
|
formIsValid = true;
|
2019-08-10 16:21:12 +02:00
|
|
|
|
2020-04-14 11:28:33 +02:00
|
|
|
constructor(public config: ConfigService) {}
|
2019-08-10 16:21:12 +02:00
|
|
|
|
2020-04-14 11:28:33 +02:00
|
|
|
ngOnInit() {}
|
2019-08-10 16:21:12 +02:00
|
|
|
|
|
|
|
selectOption(key: string, val: any) {
|
|
|
|
if (!this.config[key]) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
this.config[key] = val;
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
2020-01-15 17:55:22 +01:00
|
|
|
|
|
|
|
launchToast() {
|
2020-04-14 11:28:33 +02:00
|
|
|
this.config.handleError({ message: 'hop' });
|
2020-01-15 17:55:22 +01:00
|
|
|
}
|
2019-08-10 16:21:12 +02:00
|
|
|
}
|