This commit is contained in:
Ben Wilson
2023-06-20 23:11:11 -04:00
parent 9aafc19923
commit d9b18b920c
17 changed files with 83 additions and 20 deletions
@@ -0,0 +1,5 @@
<div class="card">
<pre>
{{clientInfo$ | async | json}}
</pre>
</div>
@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { DashboardComponent } from './dashboard.component';
describe('DashboardComponent', () => {
let component: DashboardComponent;
let fixture: ComponentFixture<DashboardComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ DashboardComponent ]
})
.compileComponents();
fixture = TestBed.createComponent(DashboardComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -0,0 +1,19 @@
import { Component } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Observable } from 'rxjs';
import { ClientService } from '../../services/client.service';
@Component({
selector: 'app-dashboard',
templateUrl: './dashboard.component.html',
styleUrls: ['./dashboard.component.scss']
})
export class DashboardComponent {
public clientInfo$: Observable<any>;
constructor(private clientService: ClientService, private route: ActivatedRoute) {
this.clientInfo$ = this.clientService.getClientInfo(this.route.snapshot.params['address']);
}
}
@@ -0,0 +1,20 @@
<div class="py-4 px-4 lg:px-8 mt-5 mx-0 lg:mx-8">
<div class="grid justify-content-center">
<div class="col-12 text-center mt-8 mb-4">
<h2 class="text-900 font-normal mb-2">Public Pool</h2>
</div>
<div class="col-12">
<div class="card text-center">
<code>stratum+tcp://public-pool-web.airdns.org:40557</code>
<div class="field mt-8">
<input [(ngModel)]="address" placeholder="Address" pInputText id="address" type="text"
class="p-inputtext p-component p-element">
<button [disabled]="address == null" class="ml-3" pButton label="My Account"
[routerLink]="['app',address]"></button>
</div>
</div>
</div>
</div>
</div>
@@ -0,0 +1,3 @@
#address {
min-width: 325px;
}
@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { SplashComponent } from './splash.component';
describe('SplashComponent', () => {
let component: SplashComponent;
let fixture: ComponentFixture<SplashComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ SplashComponent ]
})
.compileComponents();
fixture = TestBed.createComponent(SplashComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -0,0 +1,12 @@
import { Component } from '@angular/core';
@Component({
selector: 'app-splash',
templateUrl: './splash.component.html',
styleUrls: ['./splash.component.scss']
})
export class SplashComponent {
public address!: string;
constructor() { }
}