Changeset a64f642 in Klonkt for src/views


Ignore:
Timestamp:
06/14/2026 04:28:57 PM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
ab544fd
Parents:
640b39c
Message:

admin: read-only ("View mode") configurable per user in Admin -> Users

Toggle in the user list (POST /admin/users/:id/readonly, god-only, not on
yourself). Sets users.readonly on/off so an account can view everything but
cannot modify anything.

Co-Authored-By: Claude <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/pages/admin-users.ejs

    r640b39c ra64f642  
    6666            </form>
    6767
     68            <form method="post" action="/admin/users/<%= u.id %>/readonly" class="ax-role-form">
     69              <label class="ax-role ax-ro" title="Alleen-lezen: kan alles bekijken, niets wijzigen">
     70                <span>Kijk-modus</span>
     71                <input type="checkbox" name="readonly" value="1" <%= u.readonly ? 'checked' : '' %>
     72                       onchange="this.form.submit()" <% if (u.id === user.id) { %>disabled<% } %>>
     73              </label>
     74            </form>
     75
    6876            <% if (u.id !== user.id && (u.post_count + u.site_count === 0)) { %>
    6977              <form method="post" action="/admin/users/<%= u.id %>/delete" class="ax-delete-form"
     
    222230}
    223231.ax-role select:disabled { cursor: not-allowed; opacity: 0.5; }
     232.ax-ro { align-items: center; }
     233.ax-ro input { width: 18px; height: 18px; cursor: pointer; margin-top: 0.15rem; accent-color: var(--accent); }
     234.ax-ro input:disabled { cursor: not-allowed; opacity: 0.5; }
    224235.ax-delete-form { margin: 0; }
    225236.ax-icon-btn {
Note: See TracChangeset for help on using the changeset viewer.