faces: редизайн «Сканера лиц» и просмотр/привязка лиц из карточки ученика

- faces.html/faces.js: KPI-карточки, сворачиваемые блоки очереди и ошибок, индикатор сервиса face-id, действия с иконками, колонка «Не проверено»
- students.html/students.js: собственные модалки #faceViewerModal/#faceAssignModal, открытие вьюера по похожему лицу, общий studentThumbSrc()
- server.js: GET /api/students/:id/face-photos отдаёт photo_id (сырой photo_faces.source_id)
- AGENTS.md: описание вьюера лиц в карточке ученика
This commit is contained in:
dev
2026-10-11 13:45:58 +03:00
parent 1304d9e2b4
commit d891db5c2d
6 changed files with 424 additions and 125 deletions
+25
View File
@@ -289,6 +289,31 @@
</div>
</div>
<div class="modal-overlay" id="faceViewerModal">
<div class="edit-modal" style="max-width:1000px;width:96%;max-height:94dvh">
<div style="display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px">
<h3 style="font-size:1.05rem;font-weight:600">Распознанные лица</h3>
<button type="button" class="btn-primary ghost" id="faceViewerCloseBtn">Закрыть</button>
</div>
<div id="faceViewerWarn" hidden style="margin-bottom:10px;padding:8px 10px;border-radius:8px;background:rgba(245,158,11,.14);border:1px solid rgba(245,158,11,.5);font-size:.84rem;color:#f59e0b"></div>
<div id="faceViewerBody" style="display:flex;justify-content:center"></div>
<p class="hint" style="margin-top:10px">Синяя рамка — лицо привязано автоматически, в подписи процент сходства; «вручную» — привязано вами. Оранжевая пунктирная — похоже на известного ученика, но сходство ниже порога. Серая — не опознано. Клик по любой рамке — привязать или сменить ученика.</p>
</div>
</div>
<div class="modal-overlay" id="faceAssignModal">
<div class="edit-modal" style="max-width:460px">
<h3 style="font-size:1.05rem;font-weight:600;margin-bottom:12px">Привязать лицо к ученику</h3>
<input type="text" id="faceAssignSearch" class="settings-input" placeholder="Поиск ученика или группы..." autocomplete="off">
<p class="hint" style="margin:6px 0 0">Поиск по всем группам — на фото может быть ученик из другой группы. Сначала идут ученики группы этого ученика.</p>
<div class="attach-list" id="faceAssignList" style="margin-top:10px;max-height:44vh;overflow:auto"></div>
<div class="card-foot" style="justify-content:flex-end;gap:8px;margin-top:12px">
<button type="button" class="btn-primary ghost" id="faceUnassignBtn">Снять привязку</button>
<button type="button" class="btn-primary ghost" id="faceAssignCancelBtn">Отмена</button>
</div>
</div>
</div>
<div class="modal-overlay" id="imgModal">
<img id="imgModalSrc" alt="">
</div>