17 Commits
1.1.5 ... 1.2.4

Author SHA1 Message Date
408bd00288 chore(release): 1.2.4
All checks were successful
Build latest image / build-container (push) Successful in 1m1s
Build release images / build-container (push) Successful in 1m1s
2025-04-25 13:19:15 +02:00
5646fedd4e style(print): Adjust print styles for improved readability 2025-04-25 13:19:01 +02:00
962307317f chore(release): 1.2.3
All checks were successful
Build release images / build-container (push) Successful in 59s
Build latest image / build-container (push) Successful in 1m1s
2025-04-25 13:00:30 +02:00
5d440d0a0c feat(print): Updated content of prints 2025-04-25 12:57:49 +02:00
54114a6547 fix: Hide print enabled debug message 2025-04-25 12:54:19 +02:00
8a08e19e00 chore(release): 1.2.2
All checks were successful
Build release images / build-container (push) Successful in 1m11s
Build latest image / build-container (push) Successful in 1m14s
2025-04-14 17:38:27 +02:00
642434b9fd feat(register): Enable/disable print via query params
All checks were successful
Build latest image / build-container (push) Successful in 48s
2025-04-12 18:02:36 +02:00
b0feae1719 chore(release): 1.2.1
All checks were successful
Build latest image / build-container (push) Successful in 1m7s
Build release images / build-container (push) Successful in 1m8s
2025-04-08 21:12:57 +02:00
cd8b98c624 feat(register): Implement created_via 2025-04-08 21:11:33 +02:00
be4b8df02b chore:(deps): Bump client 2025-04-08 21:11:06 +02:00
d3d0b356ac chore(release): 1.2.0
All checks were successful
Build latest image / build-container (push) Successful in 1m11s
Build release images / build-container (push) Successful in 1m9s
2025-04-08 20:58:14 +02:00
3fdd8c80d8 fix: Updated styling
Some checks failed
Build latest image / build-container (push) Has been cancelled
2025-04-08 20:57:43 +02:00
3e3846f1cb feat: Full printing support 2025-04-08 20:56:16 +02:00
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
6ecaae1b8d style(docs): Linting
All checks were successful
Build latest image / build-container (push) Successful in 44s
2025-04-07 15:16:45 +02:00
5f97c9d8da refactor(svelte): Threw out workspace config 2025-04-07 15:11:21 +02:00
8 changed files with 494 additions and 452 deletions

View File

