143 lines
4 KiB
HTML
143 lines
4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="it">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Photo & Activity Manager</title>
|
|
|
|
<link rel="stylesheet" href="/css/admin.css">
|
|
|
|
<style>
|
|
#progressContainer {
|
|
width: 100%;
|
|
background: #ddd;
|
|
height: 25px;
|
|
border-radius: 5px;
|
|
margin-top: 20px;
|
|
overflow: hidden;
|
|
}
|
|
#progressBar {
|
|
height: 100%;
|
|
width: 0%;
|
|
background: #4caf50;
|
|
transition: width 0.3s linear;
|
|
}
|
|
#scanInfo {
|
|
font-family: monospace;
|
|
margin-top: 10px;
|
|
font-size: 16px;
|
|
}
|
|
#changesBox {
|
|
margin-top: 20px;
|
|
padding: 10px;
|
|
border: 1px solid #aaa;
|
|
border-radius: 5px;
|
|
background: #f7f7f7;
|
|
width: 350px;
|
|
}
|
|
|
|
/* Sezioni */
|
|
.section {
|
|
margin-top: 40px;
|
|
padding: 20px;
|
|
border: 1px solid #ccc;
|
|
border-radius: 8px;
|
|
background: #fafafa;
|
|
}
|
|
.section h2 {
|
|
margin-top: 0;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div id="app" style="padding:20px;">
|
|
|
|
<!-- =============================== -->
|
|
<!-- 📷 SEZIONE FOTO (identica alla tua) -->
|
|
<!-- =============================== -->
|
|
<div class="section">
|
|
<h2>Gestione Foto</h2>
|
|
|
|
<button id="btnScan">Scansiona Foto</button>
|
|
<button id="btnResetDB">Reset DB</button>
|
|
<button id="btnReadDBUser">Leggi DB</button>
|
|
<button id="btnDeletePhoto">Cancella Foto per ID</button>
|
|
<button id="btnFindIdIndex">Cerca ID in index.json</button>
|
|
<button id="btnToggleSoft">Toggle Soft Delete (via ID)</button>
|
|
<div id="toggleResult"></div>
|
|
|
|
<button id="btnResetDBuser">Reset DB Utente</button>
|
|
<label for="userSelect"><b>Utenti:</b></label>
|
|
<select id="userSelect" style="margin-left:10px; margin-bottom:10px;"></select>
|
|
<button id="btnSearchPhotoById">Cerca Foto (nuovo /byIds)</button>
|
|
<button id="btnBack">Torna alla galleria</button>
|
|
|
|
<div id="changesBox">
|
|
<h4>Controlla /photos/changes</h4>
|
|
<label>Since (data/ora):</label><br>
|
|
<input type="datetime-local" id="sinceInput" style="width: 100%; margin-top:5px;"><br><br>
|
|
|
|
<button id="btnShowDBChanges">Mostra cambiamenti DB</button>
|
|
<button id="btnShowHardDeleted">Mostra Hard Deleted</button>
|
|
</div>
|
|
|
|
<div id="progressContainer">
|
|
<div id="progressBar"></div>
|
|
</div>
|
|
|
|
<div id="scanInfo">
|
|
<div id="scanProgress"></div>
|
|
<div id="scanEta"></div>
|
|
</div>
|
|
|
|
<pre id="out"></pre>
|
|
</div>
|
|
|
|
<!-- =============================== -->
|
|
<!-- 🏃 SEZIONE ATTIVITÀ (nuova) -->
|
|
<!-- =============================== -->
|
|
<div class="section">
|
|
<h2>Gestione Attività</h2>
|
|
|
|
<button id="btnScanActivities">Scansiona Attività</button>
|
|
<button id="btnResetActivitiesDB">Reset DB Attività</button>
|
|
<button id="btnReadActivitiesDB">Leggi DB Attività</button>
|
|
<button id="btnDeleteActivity">Cancella Attività per ID</button>
|
|
<button id="btnToggleSoftActivity">Toggle Soft Delete Attività (via ID)</button>
|
|
|
|
|
|
<div style="margin-top:10px;">
|
|
<label><b>Utenti:</b></label>
|
|
<select id="userSelectActivities" style="margin-left:10px; margin-bottom:10px;"></select>
|
|
</div>
|
|
|
|
<button id="btnSearchActivityById">Cerca Attività (nuovo /byIds)</button>
|
|
|
|
<div id="changesBoxActivities" style="margin-top:20px;">
|
|
<h4>Controlla /activities/changes</h4>
|
|
<label>Since (data/ora):</label><br>
|
|
<input type="datetime-local" id="sinceInputActivities" style="width: 100%; margin-top:5px;"><br><br>
|
|
|
|
<button id="btnShowActivitiesChanges">Mostra cambiamenti DB</button>
|
|
<button id="btnShowActivitiesHardDeleted">Mostra Hard Deleted</button>
|
|
</div>
|
|
|
|
<pre id="outActivities"></pre>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- JS modulari -->
|
|
<script src="/js/admin/config.js"></script>
|
|
<script src="/js/admin/api.js"></script>
|
|
<script src="/js/admin/cacheSync.js"></script>
|
|
<script src="/js/admin/db.js"></script>
|
|
<script src="/js/admin/scan.js"></script>
|
|
<script src="/js/admin/ui.js"></script>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/eruda"></script>
|
|
<script>eruda.init();</script>
|
|
|
|
</body>
|
|
</html>
|