mirror of
https://github.com/mempool/mempool.git
synced 2025-04-23 06:55:09 +02:00
Merge pull request #3326 from mempool/nymkappa/warning-testnet-signet
Show warning on testnet/signet
This commit is contained in:
commit
97008b9caa
@ -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');
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ import { NgbCollapseModule, NgbTypeaheadModule } from '@ng-bootstrap/ng-bootstra
|
||||
import { FontAwesomeModule, FaIconLibrary } from '@fortawesome/angular-fontawesome';
|
||||
import { faFilter, faAngleDown, faAngleUp, faAngleRight, faAngleLeft, faBolt, faChartArea, faCogs, faCubes, faHammer, faDatabase, faExchangeAlt, faInfoCircle,
|
||||
faLink, faList, faSearch, faCaretUp, faCaretDown, faTachometerAlt, faThList, faTint, faTv, faAngleDoubleDown, faSortUp, faAngleDoubleUp, faChevronDown,
|
||||
faFileAlt, faRedoAlt, faArrowAltCircleRight, faExternalLinkAlt, faBook, faListUl, faDownload, faQrcode, faArrowRightArrowLeft, faArrowsRotate, faCircleLeft } from '@fortawesome/free-solid-svg-icons';
|
||||
faFileAlt, faRedoAlt, faArrowAltCircleRight, faExternalLinkAlt, faBook, faListUl, faDownload, faQrcode, faArrowRightArrowLeft, faArrowsRotate, faCircleLeft, faExclamationTriangle } from '@fortawesome/free-solid-svg-icons';
|
||||
import { InfiniteScrollModule } from 'ngx-infinite-scroll';
|
||||
import { MasterPageComponent } from '../components/master-page/master-page.component';
|
||||
import { PreviewTitleComponent } from '../components/master-page-preview/preview-title.component';
|
||||
@ -309,5 +309,6 @@ export class SharedModule {
|
||||
library.addIcons(faQrcode);
|
||||
library.addIcons(faArrowRightArrowLeft);
|
||||
library.addIcons(faExchangeAlt);
|
||||
library.addIcons(faExclamationTriangle);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user