feat: detect duplicates in csv
This commit is contained in:
+13
-4
@@ -90,7 +90,7 @@
|
||||
<div class="mt-auto pt-3" style="border-top:1px solid var(--border);">
|
||||
<div class="nav-link-custom" style="cursor:default;">
|
||||
<i class="fa-solid fa-circle-user fa-fw"></i>
|
||||
<span style="font-size:0.82rem;">Admin</span>
|
||||
<span class="nav-username" style="font-size:0.82rem;">User</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -245,12 +245,21 @@
|
||||
loadLog();
|
||||
</script>
|
||||
<script>
|
||||
(async function () {
|
||||
async function checkAuth() {
|
||||
try {
|
||||
const d = await fetch('/api/admin.php').then(r => r.json());
|
||||
const r = await fetch('/api/admin.php', { redirect: 'manual' });
|
||||
if (r.type === 'opaqueredirect' || !r.ok) { window.location.reload(); return; }
|
||||
const d = await r.json();
|
||||
document.getElementById('sandboxBanner').style.display = d.sandbox_mode ? '' : 'none';
|
||||
document.querySelectorAll('.admin-nav-link').forEach(el => el.classList.toggle('d-none', !d.is_admin));
|
||||
const name = d.name || d.username;
|
||||
if (name) {
|
||||
document.querySelectorAll('.nav-username').forEach(el => { el.textContent = name; });
|
||||
}
|
||||
} catch { }
|
||||
}());
|
||||
}
|
||||
checkAuth();
|
||||
document.addEventListener('visibilitychange', () => { if (document.visibilityState === 'visible') checkAuth(); });
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user