From 8cc5138888459654a7363b64d611967ef815f43c Mon Sep 17 00:00:00 2001 From: Shiro-Nek0 Date: Thu, 26 Feb 2026 02:55:20 -0300 Subject: [PATCH] discord theme, top bar fix, organized folders --- KeyGenerator/A4 Printable Grid.py | 6 +- .../keychain_3x3_perfect.pdf | Bin README.md | 2 +- templates/index.html | 218 +++++++++++------- templates/login.html | 100 +++++--- 5 files changed, 205 insertions(+), 121 deletions(-) rename keychain_3x3_perfect.pdf => KeyGenerator/keychain_3x3_perfect.pdf (100%) diff --git a/KeyGenerator/A4 Printable Grid.py b/KeyGenerator/A4 Printable Grid.py index f0bd1f8..f1b54db 100644 --- a/KeyGenerator/A4 Printable Grid.py +++ b/KeyGenerator/A4 Printable Grid.py @@ -2,8 +2,8 @@ import os from PIL import Image # --- CONFIGURATION --- -CARD_DIR = 'keychain_cards' -OUTPUT_PDF = 'keychain_3x3_perfect.pdf' +CARD_DIR = os.path.join(os.getcwd(),'keychain_cards') +OUTPUT_PDF = os.path.join(os.getcwd(), 'keychain_3x3_perfect.pdf') # A4 at 300 DPI PAGE_W, PAGE_H = 2480, 3508 @@ -67,4 +67,4 @@ def generate_printable_pdf(): print(f"✅ Created {OUTPUT_PDF}. Now go print it and stop crying.") if __name__ == "__main__": - generate_printable_pdf() \ No newline at end of file + generate_printable_pdf() diff --git a/keychain_3x3_perfect.pdf b/KeyGenerator/keychain_3x3_perfect.pdf similarity index 100% rename from keychain_3x3_perfect.pdf rename to KeyGenerator/keychain_3x3_perfect.pdf diff --git a/README.md b/README.md index 741f70b..fc4e89d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# SekiPOS v1.1 🍫🥤 +# SekiPOS v1.2 🍫🥤 A reactive POS inventory system for software engineers with a snack addiction. Features real-time UI updates, automatic product discovery via Open Food Facts, and local image caching. diff --git a/templates/index.html b/templates/index.html index 9539e02..5f12109 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,5 +1,6 @@ + @@ -7,38 +8,44 @@ +
-

SekiPOS v1.1

-
- - Usuario: {{ user.username }} | - Cerrar Sesión +

SekiPOS v1.2

+
+ + | + Usuario: {{ user.username }} + | + Cerrar Sesión
@@ -136,7 +201,7 @@
¡Nuevo! Barcode . ¿Deseas agregarlo? - +
@@ -163,7 +228,7 @@

Inventario

- + @@ -210,12 +275,10 @@ } formatTablePrices(); - // Dark Mode Logic function toggleTheme() { const html = document.documentElement; const currentTheme = html.getAttribute('data-theme'); const newTheme = currentTheme === 'dark' ? 'light' : 'dark'; - html.setAttribute('data-theme', newTheme); localStorage.setItem('theme', newTheme); updateThemeUI(newTheme); @@ -226,12 +289,11 @@ btnText.innerText = theme === 'dark' ? 'Modo Claro' : 'Modo Oscuro'; } - // Initialize theme from storage const savedTheme = localStorage.getItem('theme') || 'light'; document.documentElement.setAttribute('data-theme', savedTheme); updateThemeUI(savedTheme); - socket.on('new_scan', function(data) { + socket.on('new_scan', function (data) { dismissPrompt(); document.getElementById('display-name').innerText = data.name; document.getElementById('display-price').innerText = clpFormatter.format(data.price); @@ -239,22 +301,10 @@ document.getElementById('display-img').src = data.image || './static/placeholder.png'; }); - socket.on('scan_error', function(data) { + socket.on('scan_error', function (data) { const prompt = document.getElementById('new-product-prompt'); document.getElementById('new-barcode-display').innerText = data.barcode; - document.getElementById('display-price').innerText = "$ ???"; prompt.style.display = 'flex'; - - if (data.name) { - document.getElementById('display-name').innerText = data.name + " (Nuevo)"; - document.getElementById('display-price').innerText = "$ ???"; - document.getElementById('display-img').src = data.image || './static/placeholder.png'; - } else { - document.getElementById('display-name').innerText = "Producto Desconocido"; - document.getElementById('display-img').src = './static/placeholder.png'; - } - document.getElementById('display-barcode').innerText = data.barcode; - document.getElementById('form-barcode').value = data.barcode; document.getElementById('form-name').value = data.name || ''; document.getElementById('form-image').value = data.image || ''; @@ -274,23 +324,19 @@ document.getElementById('form-price').value = price; document.getElementById('form-image').value = image; document.getElementById('form-title').innerText = "Editando: " + name; - window.scrollTo({top: 0, behavior: 'smooth'}); + window.scrollTo({ top: 0, behavior: 'smooth' }); } function searchTable() { var input = document.getElementById("searchInput"); var filter = input.value.toUpperCase(); var tr = document.getElementById("inventoryTable").getElementsByTagName("tr"); - for (var i = 1; i < tr.length; i++) { var content = tr[i].textContent || tr[i].innerText; tr[i].style.display = content.toUpperCase().indexOf(filter) > -1 ? "" : "none"; } } - - socket.on('product_deleted', function(data) { - window.location.reload(); - }); + \ No newline at end of file diff --git a/templates/login.html b/templates/login.html index 0eab41c..850d16f 100644 --- a/templates/login.html +++ b/templates/login.html @@ -5,87 +5,125 @@ SekiPOS Login