Lower ticket virtual print resolution for testing
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled

This commit is contained in:
2026-07-18 16:44:12 +00:00
parent 95a01c8958
commit 4363829c26
2 changed files with 8 additions and 6 deletions

View File

@@ -1665,10 +1665,12 @@ const POS = (() => {
// Paper width: 58 mm -> 48 mm printable; 80 mm -> 72 mm printable.
const paperWidth = parseInt(rc('paper_width', '80'), 10) || 80;
const is58 = paperWidth === 58;
const printWidth = is58 ? 48 : 72;
const fontSize = is58 ? '9.5pt' : '11pt';
const smallFont = is58 ? '8pt' : '9.5pt';
const nameMax = is58 ? '17mm' : '32mm';
// Lower virtual resolution: render on a narrower canvas so the printer
// driver scales content up, producing thicker/larger pixels.
const printWidth = is58 ? 42 : 64;
const fontSize = is58 ? '9pt' : '10.5pt';
const smallFont = is58 ? '7.5pt' : '9pt';
const nameMax = is58 ? '14mm' : '27mm';
let iframe = document.getElementById('ticketPrintFrame');
if (!iframe) {
@@ -1691,7 +1693,7 @@ const POS = (() => {
<style>
@page { margin: 0; size: ${printWidth}mm auto; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: auto; overflow: visible; background: #fff; color: #000; font-family: 'Courier New', Courier, 'Lucida Console', monospace; font-size: ${fontSize}; line-height: 1.55; -webkit-font-smoothing: none; -moz-osx-font-smoothing: unset; text-rendering: geometricPrecision; }
html, body { margin: 0; padding: 0; height: auto; overflow: visible; background: #fff; color: #000; font-family: 'Courier New', Courier, 'Lucida Console', monospace; font-size: ${fontSize}; line-height: 1.55; -webkit-font-smoothing: none; -moz-osx-font-smoothing: unset; text-rendering: geometricPrecision; image-rendering: pixelated; }
body { width: ${printWidth}mm; }
.ticket { width: ${printWidth}mm; padding: 4mm 3mm 5mm; border: none !important; box-shadow: none !important; }
.item-line-wide { display: grid !important; grid-template-columns: 8mm 1fr auto auto !important; gap: 2mm; font-size: ${fontSize}; margin-bottom: 2mm; padding-left: 1mm; align-items: start; }

View File

@@ -6,7 +6,7 @@
// The fetch handler normalizes static asset URLs (strips ?v= query strings)
// so templates can use cache-busting query params freely.
const VERSION = 48;
const VERSION = 49;
const CACHE_NAME = 'nexus-pos-v' + VERSION;
const APP_SHELL = [