mirror of
https://github.com/benjamin-wilson/public-pool-ui.git
synced 2025-03-28 18:51:47 +01:00
css, links
This commit is contained in:
parent
5027b8c600
commit
f8438bfaac
@ -11,15 +11,15 @@ import { AppRoutingModule } from './app-routing.module';
|
|||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
import { BackgroundParticlesComponent } from './components/background-particles/background-particles.component';
|
import { BackgroundParticlesComponent } from './components/background-particles/background-particles.component';
|
||||||
import { DashboardComponent } from './components/dashboard/dashboard.component';
|
import { DashboardComponent } from './components/dashboard/dashboard.component';
|
||||||
|
import { SettingsComponent } from './components/settings/settings.component';
|
||||||
import { SplashComponent } from './components/splash/splash.component';
|
import { SplashComponent } from './components/splash/splash.component';
|
||||||
|
import { UserAgentLinkComponent } from './components/user-agent-link/user-agent-link.component';
|
||||||
import { WorkerGroupComponent } from './components/worker-group/worker-group.component';
|
import { WorkerGroupComponent } from './components/worker-group/worker-group.component';
|
||||||
import { WorkerComponent } from './components/worker/worker.component';
|
import { WorkerComponent } from './components/worker/worker.component';
|
||||||
import { AppLayoutModule } from './layout/app.layout.module';
|
import { AppLayoutModule } from './layout/app.layout.module';
|
||||||
import { DateAgoPipe } from './pipes/date-ago.pipe';
|
import { DateAgoPipe } from './pipes/date-ago.pipe';
|
||||||
import { HashSuffixPipe } from './pipes/hash-suffix.pipe';
|
import { HashSuffixPipe } from './pipes/hash-suffix.pipe';
|
||||||
import { NumberSuffixPipe } from './pipes/number-suffix.pipe';
|
import { NumberSuffixPipe } from './pipes/number-suffix.pipe';
|
||||||
import { SettingsComponent } from './components/settings/settings.component';
|
|
||||||
import { UserAgentPipe } from './pipes/user-agent.pipe';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ import { UserAgentPipe } from './pipes/user-agent.pipe';
|
|||||||
BackgroundParticlesComponent,
|
BackgroundParticlesComponent,
|
||||||
HashSuffixPipe,
|
HashSuffixPipe,
|
||||||
SettingsComponent,
|
SettingsComponent,
|
||||||
UserAgentPipe
|
UserAgentLinkComponent
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
|
@ -97,13 +97,16 @@
|
|||||||
<ng-template pTemplate="body" let-userAgent>
|
<ng-template pTemplate="body" let-userAgent>
|
||||||
<tr></tr>
|
<tr></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ userAgent.userAgent | userAgent }}</td>
|
<td><app-user-agent-link [userAgent]="userAgent.userAgent"></app-user-agent-link></td>
|
||||||
<td>{{ userAgent.count }}</td>
|
<td>{{ userAgent.count }}</td>
|
||||||
<td>{{ userAgent.totalHashRate | hashSuffix }}</td>
|
<td>{{ userAgent.totalHashRate | hashSuffix }}</td>
|
||||||
<td>{{ userAgent.bestDifficulty | numberSuffix}}</td>
|
<td>{{ userAgent.bestDifficulty | numberSuffix}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</p-table>
|
</p-table>
|
||||||
|
<div class="text-right mt-2">
|
||||||
|
<i class="pi pi-star-fill"></i> = Open Source Software & Hardware
|
||||||
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-template #loadingTable>
|
<ng-template #loadingTable>
|
||||||
<p-table [value]="[{},{},{}]">
|
<p-table [value]="[{},{},{}]">
|
||||||
|
@ -29,4 +29,8 @@
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.pi-star-fill {
|
||||||
|
color: gold;
|
||||||
}
|
}
|
@ -0,0 +1,31 @@
|
|||||||
|
<ng-container [ngSwitch]="userAgent">
|
||||||
|
<ng-container *ngSwitchCase="'NerdMiner'">
|
||||||
|
<a (click)="cancelClick($event)" href="https://github.com/BitMaker-hub/NerdMiner_v2" target="_blank">Nerd Miner
|
||||||
|
<i class="pi pi-external-link"> </i>
|
||||||
|
<i class="pi pi-star-fill"></i>
|
||||||
|
</a>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngSwitchCase="'bitaxe'">
|
||||||
|
<a (click)="cancelClick($event)" href="https://github.com/skot/bitaxe/" target="_blank">Bitaxe
|
||||||
|
<i class="pi pi-external-link"></i>
|
||||||
|
<i class="pi pi-star-fill"></i>
|
||||||
|
</a>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngSwitchCase="'cpuminer'">
|
||||||
|
<a (click)="cancelClick($event)" href="https://github.com/pooler/cpuminer" target="_blank">cpuminer
|
||||||
|
<i class="pi pi-external-link"></i>
|
||||||
|
</a>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngSwitchCase="'Braiins OS'">
|
||||||
|
<a (click)="cancelClick($event)" href="https://braiins.com/os/plus" target="_blank">Braiins OS
|
||||||
|
<i class="pi pi-external-link"></i>
|
||||||
|
</a>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngSwitchCase="'termux-miner'">
|
||||||
|
<a (click)="cancelClick($event)" href="https://github.com/wong-fi-hung/termux-miner"
|
||||||
|
target="_blank">termux-miner
|
||||||
|
<i class="pi pi-external-link"></i>
|
||||||
|
</a>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngSwitchDefault>{{userAgent}}</ng-container>
|
||||||
|
</ng-container>
|
@ -0,0 +1,12 @@
|
|||||||
|
.pi-external-link {
|
||||||
|
|
||||||
|
margin-left: 10px;
|
||||||
|
vertical-align: middle;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.pi-star-fill {
|
||||||
|
margin-left: 25px;
|
||||||
|
color: gold;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { UserAgentLinkComponent } from './user-agent-link.component';
|
||||||
|
|
||||||
|
describe('UserAgentLinkComponent', () => {
|
||||||
|
let component: UserAgentLinkComponent;
|
||||||
|
let fixture: ComponentFixture<UserAgentLinkComponent>;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [UserAgentLinkComponent]
|
||||||
|
});
|
||||||
|
fixture = TestBed.createComponent(UserAgentLinkComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
@ -0,0 +1,19 @@
|
|||||||
|
import { Component, Input } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-user-agent-link',
|
||||||
|
templateUrl: './user-agent-link.component.html',
|
||||||
|
styleUrls: ['./user-agent-link.component.scss']
|
||||||
|
})
|
||||||
|
export class UserAgentLinkComponent {
|
||||||
|
|
||||||
|
@Input('userAgent') userAgent!: string;
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public cancelClick(event: Event) {
|
||||||
|
event.stopImmediatePropagation();
|
||||||
|
}
|
||||||
|
}
|
@ -1,8 +0,0 @@
|
|||||||
import { UserAgentPipe } from './user-agent.pipe';
|
|
||||||
|
|
||||||
describe('UserAgentPipe', () => {
|
|
||||||
it('create an instance', () => {
|
|
||||||
const pipe = new UserAgentPipe();
|
|
||||||
expect(pipe).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
@ -1,17 +0,0 @@
|
|||||||
import { Pipe, PipeTransform } from '@angular/core';
|
|
||||||
|
|
||||||
@Pipe({
|
|
||||||
name: 'userAgent'
|
|
||||||
})
|
|
||||||
export class UserAgentPipe implements PipeTransform {
|
|
||||||
|
|
||||||
transform(value: string): string {
|
|
||||||
const valueLowerCase = value.toLowerCase();
|
|
||||||
if (valueLowerCase.includes('bosminer')) {
|
|
||||||
return 'Braiins OS';
|
|
||||||
} else {
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user