Search fix. Channel update.
This commit is contained in:
@@ -111,7 +111,7 @@ export class SearchFormComponent implements OnInit {
|
||||
|
||||
selectedResult(result: any) {
|
||||
if (typeof result === 'string') {
|
||||
this.navigate('/address/', result);
|
||||
this.search();
|
||||
} else if (result.alias) {
|
||||
this.navigate('/lightning/node/', result.public_key);
|
||||
} else if (result.short_id) {
|
||||
|
||||
@@ -36,7 +36,11 @@ export class SearchResultsComponent implements OnChanges {
|
||||
break;
|
||||
case 'Enter':
|
||||
event.preventDefault();
|
||||
this.selectedResult.emit(this.resultsFlattened[this.activeIdx]);
|
||||
if (this.resultsFlattened[this.activeIdx]) {
|
||||
this.selectedResult.emit(this.resultsFlattened[this.activeIdx]);
|
||||
} else {
|
||||
this.selectedResult.emit(this.searchTerm);
|
||||
}
|
||||
this.results = null;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="mb-2 box-top">
|
||||
<div class="box-left">
|
||||
<h2 class="mb-0">{{ channel.alias || '?' }}</h2>
|
||||
<h3 class="mb-0">{{ channel.alias || '?' }}</h3>
|
||||
<a [routerLink]="['/lightning/node' | relativeUrl, channel.public_key]" >
|
||||
{{ channel.public_key | shortenString : 12 }}
|
||||
</a>
|
||||
|
||||
@@ -7,10 +7,14 @@ import { WebsocketService } from 'src/app/services/websocket.service';
|
||||
styleUrls: ['./lightning-wrapper.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class LightningWrapperComponent {
|
||||
export class LightningWrapperComponent implements OnInit {
|
||||
|
||||
constructor(
|
||||
private websocketService: WebsocketService,
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.websocketService.want(['blocks']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user