Add WikiLog page and nav link showing last 50 content changes
This commit is contained in:
@@ -141,6 +141,7 @@ const { title = 'BincioWiki', description = 'La memoria collettiva del gruppo Bi
|
||||
)}
|
||||
<div class="ml-auto shrink-0 flex items-center gap-2">
|
||||
<span id="nav-handle" class="text-xs text-zinc-500" style="display:none"></span>
|
||||
<a id="nav-wikilog" href="/log/" class="text-xs text-zinc-500 hover:text-white transition-colors px-1" style="display:none">WikiLog</a>
|
||||
<button id="nav-logout" class="text-xs text-zinc-500 hover:text-white transition-colors px-1" style="display:none">Log out</button>
|
||||
<button
|
||||
id="theme-toggle"
|
||||
@@ -172,10 +173,12 @@ const { title = 'BincioWiki', description = 'La memoria collettiva del gruppo Bi
|
||||
document.body.removeAttribute('data-auth-pending');
|
||||
const user = await r.json().catch(() => null);
|
||||
if (user) {
|
||||
const handleEl = document.getElementById('nav-handle');
|
||||
const logoutEl = document.getElementById('nav-logout');
|
||||
if (handleEl) { handleEl.textContent = '@' + user.handle; handleEl.style.display = ''; }
|
||||
if (logoutEl) logoutEl.style.display = '';
|
||||
const handleEl = document.getElementById('nav-handle');
|
||||
const wikilogEl = document.getElementById('nav-wikilog');
|
||||
const logoutEl = document.getElementById('nav-logout');
|
||||
if (handleEl) { handleEl.textContent = '@' + user.handle; handleEl.style.display = ''; }
|
||||
if (wikilogEl) wikilogEl.style.display = '';
|
||||
if (logoutEl) logoutEl.style.display = '';
|
||||
}
|
||||
})
|
||||
.catch(() => { document.body.removeAttribute('data-auth-pending'); });
|
||||
|
||||
Reference in New Issue
Block a user