From 78a8534a197bf77955ecda318737233c12e638b8 Mon Sep 17 00:00:00 2001 From: F-Node-Karlsruhe Date: Wed, 7 Dec 2022 17:01:00 +0100 Subject: [PATCH 1/4] init scan option on selector --- frontend/package-lock.json | 89 ++++++++++++++++++++++++++++++-- frontend/package.json | 1 + frontend/src/styles/style.scss | 5 ++ frontend/src/views/Entry.vue | 13 ++++- frontend/src/views/ScanModal.vue | 58 +++++++++++++++++++++ 5 files changed, 161 insertions(+), 5 deletions(-) create mode 100644 frontend/src/views/ScanModal.vue diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 48a101c..35827c6 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -17,6 +17,7 @@ "vue": "^3.2.41", "vue-router": "^4.1.6", "vue-toastification": "^2.0.0-rc.5", + "vue3-qrcode-reader": "^0.0.1", "vuex": "^4.1.0" }, "devDependencies": { @@ -5169,6 +5170,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/callforth": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/callforth/-/callforth-0.3.1.tgz", + "integrity": "sha512-Q2zPfqnwoKsb1DTVCr4lmhe49wKNBsMmNlbudjleu3/co+Nw1pOqFHYJHrW3VZ253ou9AAr+xauQR0C55NPdzA==" + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -5833,7 +5839,6 @@ "version": "3.26.0", "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.26.0.tgz", "integrity": "sha512-+DkDrhoR4Y0PxDz6rurahuB+I45OsEUv8E1maPTB6OuHRohMMcznBq9TMpdpDMm/hUPob/mJJS3PqgbHpMTQgw==", - "dev": true, "hasInstallScript": true, "funding": { "type": "opencollective", @@ -14658,6 +14663,18 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/rtcpeerconnection-shim": { + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/rtcpeerconnection-shim/-/rtcpeerconnection-shim-1.2.15.tgz", + "integrity": "sha512-C6DxhXt7bssQ1nHb154lqeL0SXz5Dx4RczXZu2Aa/L1NJFnEVDxFwCBo3fqtuljhHIGceg5JKBV4XJ0gW5JKyw==", + "dependencies": { + "sdp": "^2.6.0" + }, + "engines": { + "node": ">=6.0.0", + "npm": ">=3.10.0" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -14801,6 +14818,11 @@ "url": "https://opencollective.com/webpack" } }, + "node_modules/sdp": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/sdp/-/sdp-2.12.0.tgz", + "integrity": "sha512-jhXqQAQVM+8Xj5EjJGVweuEzgtGWb3tmEEpl3CLP3cStInSbVHSg0QWOGQzNq8pSID4JkpeV2mPqlMDLrm0/Vw==" + }, "node_modules/select-hose": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", @@ -16522,6 +16544,17 @@ "vue": "^3.0.2" } }, + "node_modules/vue3-qrcode-reader": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/vue3-qrcode-reader/-/vue3-qrcode-reader-0.0.1.tgz", + "integrity": "sha512-rTZRO2WiBrGRT6pYGMkySNMnEwD9sVlzl9kwPxQ4C0n7I4SXVu60eq8ZQHQTMJAbDTTkbuuW/5reSf+TYFJ5pQ==", + "dependencies": { + "callforth": "^0.3.1", + "core-js": "^3.6.5", + "vue": "^3.0.0", + "webrtc-adapter": "7.7.0" + } + }, "node_modules/vuex": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/vuex/-/vuex-4.1.0.tgz", @@ -17032,6 +17065,19 @@ "url": "https://opencollective.com/webpack" } }, + "node_modules/webrtc-adapter": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/webrtc-adapter/-/webrtc-adapter-7.7.0.tgz", + "integrity": "sha512-7Bp9OBnx642oJRkom1tNAbeJjUadAq2rh5xLL9YXPw5hVyt2h4hHr5bcoPYDs1stp/mZHSPSQA34YISdnr0DBQ==", + "dependencies": { + "rtcpeerconnection-shim": "^1.2.15", + "sdp": "^2.12.0" + }, + "engines": { + "node": ">=6.0.0", + "npm": ">=3.10.0" + } + }, "node_modules/websocket-driver": { "version": "0.7.4", "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", @@ -21324,6 +21370,11 @@ "get-intrinsic": "^1.0.2" } }, + "callforth": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/callforth/-/callforth-0.3.1.tgz", + "integrity": "sha512-Q2zPfqnwoKsb1DTVCr4lmhe49wKNBsMmNlbudjleu3/co+Nw1pOqFHYJHrW3VZ253ou9AAr+xauQR0C55NPdzA==" + }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -21831,8 +21882,7 @@ "core-js": { "version": "3.26.0", "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.26.0.tgz", - "integrity": "sha512-+DkDrhoR4Y0PxDz6rurahuB+I45OsEUv8E1maPTB6OuHRohMMcznBq9TMpdpDMm/hUPob/mJJS3PqgbHpMTQgw==", - "dev": true + "integrity": "sha512-+DkDrhoR4Y0PxDz6rurahuB+I45OsEUv8E1maPTB6OuHRohMMcznBq9TMpdpDMm/hUPob/mJJS3PqgbHpMTQgw==" }, "core-js-compat": { "version": "3.26.0", @@ -28397,6 +28447,14 @@ "glob": "^7.1.3" } }, + "rtcpeerconnection-shim": { + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/rtcpeerconnection-shim/-/rtcpeerconnection-shim-1.2.15.tgz", + "integrity": "sha512-C6DxhXt7bssQ1nHb154lqeL0SXz5Dx4RczXZu2Aa/L1NJFnEVDxFwCBo3fqtuljhHIGceg5JKBV4XJ0gW5JKyw==", + "requires": { + "sdp": "^2.6.0" + } + }, "run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -28468,6 +28526,11 @@ "ajv-keywords": "^3.5.2" } }, + "sdp": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/sdp/-/sdp-2.12.0.tgz", + "integrity": "sha512-jhXqQAQVM+8Xj5EjJGVweuEzgtGWb3tmEEpl3CLP3cStInSbVHSg0QWOGQzNq8pSID4JkpeV2mPqlMDLrm0/Vw==" + }, "select-hose": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", @@ -29816,6 +29879,17 @@ "integrity": "sha512-q73e5jy6gucEO/U+P48hqX+/qyXDozAGmaGgLFm5tXX4wJBcVsnGp4e/iJqlm9xzHETYOilUuwOUje2Qg1JdwA==", "requires": {} }, + "vue3-qrcode-reader": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/vue3-qrcode-reader/-/vue3-qrcode-reader-0.0.1.tgz", + "integrity": "sha512-rTZRO2WiBrGRT6pYGMkySNMnEwD9sVlzl9kwPxQ4C0n7I4SXVu60eq8ZQHQTMJAbDTTkbuuW/5reSf+TYFJ5pQ==", + "requires": { + "callforth": "^0.3.1", + "core-js": "^3.6.5", + "vue": "^3.0.0", + "webrtc-adapter": "7.7.0" + } + }, "vuex": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/vuex/-/vuex-4.1.0.tgz", @@ -30189,6 +30263,15 @@ "integrity": "sha512-8bWq0Iluiv9lVf9YaqWQ9+liNgXSHICm+rg544yRgGYaR8yXZTVBaHZkINZSB2yZSWo4b0F6MIxqJezVfOEAlg==", "dev": true }, + "webrtc-adapter": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/webrtc-adapter/-/webrtc-adapter-7.7.0.tgz", + "integrity": "sha512-7Bp9OBnx642oJRkom1tNAbeJjUadAq2rh5xLL9YXPw5hVyt2h4hHr5bcoPYDs1stp/mZHSPSQA34YISdnr0DBQ==", + "requires": { + "rtcpeerconnection-shim": "^1.2.15", + "sdp": "^2.12.0" + } + }, "websocket-driver": { "version": "0.7.4", "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", diff --git a/frontend/package.json b/frontend/package.json index 1ec1714..b20bdbe 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -32,6 +32,7 @@ "vue": "^3.2.41", "vue-router": "^4.1.6", "vue-toastification": "^2.0.0-rc.5", + "vue3-qrcode-reader": "^0.0.1", "vuex": "^4.1.0" }, "devDependencies": { diff --git a/frontend/src/styles/style.scss b/frontend/src/styles/style.scss index 8d5ca36..29a50e7 100644 --- a/frontend/src/styles/style.scss +++ b/frontend/src/styles/style.scss @@ -22,6 +22,11 @@ html, body {margin: 0; height: 100%; overflow: hidden} font-size: 0.7rem; } +.scanqr { + border: 1px solid #ced4da !important; + border-right: none !important; + color: #212529 !important; +} #backbutton { position: absolute; diff --git a/frontend/src/views/Entry.vue b/frontend/src/views/Entry.vue index 7ca0ede..e023a15 100644 --- a/frontend/src/views/Entry.vue +++ b/frontend/src/views/Entry.vue @@ -11,8 +11,10 @@
Credential File
+
+
@@ -24,6 +26,7 @@
Credential Id
+
@@ -35,6 +38,7 @@
Subject Id
+
@@ -46,16 +50,21 @@ \ No newline at end of file From ae516bc73c75988c1bf6cf6764c2705c40a70c85 Mon Sep 17 00:00:00 2001 From: F-Node-Karlsruhe Date: Thu, 8 Dec 2022 12:57:50 +0100 Subject: [PATCH 2/4] fix modal not closing after scan --- frontend/src/views/Entry.vue | 10 ++--- frontend/src/views/ScanModal.vue | 74 +++++++++++++++++++++++++++----- frontend/src/views/Verify.vue | 4 +- 3 files changed, 71 insertions(+), 17 deletions(-) diff --git a/frontend/src/views/Entry.vue b/frontend/src/views/Entry.vue index e023a15..c9e74ea 100644 --- a/frontend/src/views/Entry.vue +++ b/frontend/src/views/Entry.vue @@ -11,10 +11,9 @@
Credential File
-
- +
@@ -26,7 +25,7 @@
Credential Id
- +
@@ -38,13 +37,14 @@
Subject Id
- +
Provide the subject id for which the credentials shall be queried
+
@@ -64,7 +64,7 @@ toast: useToast(), credentialId: '', subjectId: '', - scan: false + scan: '' } }, methods: { diff --git a/frontend/src/views/ScanModal.vue b/frontend/src/views/ScanModal.vue index 21af614..537f974 100644 --- a/frontend/src/views/ScanModal.vue +++ b/frontend/src/views/ScanModal.vue @@ -1,5 +1,5 @@