8000 Force disable mining dashboard if base_module not mempool by nymkappa · Pull Request #1380 · mempool/mempool · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Force disable mining dashboard if base_module not mempool #1380

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="card mb-3">
<div class="card-header">
<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">
<label ngbButtonLabel class="btn-primary btn-sm">
<input ngbButton type="radio" [value]="'2h'" [routerLink]="['/graphs' | relativeUrl]" fragment="2h"> 2H (LIVE)
Expand Down
18 changes: 10 additions & 8 deletions frontend/src/app/components/statistics/statistics.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,6 @@
margin-top: 6px;
display: flex;
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) {
flex-direction: row;
float: right;
Expand All @@ -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{
display: flex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class StatisticsComponent implements OnInit {
private route: ActivatedRoute,
private websocketService: WebsocketService,
private apiService: ApiService,
private stateService: StateService,
public stateService: StateService,
private seoService: SeoService,
private storageService: StorageService,
) { }
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/app/services/state.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ export class StateService {
const browserWindowEnv = browserWindow.__env || {};
this.env = Object.assign(defaultEnv, browserWindowEnv);

if (defaultEnv.BASE_MODULE !== 'mempool') {
this.env.MINING_DASHBOARD = false;
}

if (this.isBrowser) {
this.setNetworkBasedonUrl(window.location.pathname);
this.isTabHidden$ = fromEvent(document, 'visibilitychange').pipe(map(() => this.isHidden()), shareReplay());
Expand Down
0