Changelog: Build-Zeitpunkt als Timestamp, Benutzer ausblenden Toggle
This commit is contained in:
@@ -1259,7 +1259,7 @@ function ChangelogModal({ user, toast, onClose }) {
|
||||
</div>
|
||||
<div style={{display:'flex',alignItems:'center',gap:6,flexShrink:0}}>
|
||||
<span style={{color:'rgba(255,255,255,0.2)',fontFamily:'monospace',fontSize:9}}>
|
||||
{fmtDate(e.created_at)}
|
||||
{typeof __BUILD_TIME__ !== 'undefined' && __BUILD_TIME__ ? __BUILD_TIME__ : fmtDate(e.created_at)}
|
||||
</span>
|
||||
{isAdmin && (
|
||||
<button onClick={()=>del(e.id)}
|
||||
@@ -1681,6 +1681,15 @@ function UserManagement({ toast }) {
|
||||
borderRadius:4, padding:'1px 6px',
|
||||
}}>🔔 Push</span>
|
||||
)}
|
||||
{!!u.hidden && (
|
||||
<span title="Für andere Benutzer unsichtbar" style={{
|
||||
marginLeft:4, fontSize:9, fontFamily:'monospace',
|
||||
color:'rgba(255,230,109,0.7)',
|
||||
background:'rgba(255,230,109,0.08)',
|
||||
border:'1px solid rgba(255,230,109,0.2)',
|
||||
borderRadius:4, padding:'1px 6px',
|
||||
}}>👁 versteckt</span>
|
||||
)}
|
||||
{u.last_active_at && (
|
||||
<span style={{
|
||||
marginLeft:6, fontSize:9, fontFamily:'monospace',
|
||||
@@ -1701,6 +1710,20 @@ function UserManagement({ toast }) {
|
||||
<div style={{display:'flex',gap:5}}>
|
||||
<button onClick={()=>{setResetId(u.id);setResetPw('');}}
|
||||
style={{...S.btn('#ffe66d',true),fontSize:10}}>🔑 PW</button>
|
||||
<button
|
||||
onClick={async ()=>{
|
||||
try {
|
||||
const r = await api(`/admin/users/${u.id}/hidden`,{method:'PUT'});
|
||||
setUsers(p=>p.map(x=>x.id===u.id?{...x,hidden:r.hidden}:x));
|
||||
toast(r.hidden ? 'Benutzer ausgeblendet' : 'Benutzer wieder sichtbar');
|
||||
} catch(e){ toast(e.message,'error'); }
|
||||
}}
|
||||
title={u.hidden ? 'Für andere Benutzer unsichtbar – klicken zum Einblenden' : 'Für andere Benutzer sichtbar – klicken zum Ausblenden'}
|
||||
style={{...S.btn(u.hidden?'#ffe66d':'rgba(255,255,255,0.3)',true),fontSize:10,
|
||||
opacity: u.role==='admin'?0.4:1,
|
||||
cursor: u.role==='admin'?'not-allowed':'pointer'}}>
|
||||
{u.hidden ? '👁 einblenden' : '👁 ausblenden'}
|
||||
</button>
|
||||
<button onClick={()=>del(u.id)} style={{...S.btn('#ff6b9d',true)}}>
|
||||
<TrashIcon size={13} color="#ff6b9d"/>
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user