added setting to turn off login/edits - LOGIN_AND_EDITS

This commit is contained in:
2026-04-23 06:19:45 +00:00
parent 3c70cb99a3
commit a30eb4d42d
6 changed files with 33 additions and 6 deletions
+8
View File
@@ -308,9 +308,11 @@
<i class="fas fa-right-from-bracket"></i>
</button>
{{else}}
{{if .LoginAndEdits}}
<a href="{{url "/editor/login"}}" class="text-gray-400 hover:text-white transition-colors" title="Login">
<i class="fas fa-right-to-bracket"></i>
</a>
{{end}}
{{end}}
</div>
<button id="sidebar-toggle" class="toggle-btn" title="Toggle sidebar" aria-label="Toggle sidebar">
@@ -582,6 +584,12 @@
const collapsed = localStorage.getItem('sidebarCollapsed') === 'true';
applySidebarState(collapsed);
// Check for error in query params
const urlParams = new URLSearchParams(window.location.search);
if (urlParams.get('error') === 'not_found') {
showNotification('The page does not exist', 'error', 5000);
}
// Wire toggle button
const toggleBtn = document.getElementById('sidebar-toggle');
if (toggleBtn) {