diff --git a/app.js b/app.js index d32cede..ca1be01 100644 --- a/app.js +++ b/app.js @@ -120,7 +120,8 @@ function renderTemplate(templateId) { width: 1.5, height: 25, displayValue: false, - margin: 0 + margin: 0, + background: 'transparent' }); } catch (e) { console.error('Barcode generation failed:', e); @@ -289,9 +290,19 @@ function showSnackbar(message, type = '') { function setupDisclaimer() { const modal = document.getElementById('disclaimerModal'); const closeBtn = document.getElementById('disclaimerClose'); + const dontAskCheckbox = document.getElementById('dontAskAgain'); + + // Check if user previously chose "don't ask again" + if (localStorage.getItem('disclaimerAccepted') === 'true') { + modal.classList.add('hidden'); + return; + } if (closeBtn && modal) { closeBtn.addEventListener('click', () => { + if (dontAskCheckbox && dontAskCheckbox.checked) { + localStorage.setItem('disclaimerAccepted', 'true'); + } modal.classList.add('hidden'); }); } diff --git a/index.html b/index.html index c637b28..6659ca6 100644 --- a/index.html +++ b/index.html @@ -24,6 +24,10 @@

Legal Disclaimer

For legal reasons, this is a joke.

+ diff --git a/styles.css b/styles.css index 09e5a6d..85a6af4 100644 --- a/styles.css +++ b/styles.css @@ -73,6 +73,24 @@ margin-bottom: 24px; } +.modal .checkbox-label { + display: flex; + align-items: center; + justify-content: center; + gap: 8px; + margin-bottom: 16px; + font-size: 0.875rem; + cursor: pointer; + color: var(--md-sys-color-on-surface-variant, #49454F); +} + +.modal .checkbox-label input[type="checkbox"] { + width: 18px; + height: 18px; + cursor: pointer; + accent-color: var(--md-sys-color-primary, #1976D2); +} + .modal .btn { min-width: 160px; }