mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #7787 from gabrielbazan7/ref/qrcodemodule
[V4] REF: add new qrcode module to support special characters
This commit is contained in:
commit
8c44446bad
|
@ -77,10 +77,10 @@
|
|||
"@ionic/storage": "^2.1.3",
|
||||
"@ngx-translate/core": "^8.0.0",
|
||||
"@nsalaun/ng-logger": "^5.0.0",
|
||||
"@techiediaries/ngx-qrcode": "0.0.5",
|
||||
"@types/papaparse": "^4.1.33",
|
||||
"ajv": "^5.5.2",
|
||||
"angular2-moment": "^1.7.1",
|
||||
"angular2-qrcode": "^2.0.1",
|
||||
"autoprefixer": "^7.2.4",
|
||||
"bitcore-wallet-client": "^6.4.0",
|
||||
"buffer-compare": "^1.1.1",
|
||||
|
|
|
@ -19,7 +19,7 @@ import { FCM } from '@ionic-native/fcm';
|
|||
/* Modules */
|
||||
import { MomentModule } from 'angular2-moment';
|
||||
import { NgLoggerModule, Level } from '@nsalaun/ng-logger';
|
||||
import { QRCodeModule } from 'angular2-qrcode';
|
||||
import { NgxQRCodeModule } from '@techiediaries/ngx-qrcode';
|
||||
import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
|
||||
import { TranslatePoHttpLoader } from '@biesbjerg/ngx-translate-po-http-loader';
|
||||
|
||||
|
@ -396,7 +396,7 @@ export function providersComponents() {
|
|||
HttpClientModule,
|
||||
NgLoggerModule.forRoot(Level.LOG),
|
||||
MomentModule,
|
||||
QRCodeModule,
|
||||
NgxQRCodeModule,
|
||||
TranslateModule.forRoot({
|
||||
loader: {
|
||||
provide: TranslateLoader,
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
</ion-item>
|
||||
<ion-item>
|
||||
<div class="qr-code-container" copy-to-clipboard="{{ secret }}">
|
||||
<qr-code *ngIf="secret" [level]="L" [size]="220" [foreground]="'#334'" [value]="secret"></qr-code>
|
||||
<ngx-qrcode *ngIf="secret" qrc-value="{{secret}}" qrc-class="aclass" qrc-errorCorrectionLevel="L"></ngx-qrcode>
|
||||
<div [hidden]="secret" class="spinner">
|
||||
<ion-spinner></ion-spinner>
|
||||
</div>
|
||||
|
@ -32,19 +32,20 @@
|
|||
<ion-card-header>
|
||||
<span translate>Waiting for copayers</span>
|
||||
<span>
|
||||
[ <span translate>{{wallet.m}}-of-{{wallet.n}}</span> ]
|
||||
[
|
||||
<span translate>{{wallet.m}}-of-{{wallet.n}}</span> ]
|
||||
</span>
|
||||
</ion-card-header>
|
||||
<ion-card-content>
|
||||
<ion-item *ngFor="let copayer of copayers">
|
||||
<span [hidden]="copayer.id != wallet.copayerId">
|
||||
<ion-icon ios="ios-checkmark" md="md-checkmark"></ion-icon>
|
||||
{{'Me'|translate}}
|
||||
</span>
|
||||
<ion-icon ios="ios-checkmark" md="md-checkmark"></ion-icon>
|
||||
{{'Me'|translate}}
|
||||
</span>
|
||||
<span [hidden]="copayer.id == wallet.copayerId">
|
||||
<ion-icon ios="ios-checkmark" md="md-checkmark"></ion-icon>
|
||||
{{copayer.name}}
|
||||
</span>
|
||||
<ion-icon ios="ios-checkmark" md="md-checkmark"></ion-icon>
|
||||
{{copayer.name}}
|
||||
</span>
|
||||
</ion-item>
|
||||
<ion-item *ngIf="!wallet.isComplete()">
|
||||
<ion-icon ios="ios-repeat" md="md-repeat"></ion-icon> {{'Waiting...'|translate}}
|
||||
|
|
|
@ -9,6 +9,9 @@ page-copayers {
|
|||
margin-top: 1rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
.aclass >img {
|
||||
width: 220px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.copayers-card {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<ion-title>{{'Custom Amount' | translate}}</ion-title>
|
||||
<ion-buttons end>
|
||||
<button *ngIf="showShareButton" ion-button icon-only (click)="shareAddress()" translate>
|
||||
<ion-icon name="share"></ion-icon>
|
||||
<ion-icon name="share"></ion-icon>
|
||||
</button>
|
||||
</ion-buttons>
|
||||
</ion-navbar>
|
||||
|
@ -12,7 +12,7 @@
|
|||
</ion-header>
|
||||
<ion-content>
|
||||
<div class="qr-container">
|
||||
<qr-code *ngIf="address" copy-to-clipboard="{{qrAddress}}" [value]="qrAddress" [level]="M" [size]="220" [foreground]="'#334'"></qr-code>
|
||||
<ngx-qrcode *ngIf="address" copy-to-clipboard="{{ qrAddress }}" qrc-value="{{qrAddress}}" qrc-class="aclass" qrc-errorCorrectionLevel="M"></ngx-qrcode>
|
||||
</div>
|
||||
<ion-list>
|
||||
<ion-item>
|
||||
|
|
|
@ -3,6 +3,9 @@ page-custom-amount {
|
|||
padding: 50px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
.aclass >img {
|
||||
width: 220px;
|
||||
}
|
||||
}
|
||||
.wallet-label {
|
||||
align-items: center;
|
||||
|
@ -18,5 +21,5 @@ page-custom-amount {
|
|||
.address-note{
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<div *ngIf="loading" class="loading-address spinner">
|
||||
<ion-spinner></ion-spinner>
|
||||
</div>
|
||||
<qr-code *ngIf="!loading && address" copy-to-clipboard="{{ address }}" [value]="qrAddress" [level]="M" [size]="220" [foreground]="'#334'"></qr-code>
|
||||
<ngx-qrcode *ngIf="!loading && address" copy-to-clipboard="{{ address }}" qrc-value="{{qrAddress}}" qrc-class="aclass" qrc-errorCorrectionLevel="M"></ngx-qrcode>
|
||||
<div *ngIf="!loading" class="text-address" copy-to-clipboard="{{ address }}">{{ address }}</div>
|
||||
<div *ngIf="loading" class="text-address">...</div>
|
||||
<button ion-button block clear [hidden]="!address" (click)="requestSpecificAmount()">
|
||||
|
@ -59,4 +59,4 @@
|
|||
<div>{{wallet.name}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</ion-footer>
|
||||
</ion-footer>
|
|
@ -37,6 +37,9 @@ page-receive {
|
|||
font-size: 12px;
|
||||
color: color($colors, secondary);
|
||||
}
|
||||
.aclass >img {
|
||||
width: 220px;
|
||||
}
|
||||
}
|
||||
.wallets-container {
|
||||
padding-left: 2rem;
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
</ion-list>
|
||||
<ion-list *ngSwitchCase="'qrCode'">
|
||||
<div class="qrCode" *ngIf="supported">
|
||||
<qr-code [value]="exportWalletInfo" [level]="M" [size]="220" [foreground]="'#334'"></qr-code>
|
||||
<ngx-qrcode qrc-value="{{exportWalletInfo}}" qrc-class="aclass" qrc-errorCorrectionLevel="M"></ngx-qrcode>
|
||||
<div translate>From the destination device, go to Add wallet > Import wallet and scan this QR code</div>
|
||||
</div>
|
||||
<ion-card class="not-supported-message" *ngIf="!supported">
|
||||
|
|
|
@ -2,6 +2,9 @@ page-wallet-export {
|
|||
.qrCode {
|
||||
text-align: center;
|
||||
padding: 10px;
|
||||
.aclass >img {
|
||||
width: 220px;
|
||||
}
|
||||
}
|
||||
.not-supported-message {
|
||||
text-align: center;
|
||||
|
|
Loading…
Reference in New Issue