[lightning] claim your node button
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
<div *ngIf="stateService.env.OFFICIAL_MEMPOOL_SPACE === true">
|
||||
|
||||
<div *ngIf="{ value: (nodeOwner$ | async) } as nodeOwner">
|
||||
|
||||
<div *ngIf="nodeOwner.value && nodeOwner.value.sns_id">
|
||||
<a target="_blank" [href]="'https://twitter.com/' + nodeOwner.value.username">
|
||||
<img class="profile-photo" [src]="'data:' + nodeOwner.value.image_mime + ';base64,' + nodeOwner.value.image">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div *ngIf="nodeOwner.value === false">
|
||||
<a [href]="'/login/lnnode?type=signup&pubkey=' + publicKey + '&alias=' + alias" class="btn btn-primary btn-sm">Claim</a>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,4 @@
|
||||
.profile-photo {
|
||||
width: 31px;
|
||||
height: 31px;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { StateService } from '../../services/state.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-node-owner',
|
||||
templateUrl: './node-owner.component.html',
|
||||
styleUrls: ['./node-owner.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class NodeOwnerComponent{
|
||||
@Input() publicKey: string = '';
|
||||
@Input() alias: string = '';
|
||||
@Input() nodeOwner$: Observable<any>;
|
||||
|
||||
constructor(
|
||||
public stateService: StateService
|
||||
) {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user