mirror of
https://github.com/Ride-The-Lightning/RTL.git
synced 2026-08-15 12:50:32 +02:00
Alert incomplete
Alert incomplete
This commit is contained in:
parent
ad35c44e12
commit
3128cfe2b2
12 changed files with 45 additions and 45 deletions
File diff suppressed because one or more lines are too long
|
|
@ -9,8 +9,8 @@
|
|||
<link rel="icon" type="image/png" sizes="32x32" href="assets/images/favicon/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="assets/images/favicon/favicon-16x16.png">
|
||||
<link rel="manifest" href="assets/images/favicon/site.webmanifest">
|
||||
<link rel="stylesheet" href="styles.aef37d250eb6fe1fc81f.css"></head>
|
||||
<link rel="stylesheet" href="styles.a5b94b699c491c77372b.css"></head>
|
||||
<body>
|
||||
<rtl-app></rtl-app>
|
||||
<script src="runtime.c3f23fdc26a5e4a150f7.js"></script><script src="polyfills-es5.92f4069201c83f4833ef.js" nomodule></script><script src="polyfills.5ddcccdb990eb395f306.js"></script><script src="main.f26385c501ba6a776271.js"></script></body>
|
||||
<script src="runtime.2468dfb427c0917909a7.js"></script><script src="polyfills-es5.92f4069201c83f4833ef.js" nomodule></script><script src="polyfills.5ddcccdb990eb395f306.js"></script><script src="main.81428553c1b06d7b04eb.js"></script></body>
|
||||
</html>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
1
angular/runtime.2468dfb427c0917909a7.js
Normal file
1
angular/runtime.2468dfb427c0917909a7.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
!function(e){function r(r){for(var n,i,a=r[0],f=r[1],c=r[2],p=0,s=[];p<a.length;p++)o[i=a[p]]&&s.push(o[i][0]),o[i]=0;for(n in f)Object.prototype.hasOwnProperty.call(f,n)&&(e[n]=f[n]);for(l&&l(r);s.length;)s.shift()();return u.push.apply(u,c||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,a=1;a<t.length;a++)0!==o[t[a]]&&(n=!1);n&&(u.splice(r--,1),e=i(i.s=t[0]))}return e}var n={},o={0:0},u=[];function i(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.e=function(e){var r=[],t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise((function(r,n){t=o[e]=[r,n]}));r.push(t[2]=n);var u,a=document.createElement("script");a.charset="utf-8",a.timeout=120,i.nc&&a.setAttribute("nonce",i.nc),a.src=function(e){return i.p+""+({}[e]||e)+"."+{1:"50859d501eab13ab41b8",6:"94d16dc6ed641f0bae08",7:"1e934fd67e224f7027ff"}[e]+".js"}(e);var f=new Error;u=function(r){a.onerror=a.onload=null,clearTimeout(c);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),u=r&&r.target&&r.target.src;f.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",f.name="ChunkLoadError",f.type=n,f.request=u,t[1](f)}o[e]=void 0}};var c=setTimeout((function(){u({type:"timeout",target:a})}),12e4);a.onerror=a.onload=u,document.head.appendChild(a)}return Promise.all(r)},i.m=e,i.c=n,i.d=function(e,r,t){i.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,r){if(1&r&&(e=i(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)i.d(t,n,(function(r){return e[r]}).bind(null,n));return t},i.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(r,"a",r),r},i.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},i.p="",i.oe=function(e){throw console.error(e),e};var a=window.webpackJsonp=window.webpackJsonp||[],f=a.push.bind(a);a.push=r,a=a.slice();for(var c=0;c<a.length;c++)r(a[c]);var l=f;t()}([]);
|
||||
|
|
@ -1 +0,0 @@
|
|||
!function(e){function r(r){for(var n,a,i=r[0],c=r[1],f=r[2],p=0,s=[];p<i.length;p++)o[a=i[p]]&&s.push(o[a][0]),o[a]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(l&&l(r);s.length;)s.shift()();return u.push.apply(u,f||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++)0!==o[t[i]]&&(n=!1);n&&(u.splice(r--,1),e=a(a.s=t[0]))}return e}var n={},o={0:0},u=[];function a(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.e=function(e){var r=[],t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise((function(r,n){t=o[e]=[r,n]}));r.push(t[2]=n);var u,i=document.createElement("script");i.charset="utf-8",i.timeout=120,a.nc&&i.setAttribute("nonce",a.nc),i.src=function(e){return a.p+""+({}[e]||e)+"."+{1:"50859d501eab13ab41b8",6:"94d16dc6ed641f0bae08",7:"adcdf40dea4654bb36af"}[e]+".js"}(e);var c=new Error;u=function(r){i.onerror=i.onload=null,clearTimeout(f);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),u=r&&r.target&&r.target.src;c.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",c.name="ChunkLoadError",c.type=n,c.request=u,t[1](c)}o[e]=void 0}};var f=setTimeout((function(){u({type:"timeout",target:i})}),12e4);i.onerror=i.onload=u,document.head.appendChild(i)}return Promise.all(r)},a.m=e,a.c=n,a.d=function(e,r,t){a.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,r){if(1&r&&(e=a(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(a.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)a.d(t,n,(function(r){return e[r]}).bind(null,n));return t},a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,"a",r),r},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.p="",a.oe=function(e){throw console.error(e),e};var i=window.webpackJsonp=window.webpackJsonp||[],c=i.push.bind(i);i.push=r,i=i.slice();for(var f=0;f<i.length;f++)r(i[f]);var l=c;t()}([]);
|
||||
1
angular/styles.a5b94b699c491c77372b.css
Normal file
1
angular/styles.a5b94b699c491c77372b.css
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -93,13 +93,12 @@ export class OnChainTransactionHistoryComponent implements OnInit, OnDestroy {
|
|||
const selTransaction = this.listTransactions.data.filter(transaction => {
|
||||
return transaction.tx_hash === selRow.tx_hash;
|
||||
})[0];
|
||||
const reorderedTransactions = JSON.parse(JSON.stringify(selTransaction, [
|
||||
'dest_addresses', 'time_stamp_str', 'num_confirmations', 'total_fees', 'block_hash', 'block_height', 'tx_hash', 'amount'
|
||||
] , 2));
|
||||
this.store.dispatch(new RTLActions.OpenAlert({ width: '75%', data: {
|
||||
const reorderedTransactions = JSON.parse(JSON.stringify(selTransaction, ['dest_addresses', 'block_hash', 'tx_hash', 'time_stamp_str', 'block_height', 'num_confirmations', 'total_fees', 'amount'], 2));
|
||||
this.store.dispatch(new RTLActions.OpenAlert({ width: '35%', data: {
|
||||
type: AlertTypeEnum.INFORMATION,
|
||||
alertTitle: 'Transaction Information',
|
||||
message: JSON.stringify(reorderedTransactions)
|
||||
message: JSON.stringify(reorderedTransactions),
|
||||
messageFieldsBreakdown: [1, 1, 1, 2, 3]
|
||||
}}));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,27 +9,18 @@
|
|||
<mat-card-content class="mt-5px">
|
||||
<div fxLayout="column">
|
||||
<p *ngIf="data.titleMessage" fxLayoutAlign="start center" class="title-message pb-1 pl-1">{{data.titleMessage | titlecase}}</p>
|
||||
<div *ngIf="messageObj?.length>0">
|
||||
<div *ngFor="let obj of messageObj">
|
||||
<div fxLayout="column" fxFlex="100" fxFlex.gt-md="50">
|
||||
<h4 fxLayoutAlign="start" class="font-bold-500">{{obj[0] | titlecase}}</h4>
|
||||
<span class="foreground-secondary-text" *ngIf="isNumber(obj[1], obj[0]);else notNumberTemplate">{{obj[1] | number:'1.0-3'}}</span>
|
||||
<ng-template #notNumberTemplate>
|
||||
<span fxFlex="100">{{obj[1]}}
|
||||
<fa-icon *ngIf="showCopyOption(obj[0])" rtlClipboard [payload]="obj[1]" (copied)="copiedText($event)" [icon]="faCopy"></fa-icon>
|
||||
<span *ngIf="showCopyOption(obj[0])" [hidden]="!flgCopied">Copied</span>
|
||||
</span>
|
||||
<div *ngIf="showCopyOption(obj[0])" fxFlex="100" fxLayoutAlign.gt-sm="start center">
|
||||
<qrcode [qrdata]="obj[1]" [size]="120" [level]="'L'" [allowEmptyString]="true" [ngStyle]="{'visibility': (obj[1] === '') ? 'hidden' : 'visible'}" class="qr-border"></qrcode>
|
||||
</div>
|
||||
</ng-template>
|
||||
<mat-divider class="w-100 my-1"></mat-divider>
|
||||
<div *ngIf="messageObjs?.length>0">
|
||||
<div *ngFor="let objs of messageObjs; index as i;">
|
||||
<div fxLayout="row wrap" fxLayoutAlign="start center" fxLayoutAlign.gt-md="space-between start">
|
||||
<div fxLayout="column" fxFlex="100" fxFlex.gt-md="{{100/messageFieldsBreakdown[i]}}" *ngFor="let obj of objs">
|
||||
<h4 fxLayoutAlign="start" class="font-bold-500">{{obj[0] | titlecase}}</h4>
|
||||
<span fxFlex="100" class="foreground-secondary-text" *ngIf="isNumber(obj[1], obj[0]);else notNumberTemplate">{{obj[1] | number:'1.0-3'}}</span>
|
||||
<ng-template #notNumberTemplate>
|
||||
<span fxFlex="100" class="foreground-secondary-text">{{obj[1]}}</span>
|
||||
</ng-template>
|
||||
<mat-divider class="w-100 my-1"></mat-divider>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="column" fxFlex="100" fxFlex.gt-md="50">
|
||||
<h4 fxLayoutAlign="start" class="font-bold-500">{{obj[0] | titlecase}}</h4>
|
||||
<span class="foreground-secondary-text">{{obj[1]}}</span>
|
||||
<mat-divider class="w-100 my-1"></mat-divider>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-2" fxLayout="row" fxLayoutAlign="end center">
|
||||
|
|
|
|||
|
|
@ -14,7 +14,9 @@ import { AlertTypeEnum } from '../../../services/consts-enums-functions';
|
|||
export class AlertMessageComponent implements OnInit {
|
||||
public msgTypeBackground = 'bg-primary p-1';
|
||||
public msgTypeForeground = 'primary';
|
||||
public messageObj = [];
|
||||
public messageObjsArr = [];
|
||||
public messageObjs = [];
|
||||
public messageFieldsBreakdown = [];
|
||||
public flgCopied = false;
|
||||
public faCopy = faCopy;
|
||||
public alertTypeEnum = AlertTypeEnum;
|
||||
|
|
@ -22,20 +24,20 @@ export class AlertMessageComponent implements OnInit {
|
|||
constructor(public dialogRef: MatDialogRef<AlertMessageComponent>, @Inject(MAT_DIALOG_DATA) public data: AlertData, private logger: LoggerService) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.messageFieldsBreakdown = this.data.messageFieldsBreakdown;
|
||||
this.setStyleOnAlertType();
|
||||
this.convertJSONData();
|
||||
}
|
||||
|
||||
setStyleOnAlertType() {
|
||||
// INFO/WARN/ERROR/SUCCESS/CONFIRM
|
||||
if (this.data.type === 'WARN') {
|
||||
if (this.data.type === AlertTypeEnum.WARNING) {
|
||||
this.msgTypeBackground = 'bg-primary p-1';
|
||||
this.msgTypeForeground = 'primary';
|
||||
}
|
||||
if (this.data.type === 'ERROR') {
|
||||
if (this.data.type === AlertTypeEnum.ERROR) {
|
||||
this.msgTypeBackground = 'bg-warn p-1';
|
||||
this.msgTypeForeground = 'warn';
|
||||
if (undefined === this.data.message && undefined === this.data.titleMessage && this.messageObj.length <= 0 ) {
|
||||
if (undefined === this.data.message && undefined === this.data.titleMessage && this.messageObjsArr.length <= 0 ) {
|
||||
this.data.titleMessage = 'Please Check Server Connection';
|
||||
}
|
||||
}
|
||||
|
|
@ -52,24 +54,30 @@ export class AlertMessageComponent implements OnInit {
|
|||
this.data.message.substring(arrayEndIdx + 1));
|
||||
}
|
||||
// End: For Payment Path
|
||||
this.messageObj = (this.data.message === '') ? [] : this.data.message.split(',');
|
||||
this.messageObj.forEach((obj, idx) => {
|
||||
this.messageObj[idx] = obj.split(':');
|
||||
this.messageObj[idx][0] = this.messageObj[idx][0].replace('_str', '');
|
||||
this.messageObj[idx][0] = this.messageObj[idx][0].replace(/_/g, ' '); // To replace Backend Data's '_'
|
||||
this.messageObjsArr = (this.data.message === '') ? [] : this.data.message.split(',');
|
||||
this.messageObjsArr.forEach((obj, idx) => {
|
||||
this.messageObjsArr[idx] = obj.split(':');
|
||||
this.messageObjsArr[idx][0] = this.messageObjsArr[idx][0].replace('_str', '');
|
||||
this.messageObjsArr[idx][0] = this.messageObjsArr[idx][0].replace(/_/g, ' '); // To replace Backend Data's '_'
|
||||
// Start: To Merge Time Value Again with ':', example Payment Creation Time
|
||||
if (this.messageObj[idx].length > 2) {
|
||||
this.messageObj[idx].forEach((dataValue, j) => {
|
||||
if (this.messageObjsArr[idx].length > 2) {
|
||||
this.messageObjsArr[idx].forEach((dataValue, j) => {
|
||||
if (j === 0 || j === 1) {
|
||||
return;
|
||||
} else {
|
||||
this.messageObj[idx][1] = this.messageObj[idx][1] + ':' + this.messageObj[idx][j];
|
||||
this.messageObjsArr[idx][1] = this.messageObjsArr[idx][1] + ':' + this.messageObjsArr[idx][j];
|
||||
}
|
||||
});
|
||||
}
|
||||
// End: To Merge Time Value Again with ':', example Payment Creation Time
|
||||
});
|
||||
console.warn(this.messageObj);
|
||||
for (let i = 0; i < this.messageFieldsBreakdown.length; i++) {
|
||||
this.messageObjs[i] = [];
|
||||
for (let j = 0, k = i; k < (i + this.messageFieldsBreakdown[i]); j++, k++) {
|
||||
this.messageObjs[i][j] = this.messageObjsArr[k];
|
||||
}
|
||||
}
|
||||
console.warn(this.messageObjs);
|
||||
}
|
||||
|
||||
showCopyOption(key): boolean {
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ export interface AlertData {
|
|||
alertTitle?: string;
|
||||
titleMessage?: string;
|
||||
message?: string;
|
||||
messageFieldsBreakdown?: Array<number>;
|
||||
noBtnText?: string;
|
||||
yesBtnText?: string;
|
||||
flgShowInput?: boolean;
|
||||
|
|
|
|||
|
|
@ -146,6 +146,7 @@
|
|||
|
||||
.foreground-secondary-text {
|
||||
color: $foreground-secondary-text !important;
|
||||
white-space: pre-line;
|
||||
}
|
||||
|
||||
.foreground.mat-progress-spinner circle, .foreground.mat-spinner circle {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue