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

This commit is contained in:
nymkappa
2022-07-27 13:20:54 +02:00
parent 16db740986
commit 12eea0e4cc
9 changed files with 123 additions and 46 deletions

View File

@@ -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)">

View File

@@ -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);
}