relay: file attachments, outbox, CC-self, chat view, mobile layout

Compose: attach files (encrypted, hex-named, linked via relay_uid),
CC-self checkbox tags copy with recipient name. Outbox section shows
sent messages with delete. Chat view: session-based threads/history/
send endpoints, split layout with sidebar, read receipts, 5s poll.
Mobile: threads as horizontal scroll bar above messages. Fix chat
input pushed offscreen by adding min-height:0 on flex container.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
thandClaude Opus 4.6 committed 2026-04-13 08:48:23 +02:00
1 parent 9f85e484c4
commit 6c0ca4373b
8 files changed
+547 -20

No files matched your search

+84
View File
@@ -232,10 +232,78 @@ label.checkbox input[type="checkbox"] { accent-color:var(--accent); cursor:point
#view-compose:not(.hidden) {
display: flex; flex-direction: column; gap: 16px;
}
.compose-attachments {
display: flex; flex-wrap: wrap; gap: 6px; min-height: 0;
}
.compose-attachments:empty { display: none; }
.compose-att {
display: flex; align-items: center; gap: 5px;
padding: 4px 10px; border-radius: var(--radius);
background: var(--raised); border: 1px solid var(--border);
font-family: var(--pixel); font-size: 9px; color: var(--text);
}
.compose-att .att-remove {
background: none; border: none; color: var(--muted); cursor: pointer;
padding: 0; font-size: 11px; line-height: 1;
transition: color 0.15s;
}
.compose-att .att-remove:hover { color: var(--danger); }
.compose-att .att-icon { font-size: 12px; color: var(--dim); }
.compose-att .att-size { color: var(--dim); }
.compose-card .actions {
display:flex; gap:8px; align-items:center;
}
.compose-card .actions .spacer { flex:1; }
/* Chat view */
.chat-layout { display: flex; height: calc(100vh - 200px); min-height: 300px; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.chat-sidebar { width: 200px; border-right: 1px solid var(--border); display: flex; flex-direction: column; background: var(--surface); }
.chat-sidebar-header { padding: 12px; border-bottom: 1px solid var(--border); }
#chat-thread-list { flex: 1; overflow-y: auto; }
.chat-thread {
display: flex; align-items: center; gap: 8px; padding: 10px 12px;
cursor: pointer; border-bottom: 1px solid var(--border); transition: background 0.1s;
}
.chat-thread:hover { background: var(--raised); }
.chat-thread.active { background: var(--raised); border-left: 3px solid var(--accent); }
.chat-thread .peer-name { font-family: var(--pixel); font-size: 10px; color: var(--bright); flex: 1; }
.chat-thread .unread-badge {
font-family: var(--pixel); font-size: 8px; background: var(--accent);
color: var(--bg); padding: 1px 6px; border-radius: 8px; min-width: 16px; text-align: center;
}
.chat-thread .thread-time { font-family: var(--pixel); font-size: 8px; color: var(--dim); }
.chat-main { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chat-header { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.chat-msg {
max-width: 75%; padding: 8px 12px; border-radius: var(--radius-lg);
font-size: 12px; line-height: 1.6; word-break: break-word;
}
.chat-msg.mine { align-self: flex-end; background: var(--accent); color: var(--bg); border-bottom-right-radius: 2px; }
.chat-msg.theirs { align-self: flex-start; background: var(--raised); color: var(--text); border: 1px solid var(--border); border-bottom-left-radius: 2px; }
.chat-msg .msg-time { font-family: var(--pixel); font-size: 8px; opacity: 0.6; margin-top: 4px; }
.chat-msg.mine .msg-time { text-align: right; }
.chat-input-bar { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }
.chat-input-bar input {
flex: 1; background: var(--bg); border: 1px solid var(--border); color: var(--bright);
padding: 8px 12px; font-size: 12px; font-family: var(--mono);
border-radius: var(--radius); outline: none;
}
.chat-input-bar input:focus { border-color: var(--accent); }
.chat-empty {
flex: 1; display: flex; flex-direction: column; align-items: center;
justify-content: center; gap: 8px; color: var(--dim);
font-family: var(--pixel); font-size: 10px;
}
.compose-status-bar {
font-family: var(--pixel); font-size: 10px; color: var(--muted);
min-height: 0; overflow: hidden;
transition: opacity 0.3s ease, max-height 0.3s ease;
max-height: 0; opacity: 0;
}
.compose-status-bar.visible { max-height: 32px; opacity: 1; padding-top: 8px; }
.compose-status-bar.ok { color: var(--accent); }
.compose-status-bar.err { color: var(--danger); }
/* Status text (used in compose, account, create-user) */
.status { font-family:var(--pixel); font-size:9px; color:var(--dim); }
@@ -564,6 +632,22 @@ header .nav-btn .ph { font-size:11px; vertical-align:-1px; margin-right:2px; }
}
#view-admin .section h2 { margin-bottom:10px; }
#view-admin .section .create-user-form { margin-top:14px; }
.chat-layout { flex-direction: column; height: calc(100vh - 160px); }
.chat-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); max-height: none; }
#chat-thread-list {
display: flex; overflow-x: auto; overflow-y: hidden; gap: 0;
scrollbar-width: none; -ms-overflow-style: none;
}
#chat-thread-list::-webkit-scrollbar { display: none; }
.chat-thread {
flex-shrink: 0; flex-direction: column; align-items: center;
gap: 2px; padding: 8px 14px; border-bottom: none; border-right: 1px solid var(--border);
min-width: 70px; text-align: center;
}
.chat-thread.active { border-left: none; border-bottom: 3px solid var(--accent); }
.chat-thread .thread-time { display: none; }
.chat-sidebar-header { display: none; }
}
/* ─────────────────────────────────────────────────────────────────