From 51f8d0fb42d0dbba268799eb9385686d22fd2284 Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Fri, 3 Feb 2023 16:41:42 +0100 Subject: [PATCH 01/51] 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", }); From 123509d0a6d15fe254e28f7a316bd6c260fe7bd2 Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Fri, 3 Feb 2023 16:44:10 +0100 Subject: [PATCH 02/51] 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(); From 4a5b9d25698931158a602b2159b4e6c4fa129e8e Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Fri, 3 Feb 2023 16:44:43 +0100 Subject: [PATCH 03/51] =?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", From 9ac14e8a5d740fb4cd87645e69b2cfde73e4acc7 Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Fri, 3 Feb 2023 16:48:14 +0100 Subject: [PATCH 04/51] 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 @@ \ No newline at end of file From f71b01c39a62ef4402004e2fbcfacb37bc92ea39 Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Mon, 2 Dec 2024 11:06:26 +0100 Subject: [PATCH 33/51] chore(deps): node@23.3.0 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7d2db83..07adae3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.odit.services/hub/library/node:19.5.0-alpine3.17 AS build +FROM registry.odit.services/hub/library/node:23.3.0-alpine3.20 AS build ARG NPM_REGISTRY_URL=https://registry.npmjs.org WORKDIR /app From af9a168f587768d8b1af8990729e743481ba687d Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Mon, 2 Dec 2024 11:12:00 +0100 Subject: [PATCH 34/51] feat: lfk font --- package.json | 5 +++-- pnpm-lock.yaml | 20 ++++++++++++++------ src/main.js | 8 ++++++++ src/views/Home.vue | 17 +++++++---------- 4 files changed, 32 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 6b50eac..d6c1d55 100644 --- a/package.json +++ b/package.json @@ -9,9 +9,12 @@ "postbuild": "node env_fix.js" }, "dependencies": { + "@fontsource/athiti": "^5.1.0", + "@tailwindcss/vite": "4.0.0-beta.4", "bwip-js": "3.2.2", "marked": "2.0.3", "redaxios": "0.5.1", + "tailwindcss": "4.0.0-beta.4", "toastify-js": "1.12.0", "validator": "13.12.0", "vue": "3.5.13", @@ -20,11 +23,9 @@ "vue-toastification": "2.0.0-rc.1" }, "devDependencies": { - "@tailwindcss/vite": "4.0.0-beta.4", "@vitejs/plugin-vue": "5.2.1", "autoprefixer": "10.4.20", "release-it": "17.10.0", - "tailwindcss": "4.0.0-beta.4", "vite": "6.0.2", "vite-plugin-vue-devtools": "^7.6.7" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 27a5e13..17ffb32 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,12 @@ importers: .: dependencies: + '@fontsource/athiti': + specifier: ^5.1.0 + version: 5.1.0 + '@tailwindcss/vite': + specifier: 4.0.0-beta.4 + version: 4.0.0-beta.4(@babel/core@7.26.0)(postcss-load-config@4.0.2(postcss@8.4.49))(postcss@8.4.49)(svelte@5.3.1)(vite@6.0.2(@types/node@18.11.18)(jiti@2.4.1)(lightningcss@1.28.2)(yaml@2.6.1)) bwip-js: specifier: 3.2.2 version: 3.2.2 @@ -17,6 +23,9 @@ importers: redaxios: specifier: 0.5.1 version: 0.5.1 + tailwindcss: + specifier: 4.0.0-beta.4 + version: 4.0.0-beta.4 toastify-js: specifier: 1.12.0 version: 1.12.0 @@ -36,9 +45,6 @@ importers: specifier: 2.0.0-rc.1 version: 2.0.0-rc.1(vue@3.5.13) devDependencies: - '@tailwindcss/vite': - specifier: 4.0.0-beta.4 - version: 4.0.0-beta.4(@babel/core@7.26.0)(postcss-load-config@4.0.2(postcss@8.4.49))(postcss@8.4.49)(svelte@5.3.1)(vite@6.0.2(@types/node@18.11.18)(jiti@2.4.1)(lightningcss@1.28.2)(yaml@2.6.1)) '@vitejs/plugin-vue': specifier: 5.2.1 version: 5.2.1(vite@6.0.2(@types/node@18.11.18)(jiti@2.4.1)(lightningcss@1.28.2)(yaml@2.6.1))(vue@3.5.13) @@ -48,9 +54,6 @@ importers: release-it: specifier: 17.10.0 version: 17.10.0 - tailwindcss: - specifier: 4.0.0-beta.4 - version: 4.0.0-beta.4 vite: specifier: 6.0.2 version: 6.0.2(@types/node@18.11.18)(jiti@2.4.1)(lightningcss@1.28.2)(yaml@2.6.1) @@ -347,6 +350,9 @@ packages: cpu: [x64] os: [win32] + '@fontsource/athiti@5.1.0': + resolution: {integrity: sha512-iQsMj7twMf8bmqW0zBOQX6S3oYdRjjgoGO9JOtLPd9T0pzQ1zxGQmp2eEc3ny/Gd5PDRSmn8E5CNwSjUVl0raA==} + '@iarna/toml@2.2.5': resolution: {integrity: sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==} @@ -2476,6 +2482,8 @@ snapshots: '@esbuild/win32-x64@0.24.0': optional: true + '@fontsource/athiti@5.1.0': {} + '@iarna/toml@2.2.5': {} '@inquirer/figures@1.0.8': {} diff --git a/src/main.js b/src/main.js index 792b9b6..ca670c1 100644 --- a/src/main.js +++ b/src/main.js @@ -2,6 +2,14 @@ import { createApp } from 'vue'; import './tailwind.css'; import 'toastify-js/src/toastify.css'; import 'vue-toastification/dist/index.css'; +// import '@fontsource/athiti'; +import '@fontsource/athiti/200.css'; +import '@fontsource/athiti/300.css'; +import '@fontsource/athiti/400.css'; +import '@fontsource/athiti/500.css'; +import '@fontsource/athiti/600.css'; +import '@fontsource/athiti/700.css'; +// import App from './App.vue'; import { routes } from './routes.js'; import { createRouter, createWebHistory } from 'vue-router'; diff --git a/src/views/Home.vue b/src/views/Home.vue index a73fe5f..1b18e7b 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -4,19 +4,16 @@

