Fix #11 and introduce presentation mode

This commit is contained in:
Lou Knauer 2022-05-02 12:00:44 +02:00
parent d67f5dd23b
commit 738028b198
2 changed files with 77 additions and 53 deletions

@ -1 +1 @@
Subproject commit e8d82a00a4215457a57735c7d7db7076daca5643
Subproject commit 348b138be943de337cfb1592f0b8fd3a2ce5a5d7

View File

@ -49,6 +49,7 @@
<div class="card-body">
<h5 class="card-title">Special Users</h5>
<p>Not created by an LDAP sync and/or having a role other than <code>user</code></p>
<div style="width: 100%; max-height: 500px; overflow-y: scroll;">
<table class="table">
<thead>
<tr>
@ -60,7 +61,15 @@
<th>Delete</th>
</tr>
</thead>
<tbody id="users-list"><tr><td colspan="4"><div class="spinner-border" role="status"><span class="visually-hidden">Loading...</span></div></td></tr></tbody>
<tbody id="users-list">
<tr>
<td colspan="4">
<div class="spinner-border" role="status"><span class="visually-hidden">Loading...</span></div>
</td>
</tr>
</tbody>
</table>
</div>
<script>
fetch('/api/users/?via-ldap=false&not-just-user=true')
.then(res => res.json())
@ -102,7 +111,6 @@
}))
})
</script>
</table>
</div>
</div>
</div>
@ -136,6 +144,22 @@
</script>
</div>
</div>
<div class="col card" style="margin: 10px;">
<div class="card-body">
<h5 class="card-title">Scramble Names / Presentation Mode</h5>
<input type="checkbox" id="scramble-names-checkbox"/>
<script>
const scrambleNamesCheckbox = document.querySelector('#scramble-names-checkbox')
scrambleNamesCheckbox.checked = window.localStorage.getItem("cc-scramble-names") != null
scrambleNamesCheckbox.addEventListener('change', () => {
if (scrambleNamesCheckbox.checked)
window.localStorage.setItem("cc-scramble-names", "true")
else
window.localStorage.removeItem("cc-scramble-names")
})
</script>
</div>
</div>
</div>
{{end}}
<div class="row">