From 169e7b9196ec7ef49dead154d5245e321b86ce0f Mon Sep 17 00:00:00 2001 From: david zynda Date: Mon, 20 Nov 2023 10:58:49 +0100 Subject: [PATCH 1/5] auto-reload for each camera permission change --- src/components/general/QrcodeStrem.vue | 58 ++++++++++++++++ src/store/index.js | 9 ++- src/views/SearchView.vue | 92 ++++++++------------------ 3 files changed, 93 insertions(+), 66 deletions(-) create mode 100644 src/components/general/QrcodeStrem.vue diff --git a/src/components/general/QrcodeStrem.vue b/src/components/general/QrcodeStrem.vue new file mode 100644 index 000000000..f37995dfc --- /dev/null +++ b/src/components/general/QrcodeStrem.vue @@ -0,0 +1,58 @@ + + + diff --git a/src/store/index.js b/src/store/index.js index 8e4c16ad0..779d8edbc 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -57,7 +57,8 @@ export default createStore({ ], processId: null, searchContractId: null, - irsState: false + irsState: false, + qrError: "" }, getters: { getClientId(state) { @@ -78,6 +79,9 @@ export default createStore({ getIrsState(state) { return state.irsState; }, + getQrError(state) { + return state.qrError; + }, }, mutations: { setEmail(state, newEmail) { @@ -112,6 +116,9 @@ export default createStore({ }, setProcessId(state, processId) { state.processId = processId; + }, + setQrError(state, qrError) { + state.qrError = qrError; } }, actions: {}, diff --git a/src/views/SearchView.vue b/src/views/SearchView.vue index 3f204082a..8013ded59 100644 --- a/src/views/SearchView.vue +++ b/src/views/SearchView.vue @@ -20,7 +20,6 @@ SPDX-License-Identifier: Apache-2.0 --> - - - From ffcc6b75af0e512e667bc7faa6b8859607fbb40d Mon Sep 17 00:00:00 2001 From: david zynda Date: Mon, 20 Nov 2023 13:11:56 +0100 Subject: [PATCH 2/5] Regex safety for unstandardized qr codes --- src/components/general/QrcodeStrem.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/general/QrcodeStrem.vue b/src/components/general/QrcodeStrem.vue index f37995dfc..271eb0dfe 100644 --- a/src/components/general/QrcodeStrem.vue +++ b/src/components/general/QrcodeStrem.vue @@ -50,9 +50,14 @@ export default { onDecode(decodedString) { this.decodedString = decodedString; this.$router.push({ - path: `/${decodedString}`, + path: `/${this.processDecodedString(decodedString)}`, }); }, + processDecodedString(decodedString) { + const match = /CX:.*$/.exec(decodedString); + // This regex looks for a match "CX:" and returns it + everything to the right + return match ? match[0] : decodedString; + }, }, }; From aa5018610a6e9e10da54372acb5409c8712183e8 Mon Sep 17 00:00:00 2001 From: david zynda Date: Mon, 20 Nov 2023 14:51:27 +0100 Subject: [PATCH 3/5] responsiveness + prefix for QrcodeStream comp --- .../styles/components/general/footer.scss | 17 ++++++------- .../styles/components/landing/searchView.scss | 24 ++++++++++++++++--- src/components/general/QrcodeStrem.vue | 22 +++++++++++++++++ src/views/SearchView.vue | 4 ++-- 4 files changed, 54 insertions(+), 13 deletions(-) diff --git a/src/assets/styles/components/general/footer.scss b/src/assets/styles/components/general/footer.scss index 36118eed5..c833ca7a6 100644 --- a/src/assets/styles/components/general/footer.scss +++ b/src/assets/styles/components/general/footer.scss @@ -20,7 +20,6 @@ * SPDX-License-Identifier: Apache-2.0 */ - .footer-content { position: absolute; bottom: 0; @@ -80,8 +79,10 @@ } } -@media (max-width: 893px) { +@media (max-width: 1020px) { .footer-content { + position: relative; + margin: 0; flex-direction: column; align-items: center; @@ -91,12 +92,12 @@ } } } -@media (max-width: 900px) { - .footer-content { - position: relative; - margin:0; - } -} +// @media (max-width: 900px) { +// .footer-content { +// position: relative; +// margin: 0; +// } +// } @media (max-width: 585px) { .footer-content { flex-direction: column; diff --git a/src/assets/styles/components/landing/searchView.scss b/src/assets/styles/components/landing/searchView.scss index 771f3bb55..848aa4d25 100644 --- a/src/assets/styles/components/landing/searchView.scss +++ b/src/assets/styles/components/landing/searchView.scss @@ -441,6 +441,26 @@ .stream-container { margin-top: 15px; margin-bottom: 30px; + width: 300px; + height: 300px; + } + } +} + +@media (max-height: 650px) { + .home-page-container { + .stream-container { + width: 250px; + height: 250px; + } + } +} + +@media (max-height: 590px) { + .home-page-container { + .stream-container { + width: 200px; + height: 200px; } } } @@ -455,10 +475,8 @@ } .stream-container { - margin-top: 15px; + margin-top: 5px; margin-bottom: 30px; - width: 200px; - height: 200px; } .logotype-container { img { diff --git a/src/components/general/QrcodeStrem.vue b/src/components/general/QrcodeStrem.vue index 271eb0dfe..d5c835418 100644 --- a/src/components/general/QrcodeStrem.vue +++ b/src/components/general/QrcodeStrem.vue @@ -1,3 +1,25 @@ + +