Fix web UI messaging, alias resolution, and onboarding
Messaging: - Append \n to WS IPC sends so bufio.Scanner fires (messages from web were silently dropped — the line scanner never saw a newline) - Handle session_ready in web store to update peer aliases after hello Alias resolution: - Seed AddPeer alias from SQLite cache so returning peers resolve immediately, before hello exchange completes - Remove stale SavePeer call from AddPeer (was writing placeholder IDs) - Add PeerAlias() point-lookup to store Onboarding redesign: - Three-state UI: disconnected (daemon instructions), connecting, connected-no-network (join form) - Read ?n= / ?network= / ?anchor= / ?invite=waste:... URL params to pre-fill the join form for invite links - Show daemon alias + peer ID before any network is joined (master_alias + master_id now included in state_snapshot) - Identity backup: export (passphrase-protected yaw-key-backup-1 JSON, download button) and restore (paste + passphrase verify) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -20,11 +20,31 @@ input { background: var(--surface); color: var(--text); border: 1px solid var(--
|
||||
input:focus { border-color: var(--accent); }
|
||||
|
||||
/* ── onboarding ── */
|
||||
.onboarding { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 16px; }
|
||||
.onboarding h1 { font-size: 2rem; letter-spacing: 0.1em; color: var(--accent); }
|
||||
.onboarding .status { color: var(--muted); }
|
||||
.join-form { display: flex; gap: 8px; }
|
||||
.join-form input { width: 220px; }
|
||||
.onboarding { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 12px; max-width: 380px; margin: 0 auto; padding: 2rem; }
|
||||
.onboarding h1 { font-size: 2rem; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 4px; }
|
||||
.onboarding .status { color: var(--muted); font-size: 13px; }
|
||||
.onboarding .status.connecting { color: var(--accent); }
|
||||
.onboarding .status.disconnected { color: #e06060; }
|
||||
.onboarding-identity { text-align: center; }
|
||||
.onboarding-identity .alias { display: block; font-size: 1.1rem; font-weight: 600; }
|
||||
.onboarding-identity .peer-id { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
|
||||
.onboarding-hint { color: var(--muted); font-size: 12px; text-align: center; }
|
||||
.onboarding-hint.muted { color: var(--muted); }
|
||||
.onboarding-code { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 8px 12px; font-size: 12px; font-family: monospace; color: var(--text); width: 100%; text-align: left; }
|
||||
.onboarding-section { width: 100%; border-top: 1px solid var(--border); padding-top: 12px; }
|
||||
.join-form { display: flex; flex-direction: column; gap: 8px; width: 100%; }
|
||||
.join-form input { width: 100%; }
|
||||
.join-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
|
||||
button.primary { background: var(--accent); width: 100%; padding: 8px; font-size: 14px; }
|
||||
.toggle-link { background: none; color: var(--muted); font-size: 12px; padding: 4px 0; text-align: left; }
|
||||
.toggle-link:hover { color: var(--text); }
|
||||
.backup-panel { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
|
||||
.backup-form { display: flex; flex-direction: column; gap: 6px; }
|
||||
.backup-form textarea { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 4px; padding: 6px 8px; font-size: 11px; resize: vertical; }
|
||||
.export-result { display: flex; flex-direction: column; gap: 6px; }
|
||||
.export-result textarea { font-size: 10px; }
|
||||
.mono { font-family: monospace; }
|
||||
details summary { color: var(--muted); font-size: 12px; cursor: pointer; }
|
||||
|
||||
/* ── chat layout ── */
|
||||
.chat-layout { display: grid; grid-template-columns: var(--sidebar-w) 1fr var(--peerlist-w); height: 100%; }
|
||||
|
||||
Reference in New Issue
Block a user