Diff -- /var/www/vhosts/3dshawn.com/affiliate.3dshawn.com/TEMPLATES/affsoft_admin_users.html

O Operator
Diff

/var/www/vhosts/3dshawn.com/affiliate.3dshawn.com/TEMPLATES/affsoft_admin_users.html

added on local at 2026-07-11 18:38:15

Added
+53
lines
Removed
-0
lines
Context
0
unchanged
Blobs
from
to c1026b0f18e8
Restore this content →
Unified diff
Naive LCS-based line diff. Additions in emerald, deletions in rose. Both sides decompressed live from BLOB_STORE.
1<div class="page-header">
2 <div><h1>All Users</h1><p class="subtitle">Click a row to view details, or impersonate any user across the platform.</p></div>
3</div>
4<div class="card mb-2">
5 <form method="GET" action="/admin_users.cgi" style="display:flex;gap:8px">
6 <input class="input" name="q" value="$q" placeholder="Email, name, or display name...">
7 <button type="submit" class="btn btn-primary">Search</button>
8 </form>
9</div>
10<style>
11 tr.au-clickable { cursor: pointer; transition: background 0.12s; }
12 tr.au-clickable:hover { background: rgba(255,255,255,0.04); }
13 .au-av { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 12px; flex-shrink: 0; }
14 .au-imp-btn { background: #fbbf24; color: #1a1303; border: 1px solid #fbbf24; padding: 6px 12px; border-radius: 6px; font-weight: 700; font-size: 12px; cursor: pointer; }
15 .au-imp-btn:hover { background: #f59e0b; border-color: #f59e0b; }
16</style>
17<div class="card">
18[if:$has_users]
19<table class="table">
20 <thead><tr><th>Member</th><th>Email</th><th>Program</th><th>Plan</th><th>Status</th><th>Last login</th><th></th></tr></thead>
21 <tbody>
22 [loop:@users]
23 <tr class="au-clickable" data-href="/admin_user.cgi?u=$loop1.id">
24 <td><div style="display:flex;align-items:center;gap:10px"><div class="au-av" style="background:$loop1.avatar_color">$loop1.initials</div><div>$loop1.display_name [if:$loop1.is_admin_flag]<span class="badge danger">ADMIN</span>[/if]</div></div></td>
25 <td>$loop1.email</td>
26 <td>$loop1.storefront_name</td>
27 <td><span class="badge">$loop1.plan_tier</span></td>
28 <td><span class="badge">$loop1.account_status</span></td>
29 <td style="font-size:12px;color:var(--col-text-dim)"><span class="ts" data-ts="$loop1.last_login_at_epoch" data-fmt="datetime">$loop1.last_login_at</span></td>
30 <td>
31 [if:!$loop1.is_self]
32 <form method="POST" action="/admin_action.cgi" style="display:inline;margin:0" onclick="event.stopPropagation()">
33 <input type="hidden" name="act" value="impersonate">
34 <input type="hidden" name="u" value="$loop1.id">
35 <button type="submit" class="au-imp-btn">Impersonate</button>
36 </form>
37 [/if]
38 </td>
39 </tr>
40 [/loop]
41 </tbody>
42</table>
43<script>
44 document.querySelectorAll('tr.au-clickable').forEach(function(tr){
45 tr.addEventListener('click', function(e){
46 if (e.target.closest('a,button,form,input')) return;
47 window.location.href = tr.dataset.href;
48 });
49 });
50</script>
51[/if]
52[if:!$has_users]<div class="muted-empty"><h3>No users found</h3></div>[/if]
53</div>