Skip to content

Commit 39d138d

Browse files
committed
Configurable buttons for Webnode BP Starting
Uptime pill
1 parent b152745 commit 39d138d

File tree

7 files changed

+36
-13
lines changed

7 files changed

+36
-13
lines changed

frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "frontend",
3-
"version": "1.0.121",
3+
"version": "1.0.124",
44
"scripts": {
55
"install:deps": "npm install",
66
"start": "npm install && ng serve --configuration local --open",

frontend/src/app/core/services/firestore.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
DocumentData,
1212
} from '@angular/fire/firestore';
1313
import { HttpClient } from '@angular/common/http';
14-
import { catchError, EMPTY, Observable } from 'rxjs';
14+
import { catchError, EMPTY, Observable, of } from 'rxjs';
1515

1616
@Injectable({
1717
providedIn: 'root',
@@ -30,7 +30,7 @@ export class FirestoreService {
3030
return this.http.post(this.cloudFunctionUrl, { data }).pipe(
3131
catchError(error => {
3232
console.error('Error while posting to cloud function:', error);
33-
return error;
33+
return of(null);
3434
}),
3535
);
3636
}

frontend/src/app/features/web-node/web-node-file-upload/web-node-file-upload.component.html

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,16 @@ <h2>Set Up Your Web Node</h2>
6868
}
6969
<div class="buttons-container fx-row-vert-cent flex-between">
7070
<div class="develop-buttons fx-row-vert-cent">
71-
<!-- <button class="btn-aware h-lg border-rad-8 f-500 pl-12 pr-12"-->
72-
<!-- [tooltip]="'Start a develop Block Producer Web Node'"-->
73-
<!-- (click)="onStartDevelopWebnode()">Start BP-->
74-
<!-- </button>-->
75-
<!-- <button class="btn-aware h-lg border-rad-8 f-500 pl-12 pr-12"-->
76-
<!-- [tooltip]="'Start a develop Web Node without Block Producer feature'"-->
77-
<!-- (click)="onStartDevelopWebnodeNonBP()">Start Non BP-->
78-
<!-- </button>-->
71+
@if (!isLeaderboard) {
72+
<button class="btn-aware h-lg border-rad-8 f-500 pl-12 pr-12"
73+
[tooltip]="'Start a develop Block Producer Web Node'"
74+
(click)="onStartDevelopWebnode()">Start BP
75+
</button>
76+
<button class="btn-aware h-lg border-rad-8 f-500 pl-12 pr-12"
77+
[tooltip]="'Start a develop Web Node without Block Producer feature'"
78+
(click)="onStartDevelopWebnodeNonBP()">Start Non BP
79+
</button>
80+
}
7981
</div>
8082
<button class="whitey h-lg border-rad-8 f-500 pl-12 pr-12"
8183
(click)="startCustomWebNode()"

frontend/src/app/features/web-node/web-node-file-upload/web-node-file-upload.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export class WebNodeFileUploadComponent extends ManualDetection {
3030
validFiles: boolean = false;
3131
error: boolean = false;
3232
uploadedFileName: string;
33+
isLeaderboard: boolean = CONFIG.showLeaderboard;
3334

3435
constructor(private webnodeService: WebNodeService) { super(); }
3536

frontend/src/app/layout/uptime-pill/uptime-pill.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<div class="chip mr-8 p-relative h-sm pl-5 pr-5 fx-row-full-cent border-rad-6 text-nowrap"
2+
[class.aware]="uptime.uptimePercentage <= 33.33"
23
[tooltip]="'Uptime tracks node availability in 5-min intervals. Each interval requires 1+ heartbeat while synced. Score reflects total synced intervals.'">
34
<span class="mina-icon icon-300 f-20">beenhere</span>
45
<div>Uptime {{ uptime.uptimePercentage }}% <span>{{ uptime.uptimeTime }}</span></div>

frontend/src/app/layout/uptime-pill/uptime-pill.component.scss

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,25 @@
2828
}
2929
}
3030

31+
&.aware {
32+
&::before {
33+
background-color: $aware-container;
34+
}
35+
36+
div {
37+
color: $aware-primary;
38+
}
39+
40+
span {
41+
color: $aware-secondary;
42+
43+
&.mina-icon {
44+
display: none;
45+
color: $aware-primary;
46+
}
47+
}
48+
}
49+
3150
@media (max-width: 767px) {
3251
width: 100%;
3352
margin-bottom: 5px;

frontend/src/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@
4949
<body class="f-base">
5050
<script>
5151
const deployment = {
52-
dateUTC: '2025-02-05T12:34:44.258Z',
52+
dateUTC: '2025-02-06T07:59:47.969Z',
5353
deviceIp: '5.13.60.20',
5454
deviceOS: 'macOS',
5555
deviceOSVersion: '23.5.0',
56-
version: '1.0.121',
56+
version: '1.0.124',
5757
};
5858
window.deployment = deployment;
5959

0 commit comments

Comments
 (0)