Generic Commit; Most likely a fix or small feature

This commit is contained in:
Darius
2025-11-21 02:12:51 +01:00
parent e6f3e19e9e
commit 762029b36c

View File

@@ -238,7 +238,9 @@ body {
.scanner-info {
text-align: center;
font-size: 0.875rem;
color: #4b5563;
color: white;
margin-top: 1rem;
margin-bottom: 1rem;
}
/* Loading */
@@ -675,11 +677,7 @@ body {
const productView = document.getElementById("product-view")!;
const errorMessage = document.getElementById("error-message")!;
const barcodeDisplay = document.getElementById("barcode-display")!;
const videoElement = document.getElementById(
"scanner-video",
) as HTMLVideoElement;
// Helper functions
function showView(view: HTMLElement) {
[initialView, scannerView, loadingView, errorView, productView].forEach(
(v) => {
@@ -896,7 +894,7 @@ body {
codeReader = new window.ZXing.BrowserMultiFormatReader();
document.getElementById('start-scanner-btn').addEventListener('click', () => {
codeReader.decodeFromVideoDevice(undefined, 'scanner-video', (result, err) => {
codeReader.decodeFromVideoDevice(undefined, 'scanner-video', (result: unknown, err: unknown) => {
if (result) {
const code = result.getText();
barcodeDisplay.textContent = code;
@@ -944,18 +942,6 @@ body {
}
});
document
.getElementById("scanner-barcode-form")!
.addEventListener("submit", (e) => {
e.preventDefault();
const formData = new FormData(e.target as HTMLFormElement);
const barcode = formData.get("barcode") as string;
if (barcode?.trim()) {
searchProduct(barcode.trim());
(e.target as HTMLFormElement).reset();
}
});
// Hash-based routing for direct URL access and sharing
function handleHashChange() {
const hash = window.location.hash;