2026-06-22 21:57:32 +02:00
|
|
|
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
|
|
|
|
|
|
|
|
:root {
|
|
|
|
|
--bg: #0f0f13;
|
|
|
|
|
--surface: #1a1a22;
|
|
|
|
|
--border: #2a2a36;
|
|
|
|
|
--accent: #7c6af7;
|
|
|
|
|
--text: #e0e0e8;
|
|
|
|
|
--muted: #6b6b80;
|
2026-06-25 13:28:40 +02:00
|
|
|
--sidebar-w: 220px;
|
2026-06-22 21:57:32 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
html, body, #root { height: 100%; }
|
|
|
|
|
body { background: var(--bg); color: var(--text); font-family: system-ui, sans-serif; font-size: 14px; }
|
|
|
|
|
|
|
|
|
|
button { cursor: pointer; background: var(--accent); color: #fff; border: none; border-radius: 4px; padding: 4px 10px; font-size: 13px; }
|
|
|
|
|
button:disabled { opacity: 0.4; cursor: default; }
|
2026-06-25 13:28:40 +02:00
|
|
|
input { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 4px; padding: 6px 10px; font-size: 13px; outline: none; width: 100%; }
|
2026-06-22 21:57:32 +02:00
|
|
|
input:focus { border-color: var(--accent); }
|
|
|
|
|
|
|
|
|
|
/* ── onboarding ── */
|
2026-06-22 23:22:32 +02:00
|
|
|
.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-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; }
|
2026-06-25 13:28:40 +02:00
|
|
|
.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; width: 100%; }
|
2026-06-22 23:22:32 +02:00
|
|
|
.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; }
|
2026-06-22 21:57:32 +02:00
|
|
|
|
|
|
|
|
/* ── chat layout ── */
|
2026-06-25 13:28:40 +02:00
|
|
|
.chat-layout { display: grid; grid-template-columns: var(--sidebar-w) 1fr; height: 100%; }
|
2026-06-22 21:57:32 +02:00
|
|
|
|
|
|
|
|
/* ── sidebar ── */
|
2026-06-25 13:28:40 +02:00
|
|
|
.sidebar { background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; overflow-y: auto; }
|
|
|
|
|
.sidebar-identity { padding: 12px 12px 10px; border-bottom: 1px solid var(--border); }
|
|
|
|
|
.sidebar-identity .alias { display: block; font-weight: 600; font-size: 14px; }
|
|
|
|
|
.sidebar-identity .peer-id { display: block; color: var(--muted); font-size: 10px; font-family: monospace; margin-top: 2px; }
|
|
|
|
|
.sidebar-section { display: flex; flex-direction: column; padding: 8px 0; border-bottom: 1px solid var(--border); }
|
|
|
|
|
.sidebar-section:last-child { border-bottom: none; flex: 1; }
|
|
|
|
|
.sidebar-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); padding: 4px 12px 2px; }
|
Add rooms, per-network file sharing, and file transfer UX
Additional rooms:
- Store tracks customRooms per networkId; createRoom action slugifies and
deduplicates, switches active room on creation
- Sidebar: + button next to Rooms label opens an inline input; Escape
dismisses; Enter creates the room
Per-network share directories:
- Store tracks sharedFilesByNetwork keyed by networkId instead of a single
global map; setSharedFiles(files, networkId?) defaults to activeNetworkId
- FolderPicker reads per-network map to display accurate file count label
File transfer UX:
- Incoming file-offer now emits pending_offer instead of auto-accepting;
user sees Accept / Reject buttons in the sidebar Transfers section
- Progress events emitted per chunk during receive; Transfers panel shows
a live progress bar with received/total sizes
- file-cancel protocol message: sender or receiver can cancel an in-flight
transfer; DataChannel is closed and buffers discarded
- PeerConn: acceptOffer(), rejectOffer(), cancelRecv(), cancelSend()
- BrowserAdapter: acceptOffer(), rejectOffer(), cancelTransfer()
- Store: pendingOffers, fileProgress, acceptOffer, rejectOffer, cancelTransfer
- Transfers component renders in sidebar; auto-hides when no activity
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 20:49:15 +02:00
|
|
|
.sidebar-label-row { display: flex; align-items: center; justify-content: space-between; padding-right: 8px; }
|
|
|
|
|
.sidebar-label-row .sidebar-label { padding-right: 0; }
|
|
|
|
|
.sidebar-add { background: none; color: var(--muted); font-size: 14px; padding: 0 4px; line-height: 1; }
|
|
|
|
|
.sidebar-add:hover { color: var(--accent); background: none; }
|
|
|
|
|
.sidebar-new-room { padding: 2px 8px 4px; }
|
|
|
|
|
.sidebar-new-room input { font-size: 12px; padding: 4px 8px; }
|
2026-06-25 13:28:40 +02:00
|
|
|
.sidebar-item { background: none; color: var(--text); text-align: left; padding: 5px 12px; border-radius: 0; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
|
|
|
|
|
.sidebar-item:hover { background: rgba(255,255,255,0.04); }
|
2026-06-22 21:57:32 +02:00
|
|
|
.sidebar-item.active { background: var(--accent); color: #fff; }
|
2026-06-25 13:28:40 +02:00
|
|
|
.sidebar-empty { font-size: 11px; color: var(--muted); padding: 4px 12px; }
|
|
|
|
|
|
|
|
|
|
/* peer rows in sidebar */
|
|
|
|
|
.sidebar-peers { gap: 0; }
|
|
|
|
|
.peer-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
|
|
|
|
|
.peer-row { display: flex; align-items: center; gap: 6px; padding: 4px 12px; }
|
2026-06-25 19:48:28 +02:00
|
|
|
.peer-row-self { opacity: 0.7; }
|
|
|
|
|
.peer-row-you { font-size: 10px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; margin-left: 2px; flex-shrink: 0; }
|
2026-06-25 13:28:40 +02:00
|
|
|
.peer-row:hover { background: rgba(255,255,255,0.04); }
|
|
|
|
|
.peer-row:hover .peer-row-actions { opacity: 1; }
|
2026-06-25 19:51:27 +02:00
|
|
|
.peer-row-alias { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
|
|
|
.peer-row-id { font-size: 10px; color: var(--muted); font-family: monospace; flex: 1; }
|
|
|
|
|
.peer-row-actions { opacity: 0; display: flex; gap: 2px; transition: opacity 0.1s; margin-left: auto; }
|
2026-06-25 13:28:40 +02:00
|
|
|
.peer-action { background: none; color: var(--muted); font-size: 14px; padding: 1px 3px; line-height: 1; }
|
|
|
|
|
.peer-action:hover { color: var(--accent); background: none; }
|
2026-06-22 21:57:32 +02:00
|
|
|
|
|
|
|
|
/* ── message pane ── */
|
2026-06-25 13:28:40 +02:00
|
|
|
.message-pane { display: flex; flex-direction: column; height: 100%; min-width: 0; }
|
|
|
|
|
.message-pane-header { padding: 10px 16px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 13px; color: var(--text); }
|
|
|
|
|
.messages { flex: 1; overflow-y: auto; padding: 8px 0; display: flex; flex-direction: column; }
|
2026-06-25 19:47:19 +02:00
|
|
|
.message { display: flex; align-items: baseline; gap: 0; padding: 2px 16px; line-height: 1.5; }
|
2026-06-25 13:28:40 +02:00
|
|
|
.message:hover { background: rgba(255,255,255,0.02); }
|
2026-06-25 19:47:19 +02:00
|
|
|
.message-ts { color: var(--muted); font-size: 11px; white-space: nowrap; flex-shrink: 0; width: 52px; }
|
Add peer-to-peer file transfer in browser mode
Implements both pull (browse & download from a shared folder) and push
(send a file directly to a peer) using the yaw2 file protocol over WebRTC
DataChannels.
- PeerConn: handle browse/files/get/file-offer/file-accept/file-done
control messages; stream files in 64KB chunks over f:xid binary
DataChannels; auto-accept incoming offers (push and pull)
- PeerConn.sendFilePush(): initiate an outbound file transfer without
requiring the peer to browse first
- BrowserAdapter: sharedFiles map, setSharedFiles(), requestBrowse(),
requestGet(), sendFileTo() — propagates share map to all active peers
- Store: activeFilePeer, setActiveFilePeer, setSharedFiles, browseFiles,
sendFileTo; file_complete handler triggers browser download automatically
- FileBrowser component: third-column panel listing a peer's shared files
with name, size, and a download button
- FolderPicker component: webkitdirectory input in the sidebar (browser
mode only) for selecting a local folder to share
- Sidebar: 📎 send-file button on peer rows (hover) with inline file picker
- App.tsx: use browser mode when WASTE_CONFIG.signalURL is set, even on
localhost — allows testing browser mode via npm run dev with config.js
- deploy-daemon.sh: kill existing daemon before scp to avoid upload failure
when the binary is locked; remove duplicate kill block in restart step
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 20:29:54 +02:00
|
|
|
.message-alias { font-weight: 600; font-size: 13px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; width: 90px; padding-right: 10px; }
|
2026-06-22 21:57:32 +02:00
|
|
|
.message.mine .message-alias { color: var(--accent); }
|
2026-06-25 19:45:08 +02:00
|
|
|
.message-text { word-break: break-word; font-size: 14px; color: var(--text); }
|
2026-06-25 13:28:40 +02:00
|
|
|
.compose { display: flex; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--border); }
|
|
|
|
|
.compose input { flex: 1; width: auto; }
|
|
|
|
|
.compose button { flex-shrink: 0; }
|
Add peer-to-peer file transfer in browser mode
Implements both pull (browse & download from a shared folder) and push
(send a file directly to a peer) using the yaw2 file protocol over WebRTC
DataChannels.
- PeerConn: handle browse/files/get/file-offer/file-accept/file-done
control messages; stream files in 64KB chunks over f:xid binary
DataChannels; auto-accept incoming offers (push and pull)
- PeerConn.sendFilePush(): initiate an outbound file transfer without
requiring the peer to browse first
- BrowserAdapter: sharedFiles map, setSharedFiles(), requestBrowse(),
requestGet(), sendFileTo() — propagates share map to all active peers
- Store: activeFilePeer, setActiveFilePeer, setSharedFiles, browseFiles,
sendFileTo; file_complete handler triggers browser download automatically
- FileBrowser component: third-column panel listing a peer's shared files
with name, size, and a download button
- FolderPicker component: webkitdirectory input in the sidebar (browser
mode only) for selecting a local folder to share
- Sidebar: 📎 send-file button on peer rows (hover) with inline file picker
- App.tsx: use browser mode when WASTE_CONFIG.signalURL is set, even on
localhost — allows testing browser mode via npm run dev with config.js
- deploy-daemon.sh: kill existing daemon before scp to avoid upload failure
when the binary is locked; remove duplicate kill block in restart step
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 20:29:54 +02:00
|
|
|
|
Add rooms, per-network file sharing, and file transfer UX
Additional rooms:
- Store tracks customRooms per networkId; createRoom action slugifies and
deduplicates, switches active room on creation
- Sidebar: + button next to Rooms label opens an inline input; Escape
dismisses; Enter creates the room
Per-network share directories:
- Store tracks sharedFilesByNetwork keyed by networkId instead of a single
global map; setSharedFiles(files, networkId?) defaults to activeNetworkId
- FolderPicker reads per-network map to display accurate file count label
File transfer UX:
- Incoming file-offer now emits pending_offer instead of auto-accepting;
user sees Accept / Reject buttons in the sidebar Transfers section
- Progress events emitted per chunk during receive; Transfers panel shows
a live progress bar with received/total sizes
- file-cancel protocol message: sender or receiver can cancel an in-flight
transfer; DataChannel is closed and buffers discarded
- PeerConn: acceptOffer(), rejectOffer(), cancelRecv(), cancelSend()
- BrowserAdapter: acceptOffer(), rejectOffer(), cancelTransfer()
- Store: pendingOffers, fileProgress, acceptOffer, rejectOffer, cancelTransfer
- Transfers component renders in sidebar; auto-hides when no activity
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 20:49:15 +02:00
|
|
|
/* ── transfers panel (in sidebar) ── */
|
|
|
|
|
.transfer-row { display: flex; flex-direction: column; gap: 3px; padding: 6px 12px; border-bottom: 1px solid var(--border); }
|
|
|
|
|
.transfer-row:last-child { border-bottom: none; }
|
|
|
|
|
.transfer-name { font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
|
|
|
.transfer-meta { font-size: 10px; color: var(--muted); }
|
|
|
|
|
.transfer-actions { display: flex; gap: 4px; margin-top: 2px; }
|
|
|
|
|
.transfer-btn { font-size: 11px; padding: 2px 8px; }
|
|
|
|
|
.transfer-btn.accept { background: #3a7a3a; }
|
|
|
|
|
.transfer-btn.reject { background: #7a3a3a; }
|
|
|
|
|
.transfer-btn:hover { opacity: 0.85; }
|
|
|
|
|
.transfer-progress { height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; margin-top: 2px; }
|
|
|
|
|
.transfer-progress-bar { height: 100%; background: var(--accent); transition: width 0.1s; }
|
|
|
|
|
|
Add peer-to-peer file transfer in browser mode
Implements both pull (browse & download from a shared folder) and push
(send a file directly to a peer) using the yaw2 file protocol over WebRTC
DataChannels.
- PeerConn: handle browse/files/get/file-offer/file-accept/file-done
control messages; stream files in 64KB chunks over f:xid binary
DataChannels; auto-accept incoming offers (push and pull)
- PeerConn.sendFilePush(): initiate an outbound file transfer without
requiring the peer to browse first
- BrowserAdapter: sharedFiles map, setSharedFiles(), requestBrowse(),
requestGet(), sendFileTo() — propagates share map to all active peers
- Store: activeFilePeer, setActiveFilePeer, setSharedFiles, browseFiles,
sendFileTo; file_complete handler triggers browser download automatically
- FileBrowser component: third-column panel listing a peer's shared files
with name, size, and a download button
- FolderPicker component: webkitdirectory input in the sidebar (browser
mode only) for selecting a local folder to share
- Sidebar: 📎 send-file button on peer rows (hover) with inline file picker
- App.tsx: use browser mode when WASTE_CONFIG.signalURL is set, even on
localhost — allows testing browser mode via npm run dev with config.js
- deploy-daemon.sh: kill existing daemon before scp to avoid upload failure
when the binary is locked; remove duplicate kill block in restart step
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 20:29:54 +02:00
|
|
|
/* ── file browser panel ── */
|
|
|
|
|
.chat-layout.has-file-browser { grid-template-columns: var(--sidebar-w) 1fr 280px; }
|
|
|
|
|
.file-browser { display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--border); }
|
|
|
|
|
.file-browser-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--border); }
|
|
|
|
|
.file-browser-title { font-size: 13px; font-weight: 600; }
|
|
|
|
|
.file-browser-close { background: none; color: var(--muted); font-size: 14px; padding: 2px 6px; }
|
|
|
|
|
.file-browser-close:hover { color: var(--text); background: none; }
|
|
|
|
|
.file-browser-empty { padding: 16px 12px; color: var(--muted); font-size: 13px; }
|
|
|
|
|
.file-list { list-style: none; padding: 4px 0; overflow-y: auto; flex: 1; }
|
|
|
|
|
.file-entry { display: flex; align-items: center; gap: 6px; padding: 5px 12px; }
|
|
|
|
|
.file-entry:hover { background: rgba(255,255,255,0.04); }
|
|
|
|
|
.file-entry-name { flex: 1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
|
|
|
.file-entry-size { color: var(--muted); font-size: 11px; flex-shrink: 0; }
|
|
|
|
|
.file-entry-dl { background: none; color: var(--accent); font-size: 14px; padding: 1px 4px; flex-shrink: 0; }
|
|
|
|
|
.file-entry-dl:hover { background: rgba(124,106,247,0.15); }
|
|
|
|
|
|
|
|
|
|
/* ── folder picker ── */
|
|
|
|
|
.folder-picker { width: 100%; }
|
|
|
|
|
.folder-picker-btn { background: var(--surface); color: var(--muted); border: 1px solid var(--border); font-size: 12px; padding: 5px 10px; border-radius: 4px; width: 100%; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
|
|
|
.folder-picker-btn:hover { color: var(--text); border-color: var(--accent); background: var(--surface); }
|