Files

89 lines
6.2 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Фото — Админ-панель</title>
<link rel="stylesheet" href="admin.css">
<link rel="stylesheet" href="/admin-dark.css" disabled id="themeCss">
<script src="js/theme.js"></script>
<style>
.ph-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:14px}
.ph-card{background:var(--card);border:1px solid var(--border);border-radius:12px;overflow:hidden;display:flex;flex-direction:column;min-width:0}
.ph-card img{width:100%;aspect-ratio:4/3;object-fit:cover;display:block;cursor:zoom-in;background:var(--bg);transition:opacity .15s}
.ph-card:hover img{opacity:.9}
.ph-card .ph-body{padding:10px 12px;display:flex;flex-direction:column;gap:4px;min-width:0}
.ph-badge{align-self:flex-start;background:var(--bg);border:1px solid var(--border);color:var(--muted);border-radius:999px;padding:2px 8px;font-size:.68rem;font-weight:700}
.ph-title{font-size:.82rem;font-weight:600;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;word-break:break-word}
.ph-meta{font-size:.72rem;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ph-time{font-size:.7rem;color:var(--muted)}
.ph-link{font-size:.72rem;color:var(--accent);text-decoration:none}
.ph-link:hover{text-decoration:underline}
.ph-card.ph-broken img{filter:grayscale(1);opacity:.55;cursor:default}
.ph-broken-tag{align-self:flex-start;background:rgba(239,68,68,.12);border:1px solid rgba(239,68,68,.35);color:#ef4444;border-radius:999px;padding:2px 8px;font-size:.68rem;font-weight:700}
.ph-broken-btn{align-self:flex-start}
.ph-card{position:relative}
.ph-faces-btn{position:absolute;top:6px;right:6px;display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;padding:0;border-radius:6px;background:rgba(0,0,0,.55);color:#fff;font-size:.7rem;line-height:1;backdrop-filter:blur(2px)}
.ph-faces-btn:hover{background:rgba(0,0,0,.75)}
.ph-faces-btn svg,.ph-faces-btn i{width:14px;height:14px}
</style>
</head>
<body data-page="photos">
<div class="layout">
<div class="sidebar" id="sidebar"></div>
<div class="main">
<h2>Фото</h2>
<div class="filters">
<div><label>Поиск</label><input type="text" id="searchInput" class="search-input" placeholder="Описание, файл или имя"></div>
<div><label>Ученик</label><input type="text" id="studentFilter" list="studentFilterList" placeholder="Все / введите имя..."><datalist id="studentFilterList"></datalist></div>
<div><label>По лицам</label><select id="faceStudentFilter"><option value="">Без фильтра</option><option value="__unassigned__">Неопознанные лица</option></select></div>
<div><label>Группа</label><select id="groupFilter"><option value="">Все группы</option></select></div>
<div><label>Источник</label><select id="sourceFilter"><option value="">Все источники</option></select></div>
<div><label>С</label><input type="date" id="dateFrom"></div>
<div><label>По</label><input type="date" id="dateTo"></div>
</div>
<div class="ph-grid" id="grid"><div class="empty" style="grid-column:1/-1">Загрузка...</div></div>
<div class="pager" id="pager"></div>
</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>
<div style="display:flex;align-items:center;gap:8px">
<button type="button" class="btn-primary ghost" id="faceViewerRescanBtn" title="Распознать лица заново на текущем разрешении фото">Переиндексировать</button>
<button type="button" class="btn-primary ghost" id="faceViewerCloseBtn">Закрыть</button>
</div>
</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">
</div>
<div class="toast" id="toast"></div>
<script src="vendor/lucide.min.js"></script>
<script src="js/datetime.js"></script>
<script src="admin.js"></script>
<script src="js/photos.js"></script>
</body>
</html>