114 lines
4.4 KiB
HTML
114 lines
4.4 KiB
HTML
<!--
|
|
Шаблон второго экрана «загрузка компонента» без выбора рецепта.
|
|
|
|
Роут: GET /component_loader → app.routes.pages.component_loader (render_template).
|
|
|
|
Переменные Jinja задаются только на сервере при первом рендере:
|
|
component_name, remaining_weight, current_loaded, total_component, total_mixture, last_update
|
|
|
|
Статика: /static/css/inter-fonts.css
|
|
|
|
Динамика (как в монолите): страница может дополняться JS с опросом /api/weight_display_data
|
|
и родственных эндпоинтов из app.routes.legacy_misc (текущий рецепт, вес, навигация по компонентам).
|
|
-->
|
|
<!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, user-scalable=no">
|
|
<title>Загрузка компонента</title>
|
|
<link rel="stylesheet" href="/static/css/inter-fonts.css">
|
|
<style>
|
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
body {
|
|
font-family: 'Inter', system-ui, sans-serif;
|
|
min-height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: #f3f4f6;
|
|
color: #111827;
|
|
padding: 24px;
|
|
}
|
|
.kiosk-menu-btn {
|
|
position: fixed;
|
|
top: 16px;
|
|
right: 16px;
|
|
z-index: 1200;
|
|
width: 52px;
|
|
height: 52px;
|
|
border-radius: 50%;
|
|
border: none;
|
|
background: #1f6fd6;
|
|
color: #fff;
|
|
font-size: 26px;
|
|
cursor: pointer;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
|
|
}
|
|
.card {
|
|
background: #fff;
|
|
border-radius: 16px;
|
|
padding: 32px;
|
|
max-width: 420px;
|
|
width: 100%;
|
|
box-shadow: 0 4px 24px rgba(0,0,0,0.08);
|
|
}
|
|
h1 { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; }
|
|
.meta { font-size: 0.875rem; color: #6b7280; margin-bottom: 24px; }
|
|
dl { display: grid; gap: 12px; }
|
|
dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: #9ca3af; }
|
|
dd { font-size: 1.125rem; font-weight: 600; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<button class="kiosk-menu-btn" id="kioskMenuButton" title="Меню">☰</button>
|
|
<div class="card">
|
|
<h1>{{ component_name }}</h1>
|
|
<p class="meta">Обновлено: {{ last_update }}</p>
|
|
<dl>
|
|
<div>
|
|
<dt>Остаток</dt>
|
|
<dd>{{ remaining_weight }} кг</dd>
|
|
</div>
|
|
<div>
|
|
<dt>Загружено</dt>
|
|
<dd>{{ current_loaded }} кг</dd>
|
|
</div>
|
|
<div>
|
|
<dt>По компоненту</dt>
|
|
<dd>{{ total_component }} кг</dd>
|
|
</div>
|
|
<div>
|
|
<dt>Смесь всего</dt>
|
|
<dd>{{ total_mixture }} кг</dd>
|
|
</div>
|
|
</dl>
|
|
</div>
|
|
<script src="/static/js/kiosk-theme.js"></script>
|
|
<script src="/static/js/kiosk-nav-menu.js"></script>
|
|
<script src="/static/js/kiosk-pairing.js"></script>
|
|
<script src="/static/js/kiosk-db-check.js"></script>
|
|
<script src="/static/js/kiosk-calibration.js"></script>
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', function () {
|
|
window.WespKioskTheme.setup({ withToggle: false });
|
|
window.WespKioskMenu.setup({ menuButtonSelector: '#kioskMenuButton' });
|
|
window.WespKioskDbCheck.setup({ menuLinkSelector: '#dbCheckLink' });
|
|
window.WespKioskCalibration.setup({ menuLinkSelector: '#calibrationLink' });
|
|
window.WespKioskPairing.setup({ menuLinkSelector: '#pairTerminalLink' });
|
|
});
|
|
</script>
|
|
<script src="/static/js/kiosk-dialog.js"></script>
|
|
<link href="/static/css/wesp-update-banner.css" rel="stylesheet">
|
|
<script src="/static/js/wesp-update-notifier.js"></script>
|
|
<script>
|
|
document.addEventListener("DOMContentLoaded", function () {
|
|
if (window.WespUpdateNotifier) {
|
|
WespUpdateNotifier.init({ dialog: window.WespKioskDialog || window.WespDialog });
|
|
}
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|