Fix timestam.
This commit is contained in:
parent
4e06b42cc6
commit
5baffa5fef
@ -34,7 +34,7 @@
|
||||
<strong> {{account?.vcard?.fn[0].value}} </strong>
|
||||
</h3>
|
||||
<span class="ml-auto"><strong>Balance:</strong> {{account?.balance | tokenRatio}} SRF</span>
|
||||
<span class="ml-2"><strong>Created:</strong> {{account?.date_registered | date}}</span>
|
||||
<span class="ml-2"><strong>Created:</strong> {{account?.date_registered | unixDate}}</span>
|
||||
<span class="ml-2"><strong>Address:</strong>
|
||||
<a href="{{bloxbergLink}}" target="_blank"> {{accountAddress}} </a>
|
||||
<img src="assets/images/checklist.svg" class="ml-2" height="20rem" (click)="copyAddress()" alt="Copy">
|
||||
@ -210,7 +210,7 @@
|
||||
<tr>
|
||||
<td>{{account?.vcard?.fn[0].value}}</td>
|
||||
<td>{{account?.balance | tokenRatio}}</td>
|
||||
<td>{{account?.date_registered | date}}</td>
|
||||
<td>{{account?.date_registered | unixDate}}</td>
|
||||
<td>
|
||||
<span *ngIf="accountStatus === 'active'" class="badge badge-success badge-pill">
|
||||
{{accountStatus}}
|
||||
@ -275,7 +275,7 @@
|
||||
|
||||
<ng-container matColumnDef="created">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Created </th>
|
||||
<td mat-cell *matCellDef="let transaction"> {{transaction?.tx.timestamp | date}} </td>
|
||||
<td mat-cell *matCellDef="let transaction"> {{transaction?.tx.timestamp | unixDate}} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="type">
|
||||
@ -337,7 +337,7 @@
|
||||
|
||||
<ng-container matColumnDef="created">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> CREATED </mat-header-cell>
|
||||
<mat-cell *matCellDef="let user"> {{user?.date_registered | date}} </mat-cell>
|
||||
<mat-cell *matCellDef="let user"> {{user?.date_registered | unixDate}} </mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="balance">
|
||||
|
@ -56,7 +56,7 @@
|
||||
|
||||
<ng-container matColumnDef="created">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> CREATED </mat-header-cell>
|
||||
<mat-cell *matCellDef="let user"> {{user?.date_registered | date}} </mat-cell>
|
||||
<mat-cell *matCellDef="let user"> {{user?.date_registered | unixDate}} </mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="balance">
|
||||
|
@ -66,7 +66,7 @@
|
||||
<span>Success: {{transaction.tx.success}}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<span>Timestamp: {{transaction.tx.timestamp | date}}</span>
|
||||
<span>Timestamp: {{transaction.tx.timestamp | unixDate}}</span>
|
||||
</li>
|
||||
</ul><br>
|
||||
<div class="mb-3">
|
||||
|
@ -66,7 +66,7 @@
|
||||
|
||||
<ng-container matColumnDef="created">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Created </th>
|
||||
<td mat-cell *matCellDef="let transaction"> {{transaction?.tx.timestamp | date}} </td>
|
||||
<td mat-cell *matCellDef="let transaction"> {{transaction?.tx.timestamp | unixDate}} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="type">
|
||||
|
8
src/app/shared/_pipes/unix-date.pipe.spec.ts
Normal file
8
src/app/shared/_pipes/unix-date.pipe.spec.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import { UnixDatePipe } from './unix-date.pipe';
|
||||
|
||||
describe('UnixDatePipe', () => {
|
||||
it('create an instance', () => {
|
||||
const pipe = new UnixDatePipe();
|
||||
expect(pipe).toBeTruthy();
|
||||
});
|
||||
});
|
10
src/app/shared/_pipes/unix-date.pipe.ts
Normal file
10
src/app/shared/_pipes/unix-date.pipe.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
|
||||
@Pipe({
|
||||
name: 'unixDate',
|
||||
})
|
||||
export class UnixDatePipe implements PipeTransform {
|
||||
transform(timestamp: number, ...args: unknown[]): any {
|
||||
return new Date(timestamp * 1000).toLocaleDateString('en-GB');
|
||||
}
|
||||
}
|
@ -12,6 +12,7 @@ import { ErrorDialogComponent } from '@app/shared/error-dialog/error-dialog.comp
|
||||
import { MatDialogModule } from '@angular/material/dialog';
|
||||
import { SafePipe } from '@app/shared/_pipes/safe.pipe';
|
||||
import { NetworkStatusComponent } from './network-status/network-status.component';
|
||||
import { UnixDatePipe } from './_pipes/unix-date.pipe';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
@ -24,6 +25,7 @@ import { NetworkStatusComponent } from './network-status/network-status.componen
|
||||
ErrorDialogComponent,
|
||||
SafePipe,
|
||||
NetworkStatusComponent,
|
||||
UnixDatePipe,
|
||||
],
|
||||
exports: [
|
||||
TopbarComponent,
|
||||
@ -33,6 +35,7 @@ import { NetworkStatusComponent } from './network-status/network-status.componen
|
||||
TokenRatioPipe,
|
||||
SafePipe,
|
||||
NetworkStatusComponent,
|
||||
UnixDatePipe,
|
||||
],
|
||||
imports: [CommonModule, RouterModule, MatIconModule, MatDialogModule],
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user