mirror of
https://github.com/mempool/mempool.git
synced 2024-12-29 09:44:26 +01:00
Merge pull request #1380 from mempool/nymkappa/bugfix/disable-mining-non-bitcoin
Force disable mining dashboard if base_module not mempool
This commit is contained in:
commit
226b345c0a
@ -4,7 +4,7 @@
|
|||||||
<div class="card mb-3">
|
<div class="card mb-3">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<i class="fa fa-area-chart"></i> <span i18n="statistics.memory-by-vBytes">Mempool by vBytes (sat/vByte)</span>
|
<i class="fa fa-area-chart"></i> <span i18n="statistics.memory-by-vBytes">Mempool by vBytes (sat/vByte)</span>
|
||||||
<form [formGroup]="radioGroupForm" class="formRadioGroup" (click)="saveGraphPreference()">
|
<form [formGroup]="radioGroupForm" class="formRadioGroup" [class]="stateService.env.MINING_DASHBOARD ? 'mining' : ''" (click)="saveGraphPreference()">
|
||||||
<div class="btn-group btn-group-toggle" ngbRadioGroup name="radioBasic" formControlName="dateSpan">
|
<div class="btn-group btn-group-toggle" ngbRadioGroup name="radioBasic" formControlName="dateSpan">
|
||||||
<label ngbButtonLabel class="btn-primary btn-sm">
|
<label ngbButtonLabel class="btn-primary btn-sm">
|
||||||
<input ngbButton type="radio" [value]="'2h'" [routerLink]="['/graphs' | relativeUrl]" fragment="2h"> 2H (LIVE)
|
<input ngbButton type="radio" [value]="'2h'" [routerLink]="['/graphs' | relativeUrl]" fragment="2h"> 2H (LIVE)
|
||||||
|
@ -40,14 +40,6 @@
|
|||||||
margin-top: 6px;
|
margin-top: 6px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@media (min-width: 1130px) {
|
|
||||||
position: relative;
|
|
||||||
top: -65px;
|
|
||||||
}
|
|
||||||
@media (min-width: 830px) and (max-width: 1130px) {
|
|
||||||
position: relative;
|
|
||||||
top: 0px;
|
|
||||||
}
|
|
||||||
@media (min-width: 830px) {
|
@media (min-width: 830px) {
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
float: right;
|
float: right;
|
||||||
@ -60,6 +52,16 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.formRadioGroup.mining {
|
||||||
|
@media (min-width: 1130px) {
|
||||||
|
position: relative;
|
||||||
|
top: -65px;
|
||||||
|
}
|
||||||
|
@media (min-width: 830px) and (max-width: 1130px) {
|
||||||
|
position: relative;
|
||||||
|
top: 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.loading{
|
.loading{
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -45,7 +45,7 @@ export class StatisticsComponent implements OnInit {
|
|||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private websocketService: WebsocketService,
|
private websocketService: WebsocketService,
|
||||||
private apiService: ApiService,
|
private apiService: ApiService,
|
||||||
private stateService: StateService,
|
public stateService: StateService,
|
||||||
private seoService: SeoService,
|
private seoService: SeoService,
|
||||||
private storageService: StorageService,
|
private storageService: StorageService,
|
||||||
) { }
|
) { }
|
||||||
|
@ -111,6 +111,10 @@ export class StateService {
|
|||||||
const browserWindowEnv = browserWindow.__env || {};
|
const browserWindowEnv = browserWindow.__env || {};
|
||||||
this.env = Object.assign(defaultEnv, browserWindowEnv);
|
this.env = Object.assign(defaultEnv, browserWindowEnv);
|
||||||
|
|
||||||
|
if (defaultEnv.BASE_MODULE !== 'mempool') {
|
||||||
|
this.env.MINING_DASHBOARD = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.isBrowser) {
|
if (this.isBrowser) {
|
||||||
this.setNetworkBasedonUrl(window.location.pathname);
|
this.setNetworkBasedonUrl(window.location.pathname);
|
||||||
this.isTabHidden$ = fromEvent(document, 'visibilitychange').pipe(map(() => this.isHidden()), shareReplay());
|
this.isTabHidden$ = fromEvent(document, 'visibilitychange').pipe(map(() => this.isHidden()), shareReplay());
|
||||||
|
Loading…
Reference in New Issue
Block a user