Changeset 0c2228a in Klonkt for src/views/pages/admin-users.ejs


Ignore:
Timestamp:
06/14/2026 05:10:16 PM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
7963a6e
Parents:
05a6ca0
Message:

hub: home button actually visible + delete for every user (cascade)

  • topnav: the hub-home brand used .site-title, which is display:none everywhere (the profile header carries the name). Now its own visible class .nav-hub-home -> the hub name is truly shown top-left on /user/ pages, linking to the hub home.
  • admin/users: delete button for EVERY user (except yourself), not only empty accounts. Deletion cascades (sites + posts + playlists + audio + members + comments) atomically in a transaction; god-only, not the last god, not yourself. Confirmation warns when content will be removed.

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

File:
1 edited

Legend:

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

    r05a6ca0 r0c2228a  
    7474            </form>
    7575
    76             <% if (u.id !== user.id && (u.post_count + u.site_count === 0)) { %>
     76            <% if (u.id !== user.id) { %>
     77              <% var _warn = (u.post_count + u.site_count > 0)
     78                   ? ('Dit verwijdert ook hun site + ' + u.post_count + ' post(s). ')
     79                   : ''; %>
    7780              <form method="post" action="/admin/users/<%= u.id %>/delete" class="ax-delete-form"
    78                     onsubmit="return confirm('Verwijder gebruiker <%= u.username %>?')">
     81                    onsubmit="return confirm('Gebruiker <%= u.username %> verwijderen? <%= _warn %>Dit kan niet ongedaan worden.')">
    7982                <button type="submit" class="ax-icon-btn ax-icon-btn-danger" aria-label="Verwijderen" title="Verwijderen">🗑</button>
    8083              </form>
Note: See TracChangeset for help on using the changeset viewer.