Updated info.js to show deprecation messages when utilizing the options.json. Added translation status to info.js. Implemented the TRANSLATION_HIDDEN_LANGUAGES, TASK_CLEANUP_EXPIRED and TASK_CLEANUP_UNUSED environment variables in variables.js. Updated language dropdown to hide themselves if the number of allowed languages is lower than 2. Added the created at field within details.ejs. Implemented cleanup.js for automatically cleaning-up expired and unused vouchers. Updated the languages.js util with global filters. Added country flags to languages.js. Updated docker-compose.yml. Dependency updates. Updated README.md. Lowered log intensity within server.js

This commit is contained in:
Glenn de Haan
2025-08-26 18:21:30 +02:00
parent f36fa1144a
commit 7af385c8fe
14 changed files with 332 additions and 188 deletions

View File

@@ -28,7 +28,7 @@
</select>
</div>
</div>
<div>
<div class="<%= Object.keys(languages).length < 2 ? ' hidden' : '' %>">
<label for="language" class="block text-sm font-medium leading-6 text-gray-900 dark:text-white">Language</label>
<div class="mt-2">
<select id="language" name="language" class="mt-2 block w-full rounded-md border-0 py-1.5 pl-3 pr-10 text-gray-900 dark:text-white dark:bg-white/5 ring-1 ring-inset ring-gray-300 dark:ring-white/10 focus:ring-2 focus:ring-sky-600 sm:text-sm sm:leading-6 **:text-black">

View File

@@ -43,6 +43,10 @@
<% } %>
</dd>
</div>
<div class="py-2 grid grid-cols-3 gap-4 px-0">
<dt class="text-sm font-medium leading-6 text-gray-900 dark:text-white">Created</dt>
<dd class="text-sm leading-6 text-gray-600 dark:text-gray-400 col-span-2 mt-0 pointer-events-none no-underline text-inherit"><%= new Intl.DateTimeFormat('en-GB', {dateStyle: 'short', timeStyle: 'short', hour12: false}).format(new Date(voucher.createdAt)) %></dd>
</div>
<% if(voucher.name && notesConvert(voucher.name).note) { %>
<div class="py-2 grid grid-cols-3 gap-4 px-0">
<dt class="text-sm font-medium leading-6 text-gray-900 dark:text-white">Notes</dt>

View File

@@ -24,7 +24,7 @@
<input type="email" id="email" name="email" required class="mt-2 block w-full rounded-md border-0 py-1.5 text-gray-900 dark:text-white dark:bg-white/5 ring-1 ring-inset ring-gray-300 dark:ring-white/10 focus:ring-2 focus:ring-sky-600 sm:text-sm sm:leading-6">
</div>
</div>
<div>
<div class="<%= Object.keys(languages).length < 2 ? ' hidden' : '' %>">
<label for="language" class="block text-sm font-medium leading-6 text-gray-900 dark:text-white">Language</label>
<div class="mt-2">
<select id="language" name="language" class="mt-2 block w-full rounded-md border-0 py-1.5 pl-3 pr-10 text-gray-900 dark:text-white dark:bg-white/5 ring-1 ring-inset ring-gray-300 dark:ring-white/10 focus:ring-2 focus:ring-sky-600 sm:text-sm sm:leading-6 **:text-black">

View File

@@ -28,7 +28,7 @@
</select>
</div>
</div>
<div>
<div class="<%= Object.keys(languages).length < 2 ? ' hidden' : '' %>">
<label for="language" class="block text-sm font-medium leading-6 text-gray-900 dark:text-white">Language</label>
<div class="mt-2">
<select id="language" name="language" class="mt-2 block w-full rounded-md border-0 py-1.5 pl-3 pr-10 text-gray-900 dark:text-white dark:bg-white/5 ring-1 ring-inset ring-gray-300 dark:ring-white/10 focus:ring-2 focus:ring-sky-600 sm:text-sm sm:leading-6 **:text-black">

View File

@@ -73,7 +73,7 @@
<div class="p-4">
<% if(typeof voucherCode === 'undefined') { %>
<div class="block">
<form id="locale-form" class="mb-6" action="<%= baseUrl %>/kiosk" method="get">
<form id="locale-form" class="mb-6<%= Object.keys(languages).length < 2 ? ' hidden' : '' %>" action="<%= baseUrl %>/kiosk" method="get">
<label for="locale" class="block text-sm font-medium leading-6 text-gray-900 dark:text-white"><%= t('language') %></label>
<div class="mt-2">
<select id="locale" name="locale" class="mt-2 block w-full rounded-md border-0 py-1.5 pl-3 pr-10 text-gray-900 dark:text-white dark:bg-white/5 ring-1 ring-inset ring-gray-300 dark:ring-white/10 focus:ring-2 focus:ring-sky-600 sm:text-sm sm:leading-6 **:text-black">