Compare commits

...

2 Commits

Author SHA1 Message Date
ed7242cc2a
refactor(register): Switch to showing qr code
All checks were successful
Build latest image / build-container (push) Successful in 45s
2025-04-08 20:22:11 +02:00
6152500652
chore: Bump js lib 2025-04-08 20:14:12 +02:00
3 changed files with 29 additions and 19 deletions

View File

@ -56,7 +56,7 @@
"type": "module",
"dependencies": {
"@fontsource/athiti": "^5.2.5",
"@odit/lfk-client-js": "1.2.0",
"@odit/lfk-client-js": "1.2.1",
"@tailwindcss/vite": "^4.1.3",
"bwip-js": "4.5.3",
"eslint-plugin-svelte": "^3.5.1",

10
pnpm-lock.yaml generated
View File

@ -12,8 +12,8 @@ importers:
specifier: ^5.2.5
version: 5.2.5
'@odit/lfk-client-js':
specifier: 1.2.0
version: 1.2.0
specifier: 1.2.1
version: 1.2.1
'@tailwindcss/vite':
specifier: ^4.1.3
version: 4.1.3(vite@6.2.5(@types/node@22.14.0)(jiti@2.4.2)(lightningcss@1.29.2)(yaml@2.7.0))
@ -399,8 +399,8 @@ packages:
'@octokit/types@13.10.0':
resolution: {integrity: sha512-ifLaO34EbbPj0Xgro4G5lP5asESjwHracYJvVaPIyXMuiuXLlhic3S47cBdTb+jfODkTE5YtGCLt3Ay3+J97sA==}
'@odit/lfk-client-js@1.2.0':
resolution: {integrity: sha512-RR/Ij3PDMF840VJtphO51k+3voJcTlvRIxzTFBkvrwriBmLJwchBQxq40K4/kyVIFH7lLwO3uJy0PaxgEoTbFQ==}
'@odit/lfk-client-js@1.2.1':
resolution: {integrity: sha512-N9Cf0aIQn/kV1jAwhDp+2dMnaoZ7SDo2IYddmepqlvLXi/tu5b0aTJRAsjqqnsRP88EuMR4TyLyBCIdt0vOXiw==}
'@odit/license-exporter@0.2.0':
resolution: {integrity: sha512-RRyfQzDLoyLQlGSd8ThJQ3h0fiCe4tkmm935AUvSVQWP+p88FcnI4iaktKBJJVBnIpDhkv/7sDSA5dFc/QMM5w==}
@ -2552,7 +2552,7 @@ snapshots:
dependencies:
'@octokit/openapi-types': 24.2.0
'@odit/lfk-client-js@1.2.0': {}
'@odit/lfk-client-js@1.2.1': {}
'@odit/license-exporter@0.2.0':
dependencies:

View File

@ -62,19 +62,26 @@
function textToBase64Barcode(text: string, is_qrcode: boolean) {
const canvas = document.createElement('canvas');
let bcid = 'code128';
if (is_qrcode) {
bcid = 'qrcode';
bwipjs.toCanvas(canvas, {
bcid: "qrcode",
text: `${text}`,
scale: 10,
includetext: false,
textxalign: 'center',
backgroundcolor: 'ffffff',
});
} else {
bwipjs.toCanvas(canvas, {
bcid: "code128",
text: `${text}`,
scale: 10,
includetext: true,
textxalign: 'center',
backgroundcolor: 'ffffff',
height: 10
});
}
bwipjs.toCanvas(canvas, {
bcid,
text: `${text}`,
scale: 10,
includetext: true,
textxalign: 'center',
backgroundcolor: 'ffffff',
height: 10
});
return canvas.toDataURL('image/png');
}
@ -304,12 +311,15 @@
{response.lastname}
</h3>
</div>
<div class="mb-2 text-center">
<h3 class="text-2xl font-semibold dark:text-white">
Hier direkt den Selfservice öffnen und deine Rundenzeiten anzeigen:
</h3>
<img
class="w-full md:w-auto mb-2 mx-auto bg-white p-4"
alt="runner id"
src={textToBase64Barcode(response.id.toString(), false)}
src={textToBase64Barcode(response.selfserviceLink.toString(), true)}
/>
</div>