Redesigned testnet alert

fixes #3625
This commit is contained in:
softsimon
2023-04-03 16:25:10 +09:00
parent 8ab7930936
commit c0a4d01174
8 changed files with 66 additions and 38 deletions

View File

@@ -90,6 +90,8 @@
</nav>
</header>
<app-testnet-alert *ngIf="network.val === 'liquidtestnet'"></app-testnet-alert>
<br />
<router-outlet></router-outlet>

View File

@@ -62,20 +62,7 @@
</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">&times;</span>
</button>
</div>
</div>
</div>
<app-testnet-alert *ngIf="network.val === 'testnet' || network.val === 'signet'"></app-testnet-alert>
<br />

View File

@@ -193,18 +193,3 @@ nav {
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;
};
}

View File

@@ -1,10 +1,9 @@
import { Component, Inject, OnInit } from '@angular/core';
import { Component, OnInit } from '@angular/core';
import { Env, StateService } from '../../services/state.service';
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',
@@ -27,7 +26,6 @@ export class MasterPageComponent implements OnInit {
private languageService: LanguageService,
private enterpriseService: EnterpriseService,
private navigationService: NavigationService,
public storageService: StorageService
) { }
ngOnInit() {
@@ -48,8 +46,4 @@ export class MasterPageComponent implements OnInit {
onResize(event: any) {
this.isMobile = window.innerWidth <= 767.98;
}
dismissWarning() {
this.storageService.setValue('hideWarning', 'hidden');
}
}