Fix: hidden-Button Farben korrigiert
This commit is contained in:
@@ -1712,17 +1712,23 @@ function UserManagement({ toast }) {
|
||||
style={{...S.btn('#ffe66d',true),fontSize:10}}>🔑 PW</button>
|
||||
<button
|
||||
onClick={async ()=>{
|
||||
if (u.role==='admin') return;
|
||||
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'}
|
||||
title={u.role==='admin'?'Admin kann nicht ausgeblendet werden':u.hidden?'Einblenden':'Ausblenden'}
|
||||
disabled={u.role==='admin'}
|
||||
style={{
|
||||
fontSize:10, fontFamily:'monospace', cursor: u.role==='admin'?'not-allowed':'pointer',
|
||||
padding:'3px 8px', borderRadius:6, border:'none',
|
||||
background: u.hidden ? 'rgba(255,230,109,0.15)' : 'rgba(255,255,255,0.08)',
|
||||
color: u.hidden ? '#ffe66d' : 'rgba(255,255,255,0.5)',
|
||||
opacity: u.role==='admin' ? 0.3 : 1,
|
||||
}}>
|
||||
{u.hidden ? '👁 einblend.' : '👁 ausblend.'}
|
||||
</button>
|
||||
<button onClick={()=>del(u.id)} style={{...S.btn('#ff6b9d',true)}}>
|
||||
<TrashIcon size={13} color="#ff6b9d"/>
|
||||
|
||||
Reference in New Issue
Block a user