Skip to content

Commit 117d75a

Browse files
committed
Remove notices and manually show warning
1 parent 1f3377d commit 117d75a

File tree

2 files changed

+18
-22
lines changed

2 files changed

+18
-22
lines changed

src/app/dashboard/dashboard.component.html

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
1-
<div class="row">
2-
<app-stats-card class="col-md-12 col-lg-6"></app-stats-card>
3-
<app-pool-history class="col-md-12 col-lg-6"></app-pool-history>
4-
</div>
5-
<div class="row" style="margin-bottom: 1em" *ngIf="hasNotices">
1+
<div class="row" *ngIf="showNotices">
62
<div class="col-12">
7-
<h4>
8-
{{snippetService.getSnippet('dashboard-component.latest-notices.title')}}:
9-
</h4>
103
<div class="row">
11-
<ul>
12-
<li *ngFor="let notice of noticesInTheLastWeekOrLess">
13-
<span style="font-size: 0.8em">{{getFormattedDate(notice.date)}}</span>
14-
<div [innerHTML]="getTranslatedNoticeText(notice)"></div>
15-
</li>
16-
</ul>
4+
<div>
5+
<div class="alert alert-warning d-flex align-items-center" role="alert">
6+
<div>
7+
⚠ Due to a bug in the chia codebase <strong>block forging is currently impacted</strong>. Chia nodes running 2.5.0 and below might stop producing blocks until restarted, and can stop producing blocks again later. <strong>Please upgrade to <a href="{{downloadUrl}}" target="_blank">2.5.1</a> as soon as possible, as the pool rejects all partials from older versions!</strong>
8+
</div>
9+
</div>
10+
</div>
1711
</div>
1812
</div>
1913
</div>
14+
<div class="row">
15+
<app-stats-card class="col-md-12 col-lg-6"></app-stats-card>
16+
<app-pool-history class="col-md-12 col-lg-6"></app-pool-history>
17+
</div>
2018
<div class="row">
2119
<div class="col-lg-12 col-xl-4 col-xxl-4 col-xxxl-9">
2220
<app-top-accounts></app-top-accounts>

src/app/dashboard/dashboard.component.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {StatsService} from '../stats.service'
33
import {SnippetService} from '../snippet.service'
44
import * as moment from 'moment'
55
import {Notice} from '../api/types/pool/pool-config'
6+
import {PoolsProvider} from '../pools.provider'
67

78
@Component({
89
selector: 'app-dashboard',
@@ -14,6 +15,7 @@ export class DashboardComponent {
1415
constructor(
1516
private readonly statsService: StatsService,
1617
private readonly _snippetService: SnippetService,
18+
private readonly poolsProvider: PoolsProvider,
1719
) {}
1820

1921
get snippetService() {
@@ -33,15 +35,11 @@ export class DashboardComponent {
3335
return this.notices.filter(notice => moment(notice.date).isAfter(moment().subtract(1, 'week')))
3436
}
3537

36-
public get hasNotices(): boolean {
37-
return this.noticesInTheLastWeekOrLess.length > 0
38+
public get showNotices(): boolean {
39+
return true
3840
}
3941

40-
public getTranslatedNoticeText(notice: Notice): string {
41-
return notice.text.en
42-
}
43-
44-
getFormattedDate(date) {
45-
return moment(date).format('YYYY-MM-DD')
42+
get downloadUrl(): string {
43+
return this.poolsProvider.pool.downloadUrl
4644
}
4745
}

0 commit comments

Comments
 (0)