Integrate the app end to end, add class outline, browser check and README
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
bdfdf581f3
commit
468cafc6db
17 files changed
+702
-16
No files matched your search
@@ -4,6 +4,7 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Booksorter</title>
|
||||
<link rel="icon" href="data:,">
|
||||
<link rel="stylesheet" href="/styles.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
+7
-1
@@ -20,6 +20,12 @@ function prepare(): void {
|
||||
});
|
||||
}
|
||||
|
||||
/** The one detector configuration the scanner uses; also used by scripts/browser-check.ts. */
|
||||
export function makeDetector(): BarcodeDetector {
|
||||
prepare();
|
||||
return new BarcodeDetector({ formats: ['ean_13'] });
|
||||
}
|
||||
|
||||
const INTERVAL_MS = 150;
|
||||
|
||||
export async function startScanner(
|
||||
@@ -54,7 +60,7 @@ export async function startScanner(
|
||||
throw e;
|
||||
}
|
||||
|
||||
const detector = new BarcodeDetector({ formats: ['ean_13'] });
|
||||
const detector = makeDetector();
|
||||
let state = newReadState();
|
||||
|
||||
// Sequential loop: the next round is scheduled only after the previous detection finished,
|
||||
|
||||
@@ -52,6 +52,7 @@ video.mirror { transform: scaleX(-1); }
|
||||
.item.column { flex-direction: column; align-items: stretch; gap: 8px; }
|
||||
.item-btn { display: flex; gap: 14px; align-items: flex-start; width: 100%; text-align: left; border: 0; padding: 0; background: none; }
|
||||
.item-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
|
||||
.item-main .chip { align-self: flex-start; margin-top: 4px; }
|
||||
.item-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
|
||||
.title { overflow-wrap: anywhere; }
|
||||
.callno { display: inline-flex; flex-direction: column; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-variant-numeric: tabular-nums; white-space: pre; min-width: 9.5em; font-size: .92rem; line-height: 1.35; }
|
||||
|
||||
Reference in new issue
Block a user