mirror of
https://github.com/glenndehaan/unifi-voucher-site.git
synced 2026-03-31 06:24:02 -04:00
Updated info.js for new printers key. Updated print.js to forward ESC/POS printer IPs. Updated keys within variables.js. Added 'UI_BACK_BUTTON', 'PRINTER_TYPE' and 'PRINTER_IP' to the deprecated strings array.js. Updated status.js with new printing module. Updated docker-compose.yml environment variables. Updated dependencies. Hotfix body type for express v5. Updated README.md. Removed back button from navigation.ejs. Updated print.ejs and bulk-print.ejs with printer selection. Updated print logic within server.js to allow printer selection by user
This commit is contained in:
@@ -18,6 +18,16 @@
|
||||
<div class="flex flex-1 flex-col justify-between">
|
||||
<div class="divide-y divide-black/5 dark:divide-white/5 px-4 sm:px-6">
|
||||
<div class="space-y-6 pb-5 pt-6">
|
||||
<div>
|
||||
<label for="printer" class="block text-sm font-medium leading-6 text-gray-900 dark:text-white">Printer</label>
|
||||
<div class="mt-2">
|
||||
<select id="printer" name="printer" 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">
|
||||
<% printers.forEach((printer) => { %>
|
||||
<option value="<%= printer %>"><%= printer %> (<%= printer === 'pdf' ? 'PDF' : 'ESC/POS' %>)</option>
|
||||
<% }); %>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label for="language" class="block text-sm font-medium leading-6 text-gray-900 dark:text-white">Language</label>
|
||||
<div class="mt-2">
|
||||
|
||||
@@ -18,6 +18,16 @@
|
||||
<div class="flex flex-1 flex-col justify-between">
|
||||
<div class="divide-y divide-black/5 dark:divide-white/5 px-4 sm:px-6">
|
||||
<div class="space-y-6 pb-5 pt-6">
|
||||
<div>
|
||||
<label for="printer" class="block text-sm font-medium leading-6 text-gray-900 dark:text-white">Printer</label>
|
||||
<div class="mt-2">
|
||||
<select id="printer" name="printer" 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">
|
||||
<% printers.forEach((printer) => { %>
|
||||
<option value="<%= printer %>"><%= printer %> (<%= printer === 'pdf' ? 'PDF' : 'ESC/POS' %>)</option>
|
||||
<% }); %>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label for="language" class="block text-sm font-medium leading-6 text-gray-900 dark:text-white">Language</label>
|
||||
<div class="mt-2">
|
||||
|
||||
@@ -2,13 +2,6 @@
|
||||
<div class="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
|
||||
<div class="flex h-16 justify-between">
|
||||
<div class="flex">
|
||||
<% if(uiBackButton) { %>
|
||||
<button aria-label="Back to Previous Page" onclick="window.history.go(-1);">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="text-gray-900 dark:text-white hover:text-gray-700 dark:hover:text-gray-100 w-10 h-10 mr-4" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path fill-rule="evenodd" d="M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm-4.28 9.22a.75.75 0 0 0 0 1.06l3 3a.75.75 0 1 0 1.06-1.06l-1.72-1.72h5.69a.75.75 0 0 0 0-1.5h-5.69l1.72-1.72a.75.75 0 0 0-1.06-1.06l-3 3Z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
</button>
|
||||
<% } %>
|
||||
<a href="<%= baseUrl %>/vouchers" class="flex shrink-0 items-center">
|
||||
<img class="h-12 w-auto" width="48" height="48" alt="UniFi Voucher Site Logo" src="<%= baseUrl %>/images/logo.png">
|
||||
<div class="hidden sm:block ml-4 text-2xl font-semibold leading-7 text-gray-900 dark:text-white">
|
||||
|
||||
@@ -128,35 +128,6 @@
|
||||
<%= status.printing.details %> <a href="<%= status.printing.info %>" class="italic text-xs underline" aria-label="More Info Link" target="_blank" rel="noreferrer noopener">More Info</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="border-b border-gray-300 dark:border-white/10 bg-white dark:bg-white/5">
|
||||
<td class="p-4 align-middle font-medium flex items-center gap-2 pl-6">
|
||||
<svg class="w-5 h-5" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M5.625 1.5c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0 0 16.5 9h-1.875a1.875 1.875 0 0 1-1.875-1.875V5.25A3.75 3.75 0 0 0 9 1.5H5.625Z" />
|
||||
<path d="M12.971 1.816A5.23 5.23 0 0 1 14.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 0 1 3.434 1.279 9.768 9.768 0 0 0-6.963-6.963Z" />
|
||||
</svg>
|
||||
PDF
|
||||
</td>
|
||||
<td class="p-4 align-middle">
|
||||
<%- include('partials/tag', {status: status.printing.modules.pdf.status}) %>
|
||||
</td>
|
||||
<td class="p-4 align-middle">
|
||||
<%= status.printing.modules.pdf.details %> <a href="<%= status.printing.modules.pdf.info %>" class="italic text-xs underline" aria-label="More Info Link" target="_blank" rel="noreferrer noopener">More Info</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="border-b border-gray-300 dark:border-white/10 bg-white dark:bg-white/5">
|
||||
<td class="p-4 align-middle font-medium flex items-center gap-2 pl-6">
|
||||
<svg class="w-5 h-5" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path fill-rule="evenodd" d="M7.875 1.5C6.839 1.5 6 2.34 6 3.375v2.99c-.426.053-.851.11-1.274.174-1.454.218-2.476 1.483-2.476 2.917v6.294a3 3 0 0 0 3 3h.27l-.155 1.705A1.875 1.875 0 0 0 7.232 22.5h9.536a1.875 1.875 0 0 0 1.867-2.045l-.155-1.705h.27a3 3 0 0 0 3-3V9.456c0-1.434-1.022-2.7-2.476-2.917A48.716 48.716 0 0 0 18 6.366V3.375c0-1.036-.84-1.875-1.875-1.875h-8.25ZM16.5 6.205v-2.83A.375.375 0 0 0 16.125 3h-8.25a.375.375 0 0 0-.375.375v2.83a49.353 49.353 0 0 1 9 0Zm-.217 8.265c.178.018.317.16.333.337l.526 5.784a.375.375 0 0 1-.374.409H7.232a.375.375 0 0 1-.374-.409l.526-5.784a.373.373 0 0 1 .333-.337 41.741 41.741 0 0 1 8.566 0Zm.967-3.97a.75.75 0 0 1 .75-.75h.008a.75.75 0 0 1 .75.75v.008a.75.75 0 0 1-.75.75H18a.75.75 0 0 1-.75-.75V10.5ZM15 9.75a.75.75 0 0 0-.75.75v.008c0 .414.336.75.75.75h.008a.75.75 0 0 0 .75-.75V10.5a.75.75 0 0 0-.75-.75H15Z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
ESC/POS
|
||||
</td>
|
||||
<td class="p-4 align-middle">
|
||||
<%- include('partials/tag', {status: status.printing.modules.escpos.status}) %>
|
||||
</td>
|
||||
<td class="p-4 align-middle">
|
||||
<%= status.printing.modules.escpos.details %> <a href="<%= status.printing.modules.escpos.info %>" class="italic text-xs underline" aria-label="More Info Link" target="_blank" rel="noreferrer noopener">More Info</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="border-b border-gray-300 dark:border-white/10 bg-white dark:bg-white/5">
|
||||
<td class="p-4 align-middle font-medium flex items-center gap-2">
|
||||
<svg class="w-5 h-5" viewBox="0 0 24 24" fill="currentColor">
|
||||
|
||||
Reference in New Issue
Block a user