Compare commits

..

No commits in common. "ed7242cc2a6e1af22de8950a53b64e94459a2aee" and "6ecaae1b8dcce099b82cd257a22bd1d579d79ba2" have entirely different histories.

3 changed files with 19 additions and 29 deletions

View File

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

10
pnpm-lock.yaml generated
View File

@ -12,8 +12,8 @@ importers:
specifier: ^5.2.5 specifier: ^5.2.5
version: 5.2.5 version: 5.2.5
'@odit/lfk-client-js': '@odit/lfk-client-js':
specifier: 1.2.1 specifier: 1.2.0
version: 1.2.1 version: 1.2.0
'@tailwindcss/vite': '@tailwindcss/vite':
specifier: ^4.1.3 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)) 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': '@octokit/types@13.10.0':
resolution: {integrity: sha512-ifLaO34EbbPj0Xgro4G5lP5asESjwHracYJvVaPIyXMuiuXLlhic3S47cBdTb+jfODkTE5YtGCLt3Ay3+J97sA==} resolution: {integrity: sha512-ifLaO34EbbPj0Xgro4G5lP5asESjwHracYJvVaPIyXMuiuXLlhic3S47cBdTb+jfODkTE5YtGCLt3Ay3+J97sA==}
'@odit/lfk-client-js@1.2.1': '@odit/lfk-client-js@1.2.0':
resolution: {integrity: sha512-N9Cf0aIQn/kV1jAwhDp+2dMnaoZ7SDo2IYddmepqlvLXi/tu5b0aTJRAsjqqnsRP88EuMR4TyLyBCIdt0vOXiw==} resolution: {integrity: sha512-RR/Ij3PDMF840VJtphO51k+3voJcTlvRIxzTFBkvrwriBmLJwchBQxq40K4/kyVIFH7lLwO3uJy0PaxgEoTbFQ==}
'@odit/license-exporter@0.2.0': '@odit/license-exporter@0.2.0':
resolution: {integrity: sha512-RRyfQzDLoyLQlGSd8ThJQ3h0fiCe4tkmm935AUvSVQWP+p88FcnI4iaktKBJJVBnIpDhkv/7sDSA5dFc/QMM5w==} resolution: {integrity: sha512-RRyfQzDLoyLQlGSd8ThJQ3h0fiCe4tkmm935AUvSVQWP+p88FcnI4iaktKBJJVBnIpDhkv/7sDSA5dFc/QMM5w==}
@ -2552,7 +2552,7 @@ snapshots:
dependencies: dependencies:
'@octokit/openapi-types': 24.2.0 '@octokit/openapi-types': 24.2.0
'@odit/lfk-client-js@1.2.1': {} '@odit/lfk-client-js@1.2.0': {}
'@odit/license-exporter@0.2.0': '@odit/license-exporter@0.2.0':
dependencies: dependencies:

View File

@ -62,18 +62,12 @@
function textToBase64Barcode(text: string, is_qrcode: boolean) { function textToBase64Barcode(text: string, is_qrcode: boolean) {
const canvas = document.createElement('canvas'); const canvas = document.createElement('canvas');
let bcid = 'code128';
if (is_qrcode) { if (is_qrcode) {
bcid = 'qrcode';
}
bwipjs.toCanvas(canvas, { bwipjs.toCanvas(canvas, {
bcid: "qrcode", bcid,
text: `${text}`,
scale: 10,
includetext: false,
textxalign: 'center',
backgroundcolor: 'ffffff',
});
} else {
bwipjs.toCanvas(canvas, {
bcid: "code128",
text: `${text}`, text: `${text}`,
scale: 10, scale: 10,
includetext: true, includetext: true,
@ -81,7 +75,6 @@
backgroundcolor: 'ffffff', backgroundcolor: 'ffffff',
height: 10 height: 10
}); });
}
return canvas.toDataURL('image/png'); return canvas.toDataURL('image/png');
} }
@ -313,13 +306,10 @@
</div> </div>
<div class="mb-2 text-center"> <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 <img
class="w-full md:w-auto mb-2 mx-auto bg-white p-4" class="w-full md:w-auto mb-2 mx-auto bg-white p-4"
alt="runner id" alt="runner id"
src={textToBase64Barcode(response.selfserviceLink.toString(), true)} src={textToBase64Barcode(response.id.toString(), false)}
/> />
</div> </div>