Lauf Für Kaya!

+ class="mb-6 text-4xl font-extrabold leading-none tracking-normal text-white md:text-6xl md:tracking-tight font-[Athiti] font-bold"> + Lauf Für Kaya!
2025

Selfservice Portal

{{ $t('main_page_text') }}

From 75b61d991bd483aaf00871c12c9268fc6e21435b Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Mon, 2 Dec 2024 11:24:04 +0100 Subject: [PATCH 35/51] feat(Home): improve ui --- src/views/Home.vue | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/views/Home.vue b/src/views/Home.vue index 1b18e7b..f250c45 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -1,20 +1,20 @@ \ No newline at end of file diff --git a/src/views/Imprint.vue b/src/views/Imprint.vue index 51c88eb..af3e1a4 100644 --- a/src/views/Imprint.vue +++ b/src/views/Imprint.vue @@ -31,7 +31,7 @@ export default { try { md = await fetch(`/imprint_en.md`); } catch (error) { - md = "Error loading Imprint"; + md = t('error_loading_imprint'); } } this.content = marked(await md.text()); diff --git a/src/views/Profile.vue b/src/views/Profile.vue index 41c09a7..4504e32 100644 --- a/src/views/Profile.vue +++ b/src/views/Profile.vue @@ -77,8 +77,8 @@ w-full md:w-auto " @click="() => { - state.delete_active = true; - } + state.delete_active = true; + } ">