added user permissions to rooms

This commit is contained in:
2026-01-05 01:52:28 +01:00
parent 5cf034200e
commit e2345aa20a
10 changed files with 1819 additions and 165 deletions

View File

@@ -627,4 +627,227 @@ input[type=number] { -moz-appearance: textfield; }
.config-sidebar { width: 100%; flex-direction: row; }
.config-cover { width: 80px; }
.ep-control { width: auto; flex: 1; }
}
/* =========================================
PERMISSIONS & MODERATION
========================================= */
.permissions-content {
max-width: 700px;
width: 90%;
max-height: 85vh;
overflow-y: auto;
}
.permissions-list {
display: flex;
flex-direction: column;
gap: 12px;
margin-bottom: 30px;
}
.permission-card {
display: flex;
align-items: center;
gap: 16px;
padding: 16px;
background: rgba(255, 255, 255, 0.03);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 12px;
transition: all 0.2s;
}
.permission-card:hover {
background: rgba(255, 255, 255, 0.05);
border-color: rgba(255, 255, 255, 0.2);
}
.user-info-section {
display: flex;
align-items: center;
gap: 12px;
min-width: 180px;
}
.user-avatar-small {
width: 40px;
height: 40px;
border-radius: 50%;
background: var(--brand-gradient);
display: flex;
align-items: center;
justify-content: center;
font-weight: 700;
color: white;
font-size: 0.9rem;
flex-shrink: 0;
}
.user-avatar-small img {
width: 100%;
height: 100%;
border-radius: 50%;
object-fit: cover;
}
.user-details {
display: flex;
flex-direction: column;
gap: 4px;
}
.user-name-text {
font-weight: 600;
color: white;
font-size: 0.95rem;
}
.guest-badge {
font-size: 0.7rem;
background: rgba(255, 255, 255, 0.1);
color: #aaa;
padding: 2px 8px;
border-radius: 4px;
font-weight: 600;
width: fit-content;
}
.permissions-toggles {
flex: 1;
display: flex;
flex-direction: column;
gap: 10px;
}
.perm-toggle {
display: flex;
align-items: center;
gap: 10px;
cursor: pointer;
user-select: none;
}
.perm-toggle input[type="checkbox"] {
width: 18px;
height: 18px;
cursor: pointer;
accent-color: var(--brand-color);
}
.perm-label {
display: flex;
align-items: center;
gap: 8px;
font-size: 0.9rem;
color: rgba(255, 255, 255, 0.8);
transition: color 0.2s;
}
.perm-toggle:hover .perm-label {
color: white;
}
.perm-label svg {
opacity: 0.6;
}
.ban-btn {
background: rgba(239, 68, 68, 0.1);
border: 1px solid rgba(239, 68, 68, 0.3);
color: #ef4444;
padding: 8px 16px;
border-radius: 8px;
font-weight: 600;
font-size: 0.85rem;
cursor: pointer;
display: flex;
align-items: center;
gap: 6px;
transition: all 0.2s;
white-space: nowrap;
}
.ban-btn:hover {
background: rgba(239, 68, 68, 0.2);
border-color: #ef4444;
transform: translateY(-1px);
}
.banned-ips-section {
margin-top: 30px;
padding-top: 20px;
border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.section-title {
font-size: 0.9rem;
text-transform: uppercase;
letter-spacing: 1px;
color: rgba(255, 255, 255, 0.5);
margin-bottom: 12px;
font-weight: 700;
}
.banned-list {
display: flex;
flex-direction: column;
gap: 8px;
}
.banned-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 14px;
background: rgba(239, 68, 68, 0.05);
border: 1px solid rgba(239, 68, 68, 0.2);
border-radius: 8px;
}
.banned-ip {
font-family: monospace;
color: #ef4444;
font-size: 0.9rem;
}
.unban-btn {
background: transparent;
border: 1px solid rgba(74, 222, 128, 0.3);
color: #4ade80;
padding: 4px 12px;
border-radius: 6px;
font-size: 0.8rem;
font-weight: 600;
cursor: pointer;
transition: all 0.2s;
}
.unban-btn:hover {
background: rgba(74, 222, 128, 0.1);
border-color: #4ade80;
}
.empty-state {
text-align: center;
color: #666;
font-style: italic;
padding: 20px;
}
/* Responsive */
@media (max-width: 768px) {
.permission-card {
flex-direction: column;
align-items: stretch;
}
.user-info-section {
min-width: auto;
}
.ban-btn {
width: 100%;
justify-content: center;
}
}