Private
Public Access
Rebuild frontend from the Claude Design handoff, DarkSingularity brand
Replaces the Phase 1 placeholder UI with a single persistent app shell (top bar + sidebar + chat pane, 860px responsive breakpoint) matching the "PWA chat system UI" design handoff: message bubbles with consecutive-run avatar/name grouping, auto-growing composer, room search, and the real DarkSingularity logo (also used to regenerate the PWA icons). The handoff didn't cover Phase 2 (private rooms, roles, invites) or browsing/joining open rooms, so those are added using the same visual language: a room info panel with role badges, invite-by-username with a pending-invites list, member management (remove/promote/demote/transfer ownership), room settings (rename/describe/delete), and separate browse-rooms/invites-inbox modals. Unread badges, last-message preview, and the typing indicator are deliberately deferred -- both need new backend features (read-tracking, a WS typing event) that weren't in scope this pass. Two small backend additions round out data the new UI needs but the API didn't expose: MessageRead.username (historic messages had no sender name) and InviteRead.target_username / MyInviteRead.room_name+invited_by_username (a recipient's invite list can't otherwise resolve a room they're not in). Both are additive; 35 backend tests still pass. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,184 @@
|
||||
.modal-scrim {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(7, 8, 15, 0.7);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 40;
|
||||
padding: var(--sp-4);
|
||||
}
|
||||
|
||||
.modal {
|
||||
width: min(380px, 100%);
|
||||
max-height: 80vh;
|
||||
overflow-y: auto;
|
||||
background: var(--ds-surface);
|
||||
border: 1px solid var(--ds-border);
|
||||
border-radius: var(--radius);
|
||||
padding: var(--sp-6);
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: var(--sp-4);
|
||||
}
|
||||
|
||||
.modal-header h2 {
|
||||
font-weight: 700;
|
||||
font-size: 1rem;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.modal-close {
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: var(--ds-muted);
|
||||
cursor: pointer;
|
||||
font-size: 1.1rem;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.modal-field-label {
|
||||
font-size: 0.78rem;
|
||||
color: var(--ds-muted);
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.modal input[type='text'],
|
||||
.modal textarea {
|
||||
width: 100%;
|
||||
background: var(--ds-surface-2);
|
||||
border: 1px solid var(--ds-border);
|
||||
border-radius: var(--radius);
|
||||
padding: 9px 10px;
|
||||
color: var(--ds-text);
|
||||
font-family: var(--sans);
|
||||
font-size: 0.88rem;
|
||||
outline: none;
|
||||
margin-bottom: var(--sp-4);
|
||||
}
|
||||
|
||||
.modal input[type='text']:focus,
|
||||
.modal textarea:focus {
|
||||
border-color: var(--ds-accent);
|
||||
}
|
||||
|
||||
.modal-actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: var(--sp-2);
|
||||
}
|
||||
|
||||
.modal-error {
|
||||
color: var(--ds-danger);
|
||||
font-size: 0.82rem;
|
||||
margin: -8px 0 var(--sp-3);
|
||||
}
|
||||
|
||||
.toggle-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: var(--sp-3);
|
||||
margin-bottom: var(--sp-4);
|
||||
}
|
||||
|
||||
.toggle-row .toggle-label {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.toggle-row .toggle-label .t {
|
||||
font-size: 0.86rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.toggle-row .toggle-label .d {
|
||||
font-size: 0.74rem;
|
||||
color: var(--ds-muted);
|
||||
}
|
||||
|
||||
.switch {
|
||||
position: relative;
|
||||
width: 38px;
|
||||
height: 22px;
|
||||
flex: none;
|
||||
}
|
||||
|
||||
.switch input {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
opacity: 0;
|
||||
margin: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.switch .track {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: var(--ds-border);
|
||||
border-radius: var(--radius-pill);
|
||||
transition: background 0.15s ease;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.switch .track::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
left: 2px;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
border-radius: var(--radius-pill);
|
||||
background: var(--ds-text);
|
||||
transition: transform 0.15s ease;
|
||||
}
|
||||
|
||||
.switch input:checked + .track {
|
||||
background: var(--ds-accent);
|
||||
}
|
||||
|
||||
.switch input:checked + .track::after {
|
||||
transform: translateX(16px);
|
||||
background: var(--ds-void);
|
||||
}
|
||||
|
||||
.modal-empty {
|
||||
color: var(--ds-muted);
|
||||
font-size: 0.86rem;
|
||||
padding: var(--sp-4) 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.modal-list-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--sp-3);
|
||||
padding: var(--sp-2) 0;
|
||||
border-bottom: 1px solid var(--ds-border);
|
||||
}
|
||||
|
||||
.modal-list-row:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.modal-list-row-body {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.modal-list-row-title {
|
||||
font-weight: 600;
|
||||
font-size: 0.88rem;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.modal-list-row-sub {
|
||||
font-size: 0.76rem;
|
||||
color: var(--ds-muted);
|
||||
}
|
||||
Reference in New Issue
Block a user