Skip to content

Commit

Permalink
Merge branch 'feat/scan-qr-permission' into 'master'
Browse files Browse the repository at this point in the history
Feat/scan qr permission

See merge request papers/airgap/airgap-wallet!27
  • Loading branch information
AndreasGassmann committed Nov 15, 2018
2 parents 1a1e904 + fc88db8 commit bdcef77
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 11 deletions.
63 changes: 63 additions & 0 deletions src/assets/img/permission_onboarding_camera.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 23 additions & 11 deletions src/pages/scan/scan.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
<ion-header>
<ion-navbar color="primary">
<ion-title>Scanner</ion-title>
</ion-navbar>
<ion-navbar color="primary"> <ion-title>Scan QR</ion-title> </ion-navbar>
</ion-header>

<ion-content no-bounce [class.transparent]="hasCameraPermission">
<p ion-text color="white" padding no-margin text-center *ngIf="isWebScan || hasCameraPermission">Scan a sync QR
to add a wallet or scan a transaction QR to confirm and send it.</p>
<p ion-text color="white" padding no-margin text-center *ngIf="isWebScan || hasCameraPermission">
Scan a sync QR to add a wallet or scan a transaction QR to confirm and send it.
</p>

<ion-row *ngIf="!isWebScan && !hasCameraPermission" (click)="checkPermission(false)" justify-content-center
align-items-center class="row--height__100">
<ion-row
*ngIf="!isWebScan && !hasCameraPermission"
(click)="checkPermission(false)"
justify-content-center
align-items-center
class="row--height__100"
>
<ion-col text-center>
<ion-icon name="eye-off"></ion-icon>
<h3 padding-horizontal>Click to allow camera access to scan a QR.</h3>
<img src="../assets/img/permission_onboarding_camera.svg" />
<h3 padding-horizontal>
In order to scan QR codes, AirGap Wallet needs the <span ion-text color="primary">camera permission</span>.
</h3>
</ion-col>
</ion-row>

<zxing-scanner [hidden]="!isWebScan" #scanner [device]="selectedDevice" [scannerEnabled]="webScannerEnabled" (scanSuccess)="handleQrCodeResult($event)"></zxing-scanner>
</ion-content>
<zxing-scanner
[hidden]="!isWebScan"
#scanner
[device]="selectedDevice"
[scannerEnabled]="webScannerEnabled"
(scanSuccess)="handleQrCodeResult($event)"
></zxing-scanner>
</ion-content>
3 changes: 3 additions & 0 deletions src/pages/scan/scan.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ page-scan {
}
.row--height__100 {
height: 100%;
img {
height: 45vh;
}
}

ion-icon {
Expand Down

0 comments on commit bdcef77

Please sign in to comment.