Browse Source

Changing the default QR size to QR, since this is a widespread recommendation.

pull/3/head
Vitor Pamplona 5 years ago
parent
commit
5171de7154
7 changed files with 8 additions and 12 deletions
  1. +0
    -2
      cowin.html
  2. +2
    -2
      eu.dgc.html
  3. +3
    -3
      icao.html
  4. +1
    -1
      index.v-1.html
  5. +1
    -1
      js/ui-utils.js
  6. +0
    -2
      liberty.html
  7. +1
    -1
      verify.html

+ 0
- 2
cowin.html View File

@ -225,8 +225,6 @@ DcJqR5clbAYlO9lHmvb4lsPLZHjugQ==
<script src="js/pcf.sdk.min.js"></script>
<script>
const params = { margin:0, width:e('qr-divoc-code').scrollWidth, errorCorrectionLevel: 'L', color: {dark: '#3654DD' }};
function e(elem) { return document.getElementById(elem); }
function getValueArray(elemArray) {


+ 2
- 2
eu.dgc.html View File

@ -977,7 +977,7 @@ AF7zi+d862ePRQ9Lwymr7XfwVm0=
const uri = PCF.signAndPack(_type, _version, priKeyPEM, pubKeyId, payloadValueArray).then(uri => {
const t1 = performance.now();
PCFUtils.debugURI(uri).then( debugInfo => {
const params = { margin:0, width:e(elemPref+'-code').scrollWidth, errorCorrectionLevel: 'L', color: {dark: '#3654DD' }};
const params = { margin:0, width:e(elemPref+'-code').scrollWidth, errorCorrectionLevel: 'Q', color: {dark: '#3654DD' }};
// Builds QR Element
QRCode.toCanvas(e(elemPref+'-code'), uri, params, function (error) {})
@ -1026,7 +1026,7 @@ AF7zi+d862ePRQ9Lwymr7XfwVm0=
}
function displayEUQR(uri, elemPref, deltaTime, pubKeyPem) {
const params = { margin:0, width:e(elemPref+'-code').scrollWidth, errorCorrectionLevel: 'L', color: {dark: '#3654DD' }};
const params = { margin:0, width:e(elemPref+'-code').scrollWidth, errorCorrectionLevel: 'Q', color: {dark: '#3654DD' }};
// Builds QR Element
QRCode.toCanvas(e(elemPref+'-code'), uri, params, function (error) {})


+ 3
- 3
icao.html View File

@ -667,7 +667,7 @@ AF7zi+d862ePRQ9Lwymr7XfwVm0=
const uri = PCF.signAndPack(_type, _version, priKeyPEM, pubKeyId, payloadValueArray).then(uri => {
const t1 = performance.now();
PCFUtils.debugURI(uri).then( debugInfo => {
const params = { margin:0, width:e(elemPref+'-code').scrollWidth, errorCorrectionLevel: 'L', color: {dark: '#3654DD' }};
const params = { margin:0, width:e(elemPref+'-code').scrollWidth, errorCorrectionLevel: 'Q', color: {dark: '#3654DD' }};
// Builds QR Element
QRCode.toCanvas(e(elemPref+'-code'), uri, params, function (error) {})
@ -706,7 +706,7 @@ AF7zi+d862ePRQ9Lwymr7XfwVm0=
}
function displayEUQR(uri, elemPref, deltaTime, pubKeyPem) {
const params = { margin:0, width:e(elemPref+'-code').scrollWidth, errorCorrectionLevel: 'L', color: {dark: '#3654DD' }};
const params = { margin:0, width:e(elemPref+'-code').scrollWidth, errorCorrectionLevel: 'Q', color: {dark: '#3654DD' }};
// Builds QR Element
QRCode.toCanvas(e(elemPref+'-code'), uri, params, function (error) {})
@ -741,7 +741,7 @@ AF7zi+d862ePRQ9Lwymr7XfwVm0=
const icaot0 = performance.now();
const uri = ICAOVDS.signAndPack(payload, certificate, prikey).then(uri => {
const icaot1 = performance.now();
const params = { margin:0, width:e(elemPref+'-code').scrollWidth, errorCorrectionLevel: 'L', color: {dark: '#3654DD' }};
const params = { margin:0, width:e(elemPref+'-code').scrollWidth, errorCorrectionLevel: 'Q', color: {dark: '#3654DD' }};
// Builds QR Element
QRCode.toCanvas(e(elemPref+'-code'), uri, params, function (error) {})


+ 1
- 1
index.v-1.html View File

@ -66,7 +66,7 @@
function generateCode(elemIdSource, elemPrefix) {
let uri = e(elemIdSource).value;
let params = {margin:0, width:e('qr-code1').scrollWidth, errorCorrectionLevel: 'M', color: {dark: '#3654DD' }};
let params = {margin:0, width:e('qr-code1').scrollWidth, errorCorrectionLevel: 'Q', color: {dark: '#3654DD' }};
let qr = QRCode.create(uri, );
QRCode.toCanvas(e(elemPrefix), uri, params, function (error) {


+ 1
- 1
js/ui-utils.js View File

@ -24,7 +24,7 @@ var UIUtils = {
},
drawsQR: function(elemPref, value, debugURI) {
const params = { margin:0, width:e(elemPref+'-code').scrollWidth, errorCorrectionLevel: 'L', color: {dark: '#3654DD' }};
const params = { margin:0, width:e(elemPref+'-code').scrollWidth, errorCorrectionLevel: 'Q', color: {dark: '#3654DD' }};
if (e(elemPref+"-code-label"))
e(elemPref+"-code-label").style.display = '';


+ 0
- 2
liberty.html View File

@ -170,8 +170,6 @@ DcJqR5clbAYlO9lHmvb4lsPLZHjugQ==
<script>
const params = { margin:0, width:e('qr-ibm-code').scrollWidth, errorCorrectionLevel: 'L', color: {dark: '#3654DD' }};
function e(elem) { return document.getElementById(elem); }
function getValueArray(elemArray) {


+ 1
- 1
verify.html View File

@ -66,7 +66,7 @@
<script>
function e(elem) { return document.getElementById(elem); }
function qrParams(elem) { return {margin:0, width:Math.min(e(elem).scrollWidth,500)-20, errorCorrectionLevel: 'L', color: {dark: '#3654DD' }}; }
function qrParams(elem) { return {margin:0, width:Math.min(e(elem).scrollWidth,500)-20, errorCorrectionLevel: 'Q', color: {dark: '#3654DD' }}; }
var scanner = new Instascan.Scanner({ video: document.getElementById('preview'), mirror: false });
scanner.addListener('scan', function (content) {


Loading…
Cancel
Save