-
-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #129 from zxing-js/develop
Patch 1.2.1. May the force be with you.
- Loading branch information
Showing
29 changed files
with
1,377 additions
and
1,305 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
# Travis CI configuration file. | ||
|
||
sudo: required | ||
|
||
language: node_js | ||
node_js: stable | ||
|
||
addons: | ||
chrome: stable | ||
|
||
script: | ||
- ./node_modules/.bin/npm-install-peers | ||
- yarn lint | ||
- yarn test | ||
- ./node_modules/.bin/npm-install-peers | ||
- yarn lint | ||
- yarn test | ||
# - yarn e2e | ||
- yarn docs:build | ||
- yarn build:prod | ||
- yarn build:packagr | ||
- yarn docs:build | ||
- yarn build:prod | ||
- yarn build:packagr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,86 +1,86 @@ | ||
<div class="scanner-shell" [hidden]="!hasDevices"> | ||
|
||
<header> | ||
<select (change)="onDeviceSelectChange($event.target.value)"> | ||
<option value="" [selected]="!currentDevice">No Device Selected</option> | ||
<option *ngFor="let device of availableDevices" [value]="device.deviceId" [selected]="currentDevice && device.deviceId === currentDevice.deviceId">{{ device.label }}</option> | ||
</select> | ||
</header> | ||
|
||
<zxing-scanner #scanner start="true" [device]="currentDevice" (scanSuccess)="handleQrCodeResult($event)" formats="['CODE_39', 'CODE_128', 'QR_CODE']"></zxing-scanner> | ||
|
||
<footer> | ||
<span>Result:</span> | ||
<span> | ||
<em *ngIf="!qrResultString">wating for scan...</em> | ||
<strong>{{ qrResultString }}</strong> | ||
</span> | ||
</footer> | ||
<header> | ||
<select (change)="onDeviceSelectChange($event.target.value)"> | ||
<option value="" [selected]="!currentDevice">No Device Selected</option> | ||
<option *ngFor="let device of availableDevices" [value]="device.deviceId" [selected]="currentDevice && device.deviceId === currentDevice.deviceId">{{ device.label }}</option> | ||
</select> | ||
</header> | ||
|
||
<zxing-scanner #scanner start="true" [device]="currentDevice" (scanSuccess)="handleQrCodeResult($event)" [formats]="['CODE_39', 'CODE_128', 'QR_CODE']"></zxing-scanner> | ||
|
||
<footer> | ||
<span>Result:</span> | ||
<span> | ||
<em *ngIf="!qrResultString">wating for scan...</em> | ||
<strong>{{ qrResultString }}</strong> | ||
</span> | ||
</footer> | ||
|
||
</div> | ||
|
||
<ng-container *ngIf="hasPermission === undefined"> | ||
|
||
<h2>Waiting for permissions.</h2> | ||
<h2>Waiting for permissions.</h2> | ||
|
||
<blockquote> | ||
If your device does not has cameras, no permissions will be asked. | ||
</blockquote> | ||
<blockquote> | ||
If your device does not has cameras, no permissions will be asked. | ||
</blockquote> | ||
|
||
</ng-container> | ||
|
||
<ng-container *ngIf="hasPermission === false"> | ||
|
||
<h2>You denied the camera permission, we can't scan anything without it. 😪</h2> | ||
<h2>You denied the camera permission, we can't scan anything without it. 😪</h2> | ||
|
||
</ng-container> | ||
|
||
<ng-container *ngIf="hasDevices === undefined"> | ||
|
||
<h2>Looking for devices.</h2> | ||
<h2>Looking for devices.</h2> | ||
|
||
</ng-container> | ||
|
||
<ng-container *ngIf="hasDevices === null"> | ||
|
||
<h2>Couldn't check for devices.</h2> | ||
<h2>Couldn't check for devices.</h2> | ||
|
||
<blockquote> | ||
This may be caused by some security error. | ||
</blockquote> | ||
<blockquote> | ||
This may be caused by some security error. | ||
</blockquote> | ||
|
||
</ng-container> | ||
|
||
<ng-container *ngIf="hasDevices === false"> | ||
|
||
<h2>No devices were found.</h2> | ||
<h2>No devices were found.</h2> | ||
|
||
<blockquote> | ||
I believe your device has no media devices attached to. | ||
</blockquote> | ||
<blockquote> | ||
I believe your device has no media devices attached to. | ||
</blockquote> | ||
|
||
</ng-container> | ||
|
||
<hr> | ||
|
||
<footer> | ||
<table> | ||
<thead> | ||
<tr> | ||
<th>Status</th> | ||
<th>Property</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td>{{ stateToEmoji(hasDevices) }}</td> | ||
<td>Devices</td> | ||
</tr> | ||
<tr> | ||
<td>{{ stateToEmoji(hasPermission) }}</td> | ||
<td>Permissions</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
<p>Angular version: {{ ngVersion }}</p> | ||
<table> | ||
<thead> | ||
<tr> | ||
<th>Status</th> | ||
<th>Property</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td>{{ stateToEmoji(hasDevices) }}</td> | ||
<td>Devices</td> | ||
</tr> | ||
<tr> | ||
<td>{{ stateToEmoji(hasPermission) }}</td> | ||
<td>Permissions</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
<p>Angular version: {{ ngVersion }}</p> | ||
</footer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,41 @@ | ||
.scanner-shell { | ||
|
||
position: relative; | ||
position: relative; | ||
|
||
&>header, | ||
&>footer { | ||
position: sticky; | ||
} | ||
&>header, | ||
&>footer { | ||
position: sticky; | ||
} | ||
|
||
&>header { | ||
top: 0; | ||
padding: 10px; | ||
background: #333; | ||
&>header { | ||
top: 0; | ||
padding: 10px; | ||
background: #333; | ||
|
||
select { | ||
width: 100%; | ||
} | ||
select { | ||
width: 100%; | ||
} | ||
|
||
&>footer { | ||
display: flex; | ||
width: 100%; | ||
bottom: 0; | ||
padding: 10px; | ||
background: #4eafff; | ||
|
||
span { | ||
&:first-child { | ||
padding-right: 5px; | ||
} | ||
|
||
&:last-child { | ||
word-break: break-word; | ||
} | ||
} | ||
} | ||
|
||
&>footer { | ||
display: flex; | ||
width: 100%; | ||
bottom: 0; | ||
padding: 10px; | ||
background: #4eafff; | ||
|
||
span { | ||
&:first-child { | ||
padding-right: 5px; | ||
} | ||
|
||
&:last-child { | ||
word-break: break-word; | ||
} | ||
} | ||
} | ||
|
||
zxing-scanner { | ||
max-width: 100%; | ||
} | ||
zxing-scanner { | ||
max-width: 100%; | ||
} | ||
} |
Oops, something went wrong.