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"> <div class="card-body">
<h5 class="card-title">Special Users</h5> <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> <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"> <table class="table">
<thead> <thead>
<tr> <tr>
@ -60,7 +61,15 @@
<th>Delete</th> <th>Delete</th>
</tr> </tr>
</thead> </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> <script>
fetch('/api/users/?via-ldap=false&not-just-user=true') fetch('/api/users/?via-ldap=false&not-just-user=true')
.then(res => res.json()) .then(res => res.json())
@ -102,7 +111,6 @@
})) }))
}) })
</script> </script>
</table>
</div> </div>
</div> </div>
</div> </div>
@ -136,6 +144,22 @@
</script> </script>
</div> </div>
</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> </div>
{{end}} {{end}}
<div class="row"> <div class="row">