2020-09-21 19:41:12 +07:00
|
|
|
|
2021-06-06 17:07:04 -03:00
|
|
|
<div class="container-xl dashboard-container">
|
2020-09-22 12:50:12 +07:00
|
|
|
<div class="row row-cols-1 row-cols-md-2" *ngIf="{ value: (mempoolInfoData$ | async) } as mempoolInfoData">
|
2020-10-27 16:34:27 +07:00
|
|
|
<ng-template [ngIf]="collapseLevel === 'three'" [ngIfElse]="expanded">
|
2021-07-29 12:32:54 +03:00
|
|
|
<div class="col card-wrapper" *ngIf="(network$ | async) !== 'liquid'">
|
2021-07-26 16:00:40 -03:00
|
|
|
<div class="main-title" i18n="fees-box.transaction-fees">Transaction Fees</div>
|
2021-06-06 17:07:04 -03:00
|
|
|
<div class="card">
|
2020-10-27 02:58:29 +07:00
|
|
|
<div class="card-body">
|
|
|
|
<app-fees-box class="d-block"></app-fees-box>
|
|
|
|
</div>
|
2020-09-21 19:41:12 +07:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-08-13 17:16:14 +03:00
|
|
|
<div class="col" *ngIf="(network$ | async) !== 'liquid'">
|
2021-08-06 16:38:44 +05:30
|
|
|
<ng-container *ngTemplateOutlet="difficultyEpoch"></ng-container>
|
|
|
|
</div>
|
2021-06-06 17:07:04 -03:00
|
|
|
<div class="col">
|
|
|
|
<div class="card">
|
2020-10-27 02:58:29 +07:00
|
|
|
<div class="card-body">
|
|
|
|
<ng-container *ngTemplateOutlet="mempoolTable; context: { $implicit: mempoolInfoData }"></ng-container>
|
2020-09-21 19:41:12 +07:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-06-06 17:07:04 -03:00
|
|
|
<div class="col">
|
|
|
|
<div class="card">
|
2020-10-27 02:58:29 +07:00
|
|
|
<div class="card-body">
|
|
|
|
<ng-container *ngTemplateOutlet="txPerSecond; context: { $implicit: mempoolInfoData }"></ng-container>
|
2020-09-27 01:31:20 +07:00
|
|
|
</div>
|
2020-10-27 02:58:29 +07:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</ng-template>
|
|
|
|
<ng-template #expanded>
|
2021-07-29 12:32:54 +03:00
|
|
|
<div class="col card-wrapper" *ngIf="(network$ | async) !== 'liquid'">
|
2021-07-26 16:00:40 -03:00
|
|
|
<div class="main-title" i18n="fees-box.transaction-fees">Transaction Fees</div>
|
2021-06-06 17:07:04 -03:00
|
|
|
<div class="card">
|
2020-10-27 02:58:29 +07:00
|
|
|
<div class="card-body">
|
|
|
|
<app-fees-box class="d-block"></app-fees-box>
|
2020-09-26 22:46:26 +07:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-07-29 12:32:54 +03:00
|
|
|
<div class="col" *ngIf="(network$ | async) !== 'liquid'">
|
2020-10-27 02:58:29 +07:00
|
|
|
<ng-container *ngTemplateOutlet="difficultyEpoch"></ng-container>
|
|
|
|
</div>
|
2021-06-06 17:07:04 -03:00
|
|
|
<div class="col">
|
|
|
|
<div class="card graph-card">
|
2020-10-27 02:58:29 +07:00
|
|
|
<div class="card-body pl-0">
|
|
|
|
<div style="padding-left: 1.25rem;">
|
|
|
|
<ng-container *ngTemplateOutlet="mempoolTable; context: { $implicit: mempoolInfoData }"></ng-container>
|
|
|
|
<hr>
|
|
|
|
</div>
|
2021-06-06 17:07:04 -03:00
|
|
|
<div class="mempool-graph" *ngIf="(mempoolStats$ | async) as mempoolStats">
|
2020-10-27 02:58:29 +07:00
|
|
|
<app-mempool-graph [data]="mempoolStats.mempool" [showLegend]="false" [offsetX]="20" [small]="true"></app-mempool-graph>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-06-06 17:07:04 -03:00
|
|
|
<div class="col">
|
|
|
|
<div class="card graph-card">
|
2020-10-27 02:58:29 +07:00
|
|
|
<div class="card-body">
|
|
|
|
<ng-container *ngTemplateOutlet="txPerSecond; context: { $implicit: mempoolInfoData }"></ng-container>
|
2020-09-27 02:24:50 +07:00
|
|
|
<br>
|
|
|
|
<hr>
|
2021-06-06 17:07:04 -03:00
|
|
|
<div class="mempool-graph" *ngIf="(mempoolStats$ | async) as mempoolStats">
|
2020-09-27 01:31:20 +07:00
|
|
|
<app-chartist
|
|
|
|
[data]="mempoolStats.weightPerSecond"
|
|
|
|
[type]="'Line'"
|
|
|
|
[options]="transactionsWeightPerSecondOptions">
|
|
|
|
</app-chartist>
|
|
|
|
</div>
|
2020-10-27 02:58:29 +07:00
|
|
|
</div>
|
2020-09-26 22:46:26 +07:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-10-27 16:34:27 +07:00
|
|
|
<ng-template [ngIf]="collapseLevel === 'one'">
|
2021-06-06 17:07:04 -03:00
|
|
|
<div class="col">
|
|
|
|
<div class="card">
|
2020-10-27 02:58:29 +07:00
|
|
|
<div class="card-body">
|
Implement i18n support in frontend using Angular + Transifex + NGINX
This PR adds basic i18n support into the mempool frontend, together with
a smooth workflow for developers and translators to collaborate:
* Using the existing @angular/localize module, developers add i18n
metadata to any frontend strings their new features or changes modify
* Using the new npm script `i18n-extract-from-source`, developers
extract the i18n data from source code into `src/locale/messages.xlf`
* After pushing the updated `src/locale/messages.xlf` to GitHub, the
Transifex service will update its database from the new source data
* Using the Transifex website UI, translators can work together to
translate all the mempool frontend strings into their native languages
* Using the new npm script `i18n-pull-from-transifex`, developers can
pull in completed translations from Transifex, and commit them into git.
This flow requires an API key from Transifex, which can be obtained at
https://www.transifex.com/user/settings/api/ to be used with the python
script installed by `pip install transifex-client` - after preparing
these, run the npm script which will ask you for the API key the first
time. When downloading is complete, you can test building the frontend,
and if successful, commit the new strings files into git.
This PR implements a new locale selector in the footer of the homepage
dashboard, and includes WIP translations for the following languages:
* Czech (cs)
* German (de)
* Japanese (ja)
* Norwegian (nn)
* Spanish (es)
* Swedish (sv)
* Ukrainian (uk)
* Persian (fa)
* Portugese (pt)
* Turkish (tr)
* Dutch (nl)
* French (fr)
* Chinese (zh)
* Slovenian (sl)
* Korean (ko)
* Polish (pl)
The user-agent's `Accept-Language` header is used to automatically
detect their preferred language, which can be manually overriden by the
pull-down selector, which saves their preference to a cookie, which is
used by nginx to serve the correct HTML bundle to the user.
Remaining tasks include adding i18n metadata for strings in the Bisq and
Liquid frontend code, mouseover hover tooltip strings, hard-coded og
metadata inside HTML templates, and many other places. This will be done
in a separate PR.
When upgrading to add i18n support, mempool instance operators must take
care to install the new nginx.conf and nginx-mempool.conf files, and
tweak for their specific site configuration.
Fixes #81
2020-12-02 04:19:33 +09:00
|
|
|
<h5 class="card-title" i18n="dashboard.latest-blocks">Latest blocks</h5>
|
2021-05-03 10:11:30 -03:00
|
|
|
<table class="table lastest-blocks-table">
|
2020-10-27 02:58:29 +07:00
|
|
|
<thead>
|
2021-05-03 10:11:30 -03:00
|
|
|
<th class="table-cell-height" i18n="dashboard.latest-blocks.height">Height</th>
|
|
|
|
<th class="table-cell-mined" i18n="dashboard.latest-blocks.mined">Mined</th>
|
|
|
|
<th class="table-cell-transaction-count" i18n="dashboard.latest-blocks.transaction-count">TXs</th>
|
|
|
|
<th class="table-cell-size" i18n="dashboard.latest-blocks.size">Size</th>
|
2020-10-27 02:58:29 +07:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr *ngFor="let block of blocks$ | async; let i = index; trackBy: trackByBlock">
|
2021-05-03 10:11:30 -03:00
|
|
|
<td class="table-cell-height" ><a [routerLink]="['/block' | relativeUrl, block.id]" [state]="{ data: { block: block } }">{{ block.height }}</a></td>
|
|
|
|
<td class="table-cell-mined" ><app-time-since [time]="block.timestamp" [fastRender]="true"></app-time-since></td>
|
|
|
|
<td class="table-cell-transaction-count">{{ block.tx_count | number }}</td>
|
|
|
|
<td class="table-cell-size">
|
2021-01-12 20:45:41 +07:00
|
|
|
<div class="progress">
|
2021-08-08 04:19:54 +03:00
|
|
|
<div class="progress-bar progress-mempool {{ network$ | async }}" role="progressbar" [ngStyle]="{'width': (block.weight / stateService.env.BLOCK_WEIGHT_UNITS)*100 + '%' }"> </div>
|
2021-05-18 11:20:17 -03:00
|
|
|
<div class="progress-text" [innerHTML]="block.size | bytes: 2"></div>
|
2020-10-27 02:58:29 +07:00
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2021-06-06 17:07:04 -03:00
|
|
|
<div class=""><a href="" [routerLink]="['/blocks' | relativeUrl]" i18n="dashboard.view-all">View all »</a></div>
|
2020-10-27 02:58:29 +07:00
|
|
|
</div>
|
2020-09-26 02:11:30 +07:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-06-06 17:07:04 -03:00
|
|
|
<div class="col">
|
|
|
|
<div class="card">
|
2020-10-27 02:58:29 +07:00
|
|
|
<div class="card-body">
|
Implement i18n support in frontend using Angular + Transifex + NGINX
This PR adds basic i18n support into the mempool frontend, together with
a smooth workflow for developers and translators to collaborate:
* Using the existing @angular/localize module, developers add i18n
metadata to any frontend strings their new features or changes modify
* Using the new npm script `i18n-extract-from-source`, developers
extract the i18n data from source code into `src/locale/messages.xlf`
* After pushing the updated `src/locale/messages.xlf` to GitHub, the
Transifex service will update its database from the new source data
* Using the Transifex website UI, translators can work together to
translate all the mempool frontend strings into their native languages
* Using the new npm script `i18n-pull-from-transifex`, developers can
pull in completed translations from Transifex, and commit them into git.
This flow requires an API key from Transifex, which can be obtained at
https://www.transifex.com/user/settings/api/ to be used with the python
script installed by `pip install transifex-client` - after preparing
these, run the npm script which will ask you for the API key the first
time. When downloading is complete, you can test building the frontend,
and if successful, commit the new strings files into git.
This PR implements a new locale selector in the footer of the homepage
dashboard, and includes WIP translations for the following languages:
* Czech (cs)
* German (de)
* Japanese (ja)
* Norwegian (nn)
* Spanish (es)
* Swedish (sv)
* Ukrainian (uk)
* Persian (fa)
* Portugese (pt)
* Turkish (tr)
* Dutch (nl)
* French (fr)
* Chinese (zh)
* Slovenian (sl)
* Korean (ko)
* Polish (pl)
The user-agent's `Accept-Language` header is used to automatically
detect their preferred language, which can be manually overriden by the
pull-down selector, which saves their preference to a cookie, which is
used by nginx to serve the correct HTML bundle to the user.
Remaining tasks include adding i18n metadata for strings in the Bisq and
Liquid frontend code, mouseover hover tooltip strings, hard-coded og
metadata inside HTML templates, and many other places. This will be done
in a separate PR.
When upgrading to add i18n support, mempool instance operators must take
care to install the new nginx.conf and nginx-mempool.conf files, and
tweak for their specific site configuration.
Fixes #81
2020-12-02 04:19:33 +09:00
|
|
|
<h5 class="card-title" i18n="dashboard.latest-transactions">Latest transactions</h5>
|
2021-05-03 10:11:30 -03:00
|
|
|
<table class="table latest-transactions">
|
2020-10-27 02:58:29 +07:00
|
|
|
<thead>
|
2021-05-03 10:11:30 -03:00
|
|
|
<th class="table-cell-txid" i18n="dashboard.latest-transactions.txid">TXID</th>
|
|
|
|
<th class="table-cell-satoshis" i18n="dashboard.latest-transactions.amount">Amount</th>
|
|
|
|
<th class="table-cell-fiat" *ngIf="(network$ | async) === ''" i18n="dashboard.latest-transactions.USD">USD</th>
|
|
|
|
<th class="table-cell-fees" i18n="dashboard.latest-transactions.fee">Fee</th>
|
2020-10-27 02:58:29 +07:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr *ngFor="let transaction of transactions$ | async; let i = index;">
|
2021-05-03 10:11:30 -03:00
|
|
|
<td class="table-cell-txid"><a [routerLink]="['/tx' | relativeUrl, transaction.txid]">{{ transaction.txid | shortenString : 10 }}</a></td>
|
2021-07-29 13:06:08 +03:00
|
|
|
<td class="table-cell-satoshis"><app-amount *ngIf="(network$ | async) !== 'liquid'; else liquidAmount" [satoshis]="transaction.value" digitsInfo="1.2-4" [noFiat]="true"></app-amount><ng-template #liquidAmount i18n="shared.confidential">Confidential</ng-template></td>
|
2021-05-03 10:11:30 -03:00
|
|
|
<td class="table-cell-fiat" *ngIf="(network$ | async) === ''" ><app-fiat [value]="transaction.value" digitsInfo="1.0-0"></app-fiat></td>
|
2021-05-18 11:20:17 -03:00
|
|
|
<td class="table-cell-fees">{{ transaction.fee / transaction.vsize | number : '1.1-1' }} <span class="symbol" i18n="shared.sat-vbyte|sat/vB">sat/vB</span></td>
|
2020-10-27 02:58:29 +07:00
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2021-06-06 17:07:04 -03:00
|
|
|
<div class=""> </div>
|
2020-10-27 02:58:29 +07:00
|
|
|
</div>
|
2020-09-26 03:50:32 +07:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-10-27 02:58:29 +07:00
|
|
|
</ng-template>
|
2020-10-27 16:34:27 +07:00
|
|
|
</ng-template>
|
2020-09-21 19:41:12 +07:00
|
|
|
</div>
|
|
|
|
|
2020-10-27 16:34:27 +07:00
|
|
|
<button type="button" class="btn btn-secondary btn-sm d-block mx-auto" (click)="toggleCollapsed()">
|
|
|
|
<div [ngSwitch]="collapseLevel">
|
2020-12-05 00:16:23 +07:00
|
|
|
<fa-icon *ngSwitchCase="'three'" [icon]="['fas', 'angle-down']" [fixedWidth]="true" i18n-title="dashboard.expand" title="Expand"></fa-icon>
|
|
|
|
<fa-icon *ngSwitchDefault [icon]="['fas', 'angle-up']" [fixedWidth]="true" i18n-title="dashboard.collapse" title="Collapse"></fa-icon>
|
2020-10-27 16:34:27 +07:00
|
|
|
</div>
|
|
|
|
</button>
|
2020-10-27 02:58:29 +07:00
|
|
|
|
2021-05-12 14:51:55 +04:00
|
|
|
<app-language-selector></app-language-selector>
|
Implement i18n support in frontend using Angular + Transifex + NGINX
This PR adds basic i18n support into the mempool frontend, together with
a smooth workflow for developers and translators to collaborate:
* Using the existing @angular/localize module, developers add i18n
metadata to any frontend strings their new features or changes modify
* Using the new npm script `i18n-extract-from-source`, developers
extract the i18n data from source code into `src/locale/messages.xlf`
* After pushing the updated `src/locale/messages.xlf` to GitHub, the
Transifex service will update its database from the new source data
* Using the Transifex website UI, translators can work together to
translate all the mempool frontend strings into their native languages
* Using the new npm script `i18n-pull-from-transifex`, developers can
pull in completed translations from Transifex, and commit them into git.
This flow requires an API key from Transifex, which can be obtained at
https://www.transifex.com/user/settings/api/ to be used with the python
script installed by `pip install transifex-client` - after preparing
these, run the npm script which will ask you for the API key the first
time. When downloading is complete, you can test building the frontend,
and if successful, commit the new strings files into git.
This PR implements a new locale selector in the footer of the homepage
dashboard, and includes WIP translations for the following languages:
* Czech (cs)
* German (de)
* Japanese (ja)
* Norwegian (nn)
* Spanish (es)
* Swedish (sv)
* Ukrainian (uk)
* Persian (fa)
* Portugese (pt)
* Turkish (tr)
* Dutch (nl)
* French (fr)
* Chinese (zh)
* Slovenian (sl)
* Korean (ko)
* Polish (pl)
The user-agent's `Accept-Language` header is used to automatically
detect their preferred language, which can be manually overriden by the
pull-down selector, which saves their preference to a cookie, which is
used by nginx to serve the correct HTML bundle to the user.
Remaining tasks include adding i18n metadata for strings in the Bisq and
Liquid frontend code, mouseover hover tooltip strings, hard-coded og
metadata inside HTML templates, and many other places. This will be done
in a separate PR.
When upgrading to add i18n support, mempool instance operators must take
care to install the new nginx.conf and nginx-mempool.conf files, and
tweak for their specific site configuration.
Fixes #81
2020-12-02 04:19:33 +09:00
|
|
|
|
2021-06-06 17:07:04 -03:00
|
|
|
<div class="terms-of-service">
|
Implement i18n support in frontend using Angular + Transifex + NGINX
This PR adds basic i18n support into the mempool frontend, together with
a smooth workflow for developers and translators to collaborate:
* Using the existing @angular/localize module, developers add i18n
metadata to any frontend strings their new features or changes modify
* Using the new npm script `i18n-extract-from-source`, developers
extract the i18n data from source code into `src/locale/messages.xlf`
* After pushing the updated `src/locale/messages.xlf` to GitHub, the
Transifex service will update its database from the new source data
* Using the Transifex website UI, translators can work together to
translate all the mempool frontend strings into their native languages
* Using the new npm script `i18n-pull-from-transifex`, developers can
pull in completed translations from Transifex, and commit them into git.
This flow requires an API key from Transifex, which can be obtained at
https://www.transifex.com/user/settings/api/ to be used with the python
script installed by `pip install transifex-client` - after preparing
these, run the npm script which will ask you for the API key the first
time. When downloading is complete, you can test building the frontend,
and if successful, commit the new strings files into git.
This PR implements a new locale selector in the footer of the homepage
dashboard, and includes WIP translations for the following languages:
* Czech (cs)
* German (de)
* Japanese (ja)
* Norwegian (nn)
* Spanish (es)
* Swedish (sv)
* Ukrainian (uk)
* Persian (fa)
* Portugese (pt)
* Turkish (tr)
* Dutch (nl)
* French (fr)
* Chinese (zh)
* Slovenian (sl)
* Korean (ko)
* Polish (pl)
The user-agent's `Accept-Language` header is used to automatically
detect their preferred language, which can be manually overriden by the
pull-down selector, which saves their preference to a cookie, which is
used by nginx to serve the correct HTML bundle to the user.
Remaining tasks include adding i18n metadata for strings in the Bisq and
Liquid frontend code, mouseover hover tooltip strings, hard-coded og
metadata inside HTML templates, and many other places. This will be done
in a separate PR.
When upgrading to add i18n support, mempool instance operators must take
care to install the new nginx.conf and nginx-mempool.conf files, and
tweak for their specific site configuration.
Fixes #81
2020-12-02 04:19:33 +09:00
|
|
|
<a [routerLink]="['/terms-of-service']" i18n="shared.terms-of-service|Terms of Service">Terms of Service</a>
|
2021-08-02 18:42:18 +09:00
|
|
|
|
|
|
|
|
<a [routerLink]="['/privacy-policy']" i18n="shared.privacy-policy|Privacy Policy">Privacy Policy</a>
|
2020-10-11 19:25:38 +09:00
|
|
|
</div>
|
|
|
|
|
2020-09-22 12:50:12 +07:00
|
|
|
</div>
|
|
|
|
|
2021-07-26 20:47:08 -03:00
|
|
|
<ng-template #loadingTransactions>
|
|
|
|
<div class="skeleton-loader skeleton-loader-transactions"></div>
|
|
|
|
</ng-template>
|
|
|
|
|
2020-09-22 12:50:12 +07:00
|
|
|
<ng-template #loading>
|
|
|
|
<div class="skeleton-loader"></div>
|
2020-09-26 02:11:30 +07:00
|
|
|
</ng-template>
|
|
|
|
|
2021-07-26 20:47:08 -03:00
|
|
|
<ng-template #loadingbig>
|
|
|
|
<span class="skeleton-loader skeleton-loader-big" ></span>
|
2021-01-12 16:41:54 +07:00
|
|
|
</ng-template>
|
|
|
|
|
2020-09-26 02:11:30 +07:00
|
|
|
<ng-template #emptyBlock>
|
2021-06-06 17:07:04 -03:00
|
|
|
<div class="col">
|
2020-09-26 02:11:30 +07:00
|
|
|
|
|
|
|
</div>
|
2020-10-11 19:25:38 +09:00
|
|
|
</ng-template>
|
2020-10-27 02:58:29 +07:00
|
|
|
|
|
|
|
<ng-template #mempoolTable let-mempoolInfoData>
|
2021-05-03 10:11:30 -03:00
|
|
|
<div class="mempool-info-data">
|
|
|
|
<div class="item">
|
2021-08-05 02:03:52 +03:00
|
|
|
<h5 *ngIf="!mempoolInfoData.value || mempoolInfoData.value.memPoolInfo.mempoolminfee === 0.00001 || (stateService.env.BASE_MODULE === 'liquid' && mempoolInfoData.value.memPoolInfo.mempoolminfee === 0.000001) else purgingText" class="card-title" i18n="dashboard.minimum-fee|Minimum mempool fee">Minimum fee</h5>
|
2021-05-03 10:11:30 -03:00
|
|
|
<ng-template #purgingText><h5 class="card-title" i18n="dashboard.purging|Purgin below fee">Purging</h5></ng-template>
|
2021-07-26 20:47:08 -03:00
|
|
|
<p class="card-text" *ngIf="(isLoadingWebSocket$ | async) === false && mempoolInfoData.value; else loading">
|
2021-05-03 10:11:30 -03:00
|
|
|
<ng-template [ngIf]="mempoolInfoData.value.memPoolInfo.mempoolminfee > 0.00001">< </ng-template>{{ mempoolInfoData.value.memPoolInfo.mempoolminfee * 100000 | number : '1.1-1' }} <span><ng-container i18n="shared.sat-vbyte|sat/vB">sat/vB</ng-container></span>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div class="item">
|
|
|
|
<h5 class="card-title" i18n="dashboard.unconfirmed|Unconfirmed count">Unconfirmed</h5>
|
2021-07-26 20:47:08 -03:00
|
|
|
<p class="card-text" *ngIf="(isLoadingWebSocket$ | async) === false && mempoolInfoData.value; else loading">
|
2021-05-03 10:11:30 -03:00
|
|
|
{{ mempoolInfoData.value.memPoolInfo.size | number }} <span i18n="dashboard.txs">TXs</span>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div class="item bar">
|
|
|
|
<h5 class="card-title" i18n="dashboard.memory-usage|Memory usage">Memory usage</h5>
|
2021-07-26 20:47:08 -03:00
|
|
|
<div class="card-text" *ngIf="(isLoadingWebSocket$ | async) === false && mempoolInfoData.value; else loadingbig">
|
2021-05-03 10:11:30 -03:00
|
|
|
<div class="progress">
|
|
|
|
<div class="progress-bar {{ mempoolInfoData.value.mempoolSizeProgress }}" role="progressbar" [ngStyle]="{'width': (mempoolInfoData.value.memPoolInfo.usage / mempoolInfoData.value.memPoolInfo.maxmempool * 100) + '%' }"> </div>
|
2021-05-18 11:20:17 -03:00
|
|
|
<div class="progress-text"><span [innerHTML]="mempoolInfoData.value.memPoolInfo.usage | bytes"></span> / <span [innerHTML]="mempoolInfoData.value.memPoolInfo.maxmempool | bytes"></span></div>
|
2021-01-15 21:21:53 +07:00
|
|
|
</div>
|
2021-05-03 10:11:30 -03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-10-27 02:58:29 +07:00
|
|
|
</ng-template>
|
|
|
|
|
|
|
|
<ng-template #txPerSecond let-mempoolInfoData>
|
Implement i18n support in frontend using Angular + Transifex + NGINX
This PR adds basic i18n support into the mempool frontend, together with
a smooth workflow for developers and translators to collaborate:
* Using the existing @angular/localize module, developers add i18n
metadata to any frontend strings their new features or changes modify
* Using the new npm script `i18n-extract-from-source`, developers
extract the i18n data from source code into `src/locale/messages.xlf`
* After pushing the updated `src/locale/messages.xlf` to GitHub, the
Transifex service will update its database from the new source data
* Using the Transifex website UI, translators can work together to
translate all the mempool frontend strings into their native languages
* Using the new npm script `i18n-pull-from-transifex`, developers can
pull in completed translations from Transifex, and commit them into git.
This flow requires an API key from Transifex, which can be obtained at
https://www.transifex.com/user/settings/api/ to be used with the python
script installed by `pip install transifex-client` - after preparing
these, run the npm script which will ask you for the API key the first
time. When downloading is complete, you can test building the frontend,
and if successful, commit the new strings files into git.
This PR implements a new locale selector in the footer of the homepage
dashboard, and includes WIP translations for the following languages:
* Czech (cs)
* German (de)
* Japanese (ja)
* Norwegian (nn)
* Spanish (es)
* Swedish (sv)
* Ukrainian (uk)
* Persian (fa)
* Portugese (pt)
* Turkish (tr)
* Dutch (nl)
* French (fr)
* Chinese (zh)
* Slovenian (sl)
* Korean (ko)
* Polish (pl)
The user-agent's `Accept-Language` header is used to automatically
detect their preferred language, which can be manually overriden by the
pull-down selector, which saves their preference to a cookie, which is
used by nginx to serve the correct HTML bundle to the user.
Remaining tasks include adding i18n metadata for strings in the Bisq and
Liquid frontend code, mouseover hover tooltip strings, hard-coded og
metadata inside HTML templates, and many other places. This will be done
in a separate PR.
When upgrading to add i18n support, mempool instance operators must take
care to install the new nginx.conf and nginx-mempool.conf files, and
tweak for their specific site configuration.
Fixes #81
2020-12-02 04:19:33 +09:00
|
|
|
<h5 class="card-title" i18n="dashboard.incoming-transactions">Incoming transactions</h5>
|
2021-07-26 20:47:08 -03:00
|
|
|
<ng-template [ngIf]="(isLoadingWebSocket$ | async) === false && mempoolInfoData.value" [ngIfElse]="loadingTransactions">
|
2021-01-05 18:57:06 +07:00
|
|
|
<span *ngIf="(mempoolLoadingStatus$ | async) !== 100; else inSync">
|
|
|
|
<span class="badge badge-pill badge-warning"><ng-container i18n="dashboard.backend-is-synchronizing">Backend is synchronizing</ng-container> ({{ mempoolLoadingStatus$ | async }}%)</span>
|
2020-10-27 02:58:29 +07:00
|
|
|
</span>
|
|
|
|
<ng-template #inSync>
|
2021-06-06 17:07:04 -03:00
|
|
|
<div class="progress inc-tx-progress-bar">
|
|
|
|
<div class="progress-bar {{ mempoolInfoData.value.progressClass }}" role="progressbar" [ngStyle]="{'width': mempoolInfoData.value.progressWidth}"> </div>
|
2021-01-12 20:45:41 +07:00
|
|
|
<div class="progress-text">{{ mempoolInfoData.value.vBytesPerSecond | ceil | number }} <ng-container i18n="shared.vbytes-per-second|vB/s">vB/s</ng-container></div>
|
2020-10-27 02:58:29 +07:00
|
|
|
</div>
|
|
|
|
</ng-template>
|
|
|
|
</ng-template>
|
|
|
|
</ng-template>
|
|
|
|
|
|
|
|
<ng-template #difficultyEpoch>
|
2021-07-17 08:58:16 -03:00
|
|
|
<div class="main-title" i18n="dashboard.difficulty-adjustment">Difficulty Adjustment</div>
|
|
|
|
<div class="card-wrapper">
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-body more-padding">
|
2021-07-26 20:47:08 -03:00
|
|
|
<div class="difficulty-adjustment-container" *ngIf="(isLoadingWebSocket$ | async) === false && (difficultyEpoch$ | async) as epochData; else loadingDifficulty">
|
2021-07-17 08:58:16 -03:00
|
|
|
<div class="item">
|
|
|
|
<h5 class="card-title" i18n="difficulty-box.remaining">Remaining</h5>
|
|
|
|
<div class="card-text">
|
|
|
|
<ng-container *ngTemplateOutlet="epochData.remainingBlocks === 1 ? blocksSingular : blocksPlural; context: {$implicit: epochData.remainingBlocks }"></ng-container>
|
|
|
|
<ng-template #blocksPlural let-i i18n="shared.blocks">{{ i }} <span class="shared-block">blocks</span></ng-template>
|
|
|
|
<ng-template #blocksSingular let-i i18n="shared.block">{{ i }} <span class="shared-block">block</span></ng-template>
|
|
|
|
</div>
|
|
|
|
<div class="symbol"><app-time-until [time]="epochData.remainingTime" [fastRender]="true"></app-time-until></div>
|
|
|
|
</div>
|
|
|
|
<div class="item">
|
|
|
|
<h5 class="card-title" i18n="difficulty-box.estimate">Estimate</h5>
|
2021-07-26 16:00:40 -03:00
|
|
|
<div class="card-text" [ngStyle]="{'color': epochData.colorAdjustments}">
|
|
|
|
<span *ngIf="epochData.change > 0; else arrowDownDifficulty" >
|
|
|
|
<fa-icon class="retarget-sign" [icon]="['fas', 'caret-up']" [fixedWidth]="true"></fa-icon>
|
|
|
|
</span>
|
|
|
|
<ng-template #arrowDownDifficulty >
|
|
|
|
<fa-icon class="retarget-sign" [icon]="['fas', 'caret-down']" [fixedWidth]="true"></fa-icon>
|
|
|
|
</ng-template>
|
2021-07-26 20:47:08 -03:00
|
|
|
{{ epochData.change | absolute | number: '1.2-2' }}
|
|
|
|
<span class="symbol">%</span>
|
2021-07-26 16:00:40 -03:00
|
|
|
</div>
|
|
|
|
<div class="symbol">
|
|
|
|
<span i18n="difficulty-box.previous">Previous</span>:
|
|
|
|
<span [ngStyle]="{'color': epochData.colorPreviousAdjustments}">
|
|
|
|
<span *ngIf="epochData.previousRetarget > 0; else arrowDownPreviousDifficulty" >
|
|
|
|
<fa-icon class="previous-retarget-sign" [icon]="['fas', 'caret-up']" [fixedWidth]="true"></fa-icon>
|
|
|
|
</span>
|
|
|
|
<ng-template #arrowDownPreviousDifficulty >
|
|
|
|
<fa-icon class="previous-retarget-sign" [icon]="['fas', 'caret-down']" [fixedWidth]="true"></fa-icon>
|
|
|
|
</ng-template>
|
2021-07-26 20:47:08 -03:00
|
|
|
{{ epochData.previousRetarget | absolute | number: '1.2-2' }} </span> %
|
|
|
|
</div>
|
2021-07-17 08:58:16 -03:00
|
|
|
</div>
|
|
|
|
<div class="item">
|
|
|
|
<h5 class="card-title" i18n="difficulty-box.current-period">Current Period</h5>
|
|
|
|
<div class="card-text">{{ epochData.progress | number: '1.2-2' }} <span class="symbol">%</span></div>
|
|
|
|
<div class="progress small-bar">
|
|
|
|
<div class="progress-bar" role="progressbar" style="width: 15%; background-color: #105fb0" [ngStyle]="{'width': epochData.base}"> </div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</ng-template>
|
|
|
|
|
|
|
|
|
|
|
|
<ng-template #loadingDifficulty>
|
|
|
|
<div class="difficulty-skeleton loading-container">
|
|
|
|
<div class="item">
|
|
|
|
<h5 class="card-title" i18n="difficulty-box.remaining">Remaining</h5>
|
|
|
|
<div class="card-text">
|
|
|
|
<div class="skeleton-loader"></div>
|
|
|
|
<div class="skeleton-loader"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="item">
|
|
|
|
<h5 class="card-title" i18n="difficulty-box.estimate">Estimate</h5>
|
|
|
|
<div class="card-text">
|
|
|
|
<div class="skeleton-loader"></div>
|
|
|
|
<div class="skeleton-loader"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="item">
|
|
|
|
<h5 class="card-title" i18n="difficulty-box.current-period">Current Period</h5>
|
|
|
|
<div class="card-text">
|
|
|
|
<div class="skeleton-loader"></div>
|
|
|
|
<div class="skeleton-loader"></div>
|
2020-10-27 02:58:29 +07:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
Implement i18n support in frontend using Angular + Transifex + NGINX
This PR adds basic i18n support into the mempool frontend, together with
a smooth workflow for developers and translators to collaborate:
* Using the existing @angular/localize module, developers add i18n
metadata to any frontend strings their new features or changes modify
* Using the new npm script `i18n-extract-from-source`, developers
extract the i18n data from source code into `src/locale/messages.xlf`
* After pushing the updated `src/locale/messages.xlf` to GitHub, the
Transifex service will update its database from the new source data
* Using the Transifex website UI, translators can work together to
translate all the mempool frontend strings into their native languages
* Using the new npm script `i18n-pull-from-transifex`, developers can
pull in completed translations from Transifex, and commit them into git.
This flow requires an API key from Transifex, which can be obtained at
https://www.transifex.com/user/settings/api/ to be used with the python
script installed by `pip install transifex-client` - after preparing
these, run the npm script which will ask you for the API key the first
time. When downloading is complete, you can test building the frontend,
and if successful, commit the new strings files into git.
This PR implements a new locale selector in the footer of the homepage
dashboard, and includes WIP translations for the following languages:
* Czech (cs)
* German (de)
* Japanese (ja)
* Norwegian (nn)
* Spanish (es)
* Swedish (sv)
* Ukrainian (uk)
* Persian (fa)
* Portugese (pt)
* Turkish (tr)
* Dutch (nl)
* French (fr)
* Chinese (zh)
* Slovenian (sl)
* Korean (ko)
* Polish (pl)
The user-agent's `Accept-Language` header is used to automatically
detect their preferred language, which can be manually overriden by the
pull-down selector, which saves their preference to a cookie, which is
used by nginx to serve the correct HTML bundle to the user.
Remaining tasks include adding i18n metadata for strings in the Bisq and
Liquid frontend code, mouseover hover tooltip strings, hard-coded og
metadata inside HTML templates, and many other places. This will be done
in a separate PR.
When upgrading to add i18n support, mempool instance operators must take
care to install the new nginx.conf and nginx-mempool.conf files, and
tweak for their specific site configuration.
Fixes #81
2020-12-02 04:19:33 +09:00
|
|
|
</ng-template>
|