baldav/frontend/index.html
4aiman c3ec590da5 Chestny Znak scanner: DataMatrix -> National Catalog КБЖУ prefill
- ChZ module (frontend/js/chzn.js): import an anonymous session (exported from
  the CRPT app with tools/chzn_export.sh) and keep it alive via /authorize/refresh
  — /authorize/anonymous is Play Integrity-gated so BalDav can't mint its own.
  GS1 code normalization (reconstruct the GS separator before AI 93), check ->
  catalogData good_attrs КБЖУ parser (match by attr group + name prefix, since
  producers name the fields differently), optional nutrition/info vitamins.
- chzn_http Rust command: browser UA + returns {status,body} so 204/401/427 drive
  the session/refresh logic.
- Scanner modal (BarcodeDetector camera + photo/manual fallbacks) -> prefill the
  new-product form; CAMERA permission; settings section to import/refresh session.
- tools/chzn_export.sh: pull + validate the anonymous session from a rooted device.
2026-08-27 03:27:15 +03:00

29 lines
1 KiB
HTML

<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
<title>BalDav</title>
<link rel="stylesheet" href="lib/leaflet.css" />
<link rel="stylesheet" href="css/styles.css" />
</head>
<body>
<div id="app"></div>
<!-- Load order matters: db.js and bmr.js expose window.DB / window.BMR,
then main.js uses them. Tauri injects window.__TAURI__ before page scripts. -->
<script src="lib/leaflet.js"></script>
<script src="lib/leaflet-rotate.js"></script>
<script src="lib/hammer.min.js"></script>
<script src="lib/chart.min.js"></script>
<script src="lib/chartjs-plugin-zoom.min.js"></script>
<script src="lib/jszip.min.js"></script>
<script src="js/db.js"></script>
<script src="js/bmr.js"></script>
<script src="js/tilecache.js"></script>
<script src="js/gps.js"></script>
<script src="js/sync.js"></script>
<script src="js/chzn.js"></script>
<script src="js/main.js"></script>
</body>
</html>