[LN ISP chart] Adds toogle to order by nodes/capacity and show/hide Tor

This commit is contained in:
nymkappa committed 2022-07-27 13:20:54 +02:00
1 parent 992e3fa7b9
commit 91c39b57fe
9 files changed
+123 -46

No files matched your search

@@ -1,4 +1,4 @@
<div class="d-flex align-items-center justify-content-end">
<div class="d-flex align-items-center">
<span style="margin-bottom: 0.5rem">{{ textLeft }}</span>&nbsp;
<label class="switch">
<input type="checkbox" (change)="onToggleStatusChanged($event)">
@@ -1,4 +1,4 @@
import { Component, Input, Output, ChangeDetectionStrategy, EventEmitter } from '@angular/core';
import { Component, Input, Output, ChangeDetectionStrategy, EventEmitter, AfterViewInit } from '@angular/core';
@Component({
selector: 'app-toggle',
@@ -6,11 +6,15 @@ import { Component, Input, Output, ChangeDetectionStrategy, EventEmitter } from
styleUrls: ['./toggle.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class ToggleComponent {
export class ToggleComponent implements AfterViewInit {
@Output() toggleStatusChanged = new EventEmitter<boolean>();
@Input() textLeft: string;
@Input() textRight: string;
ngAfterViewInit(): void {
this.toggleStatusChanged.emit(false);
}
onToggleStatusChanged(e): void {
this.toggleStatusChanged.emit(e.target.checked);
}