feat(v0.4): multi-device discovery + share link (frontend)
- tabs.ts: on open, syncLiveSessions() fetches /live-sessions and adds a tab for each host session not already open → any device sees & mirrors everything running on the host. Empty storage + no live sessions → one fresh tab. activeSessionId() + openSession(id) helpers. - share.ts: 🔗 toolbar button → QR + <origin>/?join=<id> for the active session. - main.ts: ?join=<id> on load opens/focuses that shared session, then strips the param. Mount share button (toolbar: 🔍 ⚙ ▦ 🕘 ⌨ 🔗 📱). - style.css: #sharemodal reuses the QR card/backdrop. Verified in-browser: fresh device auto-discovered the host session and replayed its scrollback; two concurrent clients (browser + ws) both received live output (clientCount=2); share modal shows the join URL/QR.
This commit is contained in:
@@ -368,8 +368,9 @@ body {
|
||||
background: var(--accent-soft);
|
||||
}
|
||||
|
||||
/* QR modal */
|
||||
#qrmodal {
|
||||
/* QR + share modals */
|
||||
#qrmodal,
|
||||
#sharemodal {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 1200;
|
||||
|
||||
Reference in New Issue
Block a user