From 51f8d0fb42d0dbba268799eb9385686d22fd2284 Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Fri, 3 Feb 2023 16:41:42 +0100 Subject: [PATCH 01/24] wip: fix registration code --- src/views/Profile.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/Profile.vue b/src/views/Profile.vue index fe02020..abb7a02 100644 --- a/src/views/Profile.vue +++ b/src/views/Profile.vue @@ -641,11 +641,11 @@ function textToBase64Barcode(text) { var canvas = document.createElement("canvas"); bwipjs.toCanvas(canvas, { bcid: config.codeformat || "code39", - text: text, + text: `${text}`, scale: 3, height: 10, // width: 10, - includetext: true, + includetext: false, textxalign: "center", backgroundcolor: "ffffff", }); -- 2.49.1 From 123509d0a6d15fe254e28f7a316bd6c260fe7bd2 Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Fri, 3 Feb 2023 16:44:10 +0100 Subject: [PATCH 02/24] fix: registration code (broke in merge) --- public/env.sample.js | 1 - src/views/Profile.vue | 18 ++++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/public/env.sample.js b/public/env.sample.js index e561d12..142bf66 100644 --- a/public/env.sample.js +++ b/public/env.sample.js @@ -13,5 +13,4 @@ const config = { url_imprint: '', // optional, will fallback to baseurl_selfservice/privacy url_privacy: '', - codeformat: 'code39' }; diff --git a/src/views/Profile.vue b/src/views/Profile.vue index abb7a02..0cc7e4a 100644 --- a/src/views/Profile.vue +++ b/src/views/Profile.vue @@ -638,17 +638,19 @@ import axios from "redaxios"; import bwipjs from "bwip-js"; function textToBase64Barcode(text) { - var canvas = document.createElement("canvas"); - bwipjs.toCanvas(canvas, { - bcid: config.codeformat || "code39", + const canvas = document.createElement("canvas"); + let codeconfig = { + bcid: config.code_format || "code39", text: `${text}`, scale: 3, - height: 10, - // width: 10, includetext: false, textxalign: "center", backgroundcolor: "ffffff", - }); + }; + if (codeconfig.bcid === "code39" || codeconfig.bcid === "code128"|| codeconfig.bcid === "ean13") { + codeconfig.height = 10; + } + bwipjs.toCanvas(canvas, codeconfig); return canvas.toDataURL("image/png"); } @@ -749,13 +751,13 @@ function get_certificate() { } else { var fileURL = window.URL.createObjectURL( new Blob([response.data], { type: "application/pdf" }) - ); + ); var fileLink = document.createElement("a"); fileLink.href = fileURL; fileLink.setAttribute("download", "Certificate.pdf"); document.body.appendChild(fileLink); - + fileLink.click(); fileLink.remove(); toast.clear(); -- 2.49.1 From 4a5b9d25698931158a602b2159b4e6c4fa129e8e Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Fri, 3 Feb 2023 16:44:43 +0100 Subject: [PATCH 03/24] =?UTF-8?q?=F0=9F=9A=80Bumped=20version=20to=20v0.8.?= =?UTF-8?q?3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 8 ++++++++ package.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57e4240..3f2068c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,17 @@ All notable changes to this project will be documented in this file. Dates are displayed in UTC. +#### [0.8.3](https://git.odit.services/lfk/selfservice/compare/0.8.2...0.8.3) + +- fix: registration code (broke in merge) [`123509d`](https://git.odit.services/lfk/selfservice/commit/123509d0a6d15fe254e28f7a316bd6c260fe7bd2) +- wip: fix registration code [`51f8d0f`](https://git.odit.services/lfk/selfservice/commit/51f8d0fb42d0dbba268799eb9385686d22fd2284) + #### [0.8.2](https://git.odit.services/lfk/selfservice/compare/0.8.1...0.8.2) +> 3 February 2023 + - move /registered/ to props [`c35f943`](https://git.odit.services/lfk/selfservice/commit/c35f943957e5ba84361a437c1d945331248746d1) +- 🚀Bumped version to v0.8.2 [`f4d1c7b`](https://git.odit.services/lfk/selfservice/commit/f4d1c7b053d1e7210911772bde1b2d80a30ab225) - /profile/ text cleanups [`64e6ef8`](https://git.odit.services/lfk/selfservice/commit/64e6ef8cec38a8193c4fb28c5f1b26ee0e4d5063) - /profile/ move from anchor tag to button [`ac75828`](https://git.odit.services/lfk/selfservice/commit/ac75828309043532c6ab8aad63e0c40edf450459) - /profile/ toast styles [`c7f3a89`](https://git.odit.services/lfk/selfservice/commit/c7f3a893af8705af12f2e7ae7e40197ca4c28666) diff --git a/package.json b/package.json index 072c0ec..7d6e04e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@odit/lfk-selfservice", - "version": "0.8.2", + "version": "0.8.3", "scripts": { "dev": "vite", "build": "vite build", -- 2.49.1 From 9ac14e8a5d740fb4cd87645e69b2cfde73e4acc7 Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Fri, 3 Feb 2023 16:48:14 +0100 Subject: [PATCH 04/24] wip: error registration ui feedback --- src/views/Register.vue | 381 +++++++++++++++++++++++++++++++++-------- 1 file changed, 307 insertions(+), 74 deletions(-) diff --git a/src/views/Register.vue b/src/views/Register.vue index 7d68ac9..1ed687d 100644 --- a/src/views/Register.vue +++ b/src/views/Register.vue @@ -2,32 +2,57 @@
-

Lauf für Kaya! - {{ $t('registrieren') }}

-

{{ $t('register.register_now') }}

+

+ Lauf für Kaya! - {{ $t("registrieren") }} +

+

+ {{ $t("register.register_now") }} +

{{ $t('organization') }}: {{ state.org_name }}

+ > + {{ $t("organization") }}: {{ state.org_name }} +

Team:

+ > + Team: +

Bürgerlauf

+ > + Bürgerlauf +

- + -

{{ $t('please_provide_valid_mail') }}

+

+ {{ $t("please_provide_valid_mail") }} +

- +

{{ $t('this_is_not_a_valid_international_phone_number') }}

+ > + {{ $t("this_is_not_a_valid_international_phone_number") }} +

@@ -115,13 +222,14 @@ + >{{ $t("provide_address") }}
- +

{{ $t('please_provide_a_valid_zipcode') }}

+ > + {{ $t("please_provide_a_valid_zipcode") }} +

@@ -195,15 +370,19 @@ />
-
@@ -219,8 +398,11 @@ />
-
@@ -228,10 +410,30 @@
+ :disabled="!state.submit_enabled" + :class="{ + 'opacity-50': !state.submit_enabled, + 'cursor-not-allowed': !state.submit_enabled, + }" + class=" + text-white + block + w-full + text-center + py-2 + px-3 + border-2 border-gray-300 + rounded-md + p-1 + bg-blue-800 + font-medium + hover:border-gray-400 + focus:outline-none focus:border-gray-400 + sm:text-sm + " + > + {{ $t("registrieren") }} +
@@ -241,16 +443,17 @@