From 7a9042ffb25ac5ae14005278585ccfb6afe0395b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Gruszczy=C5=84ski?= Date: Sat, 19 Jul 2025 22:18:23 +0200 Subject: [PATCH] upload z zjec z galerii + prettycode --- static/js/receipt_upload.js | 11 +++++++++++ templates/list_share.html | 11 +++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/static/js/receipt_upload.js b/static/js/receipt_upload.js index 4fbf803..04107ad 100644 --- a/static/js/receipt_upload.js +++ b/static/js/receipt_upload.js @@ -89,3 +89,14 @@ if (!window.receiptUploaderInitialized) { window.receiptUploaderInitialized = true; } + +document.addEventListener("DOMContentLoaded", function () { + const isMobile = /Mobi|Android|iPhone|iPad/i.test(navigator.userAgent); + const galleryBtn = document.getElementById("galleryBtn"); + const galleryInput = document.getElementById("galleryInput"); + + if (!isMobile && galleryBtn && galleryInput) { + galleryBtn.style.display = "none"; + galleryInput.disabled = true; + } +}); diff --git a/templates/list_share.html b/templates/list_share.html index 3b33b09..b96f601 100644 --- a/templates/list_share.html +++ b/templates/list_share.html @@ -130,21 +130,28 @@
📤 Dodaj zdjęcie paragonu
-