Merge pull request #3326 from mempool/nymkappa/warning-testnet-signet
Show warning on testnet/signet
This commit is contained in:
@@ -62,6 +62,21 @@
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<div *ngIf="network.val === 'testnet' || network.val === 'signet' || network.val === 'liquidtestnet'">
|
||||
<div class="container p-lg-0 pb-0" style="max-width: 100%; margin-top: 7px" *ngIf="storageService.getValue('hideWarning') !== 'hidden'">
|
||||
<div class="alert alert-danger mb-0 text-center">
|
||||
<div class="d-flex justify-content-center align-items-center">
|
||||
<fa-icon class="between-arrow mr-1" [icon]="['fas', 'exclamation-triangle']" [fixedWidth]="true"></fa-icon>
|
||||
<span i18n="warning-testnet">This is a test network. Coins have no value</span>
|
||||
<fa-icon class="between-arrow ml-1" [icon]="['fas', 'exclamation-triangle']" [fixedWidth]="true"></fa-icon>
|
||||
</div>
|
||||
<button type="button" class="close" (click)="dismissWarning()">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<router-outlet></router-outlet>
|
||||
|
||||
@@ -192,4 +192,19 @@ nav {
|
||||
margin: 33px 0px 0px -19px;
|
||||
font-size: 7px;
|
||||
}
|
||||
}
|
||||
|
||||
.close {
|
||||
position: absolute;
|
||||
color: black;
|
||||
right: 10px;
|
||||
top: 17px;
|
||||
@media (max-width: 620px) {
|
||||
right: 10px;
|
||||
top: 0px;
|
||||
};
|
||||
@media (min-width: 992px) {
|
||||
right: 10px;
|
||||
top: 13px;
|
||||
};
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import { Observable, merge, of } from 'rxjs';
|
||||
import { LanguageService } from '../../services/language.service';
|
||||
import { EnterpriseService } from '../../services/enterprise.service';
|
||||
import { NavigationService } from '../../services/navigation.service';
|
||||
import { StorageService } from '../../services/storage.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-master-page',
|
||||
@@ -26,6 +27,7 @@ export class MasterPageComponent implements OnInit {
|
||||
private languageService: LanguageService,
|
||||
private enterpriseService: EnterpriseService,
|
||||
private navigationService: NavigationService,
|
||||
public storageService: StorageService
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
@@ -46,4 +48,8 @@ export class MasterPageComponent implements OnInit {
|
||||
onResize(event: any) {
|
||||
this.isMobile = window.innerWidth <= 767.98;
|
||||
}
|
||||
|
||||
dismissWarning() {
|
||||
this.storageService.setValue('hideWarning', 'hidden');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user