@@ -2,8 +2,50 @@
All notable changes to this project will be documented in this file. Dates are displayed in UTC.
#### [1.2.4](https://git.odit.services/lfk/kiosk/compare/1.2.3...1.2.4)
- style(print): Adjust print styles for improved readability [`5646fed`](https://git.odit.services/lfk/kiosk/commit/5646fedd4e71b9fa25a5a80d03199f7897cda21c)
#### [1.2.3](https://git.odit.services/lfk/kiosk/compare/1.2.2...1.2.3)
> 25 April 2025
- feat(print): Updated content of prints [`5d440d0`](https://git.odit.services/lfk/kiosk/commit/5d440d0a0cba2f8f1470351ef740cfe957a0af47)
- chore(release): 1.2.3 [`9623073`](https://git.odit.services/lfk/kiosk/commit/962307317fbb83543b65e1bb36b266a888b732e0)
- fix: Hide print enabled debug message [`54114a6`](https://git.odit.services/lfk/kiosk/commit/54114a654733a9454a57a327bbf3f6dd1bf611f2)
#### [1.2.2](https://git.odit.services/lfk/kiosk/compare/1.2.1...1.2.2)
> 14 April 2025
- feat(register): Enable/disable print via query params [`642434b`](https://git.odit.services/lfk/kiosk/commit/642434b9fd4ecf985b160d4d87edad0e8bc106c6)
- chore(release): 1.2.2 [`8a08e19`](https://git.odit.services/lfk/kiosk/commit/8a08e19e00658fb145bb7fff7553ca33d6424b21)
#### [1.2.1](https://git.odit.services/lfk/kiosk/compare/1.2.0...1.2.1)
> 8 April 2025
- chore:(deps): Bump client [`be4b8df`](https://git.odit.services/lfk/kiosk/commit/be4b8df02bed33b4755cdf81b8a843239b32bcc1)
- chore(release): 1.2.1 [`b0feae1`](https://git.odit.services/lfk/kiosk/commit/b0feae1719c993eb351f1c36c35eedd8a5ffd7ea)
- feat(register): Implement created_via [`cd8b98c`](https://git.odit.services/lfk/kiosk/commit/cd8b98c6249b84cb6d2c4f7eb1d403c1837bc151)
#### [1.2.0](https://git.odit.services/lfk/kiosk/compare/1.1.5...1.2.0)
> 8 April 2025
- refactor(svelte): Threw out workspace config [`5f97c9d`](https://git.odit.services/lfk/kiosk/commit/5f97c9d8da1a9002875d8fe35606c078c62c1d0a)
- feat: Full printing support [`3e3846f`](https://git.odit.services/lfk/kiosk/commit/3e3846f1cb1fe281edce7c6ce3485f54ddbed3e2)
- refactor(register): Switch to showing qr code [`ed7242c`](https://git.odit.services/lfk/kiosk/commit/ed7242cc2a6e1af22de8950a53b64e94459a2aee)
- style(docs): Linting [`6ecaae1`](https://git.odit.services/lfk/kiosk/commit/6ecaae1b8dcce099b82cd257a22bd1d579d79ba2)
- chore(release): 1.2.0 [`d3d0b35`](https://git.odit.services/lfk/kiosk/commit/d3d0b356ac6d0e6d0fa40a7390799d57a3e50f7a)
- chore: Bump js lib [`6152500`](https://git.odit.services/lfk/kiosk/commit/61525006526ab5e237b0caf24a474618fc238372)
- fix: Updated styling [`3fdd8c8`](https://git.odit.services/lfk/kiosk/commit/3fdd8c80d8d72bdc899739896fa379ff7a7b620d)
#### [1.1.5](https://git.odit.services/lfk/kiosk/compare/1.1.4...1.1.5)
> 7 April 2025
- chore(release): 1.1.5 [`e32c2f3`](https://git.odit.services/lfk/kiosk/commit/e32c2f3069e03584f3829a96e3fea94f98bf419b)
- chore(deps): bump [`1665fd6`](https://git.odit.services/lfk/kiosk/commit/1665fd67ae7153ece759edbe3e74262eb207a2f6)
- feat: clock widget, general cleanups [`83826f9`](https://git.odit.services/lfk/kiosk/commit/83826f966bb0de2402889d6574c6db7730831119)

View File

@@ -1,32 +1,38 @@
# @lfk/kiosk
## Overview 👀
This is a simple kiosk style register form for the LfK runnersystem.
The basic idea is:
1. Create a runnersystem user with only `RUNNER:CREATE` permissions.
2. Login with this user under `/login`
3. Runners can register via their firstnam and lastname
4. The kiosk creates the runner via the backend and shows their id, firstname, lastname and a barcode containing their id
3. Runners can register via their firstname and lastname
4. The kiosk creates the runner via the backend and shows their id, firstname, lastname and a barcode containing their id along
## Development 🛠️
```
```shell
pnpm i
pnpm dev --open
```
## Build 🚀
```
```shell
pnpm i
pnpm build
```
## Docker 🐳
```
```shell
docker build .
docker-compose up
```
## Kiosk Google Chrome
```
``` shell
chrome https://run.lauf-fuer-kaya.de/kiosk/ -kiosk
```
```

View File

@@ -1,6 +1,6 @@
{
"name": "@lfk/kiosk",
"version": "1.1.5",
"version": "1.2.4",
"private": false,
"license": "MIT",
"repository": "https://git.odit.services/lfk/kiosk",
@@ -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.2",
"@tailwindcss/vite": "^4.1.3",
"bwip-js": "4.5.3",
"eslint-plugin-svelte": "^3.5.1",

780
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +0,0 @@
onlyBuiltDependencies:
- '@sveltejs/kit'
- esbuild
- svelte-preprocess

View File

@@ -24,12 +24,12 @@
</script>
<div
class="text-neutral-800 flex flex-col h-screen"
class="text-neutral-800 flex flex-col h-screen print:h-full"
style="background: url({lfkbackground});background-position: center center!important;background-size: contain!important;background-repeat: no-repeat!important;"
>
<main class="flex-grow">
<div
class="text-6xl font-semibold text-right text-gray-900 font-mono top-2 w-full fixed pr-4 xl:top-6 xl:pr-8"
class="text-6xl font-semibold text-right text-gray-900 font-mono top-2 w-full fixed pr-4 xl:top-6 xl:pr-8 print:hidden"
>
{hours}:{minutes}:{seconds}
</div>

View File

@@ -4,20 +4,27 @@
import { onMount } from 'svelte';
import Login from './Login.svelte';
$: printEnabled = false;
onMount(() => {
const params = new URLSearchParams(window.location.search);
if (params.get('print') === 'true') {
printEnabled = true;
}
loginFromStorage();
});
</script>
{#if $userState.isLoggedIn}
<Register />
<Register bind:printEnabled />
{:else}
<Login />
{/if}
<div class="fixed bottom-0 w-full text-center text-xl p-4 dark:text-white select-none">
<div class="fixed bottom-0 w-full text-center text-xl p-4 dark:text-white select-none print:absolute print:bottom-auto print:text-lg">
{#if $userState.isLoggedIn}
<b class="font-bold">LfK!2025</b> powered by
<b class="font-bold">ODIT.Services</b>
<b class="font-bold print:hidden">LfK!2025</b> powered by
<b class="font-bold print:hidden">ODIT.Services</b>
<b> LfK!2025 powered by ODIT.Services</b>
{:else}
<a
rel="noopener noreferrer"

View File

@@ -9,6 +9,8 @@
$: doneButtonEnabled = false;
$: showResult = false;
export let printEnabled = false;
let response: ResponseRunner;
const group = 1; //Default to Bürgerlauf
@@ -41,9 +43,15 @@
firstname,
lastname,
email: emailToSend,
group
group,
created_via: 'kiosk'
})) as ResponseRunner;
showResult = true;
if (printEnabled) {
setTimeout(() => {
window.print();
}, 200);
}
setTimeout(() => {
doneButtonEnabled = true;
setTimeout(() => {
@@ -62,19 +70,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');
}
@@ -83,13 +98,13 @@
});
</script>
<div class="flex h-full items-center py-16 select-none">
<div class="w-full max-w-md mx-auto p-6">
<div class="flex h-full items-center py-16 select-none print:py-0 print:items-baseline">
<div class="w-full max-w-md mx-auto p-6 print:p-0">
<!-- <div
class="mt-7 bg-white border border-gray-200 rounded-xl shadow-sm dark:bg-gray-800 dark:border-gray-200"
> -->
<div class="p-4 sm:p-7">
<div class="mt-5">
<div class="p-4 sm:p-7 print:p-0 print:sm:p-0">
<div class="mt-5 print:mt-0">
<!-- Form -->
{#if !showResult}
<div class="text-center">
@@ -299,21 +314,41 @@
<!-- End Form -->
{:else}
<div class="mb-2 text-center">
<h3 class="text-4xl font-semibold dark:text-white">
<h3 class="text-4xl font-semibold dark:text-white print:text-3xl">
{response.firstname}
{response.lastname}
</h3>
<h4 class="font-semibold dark:text-white hidden print:block print:text-xl">
{response.id}
</h4>
</div>
<div class="mb-2 text-center">
<h3 class="text-xl font-semibold dark:text-white print:hidden">
Scanne diesen QR-Code, um zu unserem Selfservice zu gelangen. Hier findest du deine
Rundenzeiten, Spenden und Urkunden.
</h3>
<h3 class="text-lg font-semibold dark:text-white hidden print:block">
Zeige diesen QR-Code am Infozelt vor, um deine Läuferkarte zu erhalten.
</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)}
class="w-full md:w-auto mb-2 mx-auto bg-white p-4"
alt="runner selfservice"
src={textToBase64Barcode(response.selfserviceLink.toString(), true)}
/>
<h3 class="text-lg font-semibold dark:text-white hidden print:block">
Scanne diesen QR-Code, um zu unserem Selfservice zu gelangen. Hier findest du deine
Rundenzeiten, Spenden und Urkunden.
</h3>
{#if printEnabled}
<h3 class="text-xl font-semibold dark:text-white print:hidden">
Bitte nehm den Bon mit und zeige ihn am Infozelt vor, um deine Läuferkarte zu erhalten.
Auf dem Bon findest auch nochmal den QR-Code.
</h3>
{/if}
</div>
<div class="mx-auto text-center items-center">
<div class="mx-auto text-center items-center print:hidden">
<button
class:opacity-50={!doneButtonEnabled}
disabled={!doneButtonEnabled}