diff --git a/CHANGELOG.md b/CHANGELOG.md index 126bd5b..41fbebe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to MagicInput are documented here. The project follows [Semantic Versioning](https://semver.org). +## [Unreleased] + +### Changed + +- **Easier to tell the screens apart in the panel.** The other computer shows a look-alike picture instead of a black box: a blue Windows desktop with a taskbar, or a Mac desktop with a menu bar and Dock, with its name small at the bottom. The Mac's main screen shows its Dock, and a PC's own screens get the Windows look too. + ## [0.6.1] - 2026-10-25 ### Changed diff --git a/docs/media-src/panel-demo.html b/docs/media-src/panel-demo.html index 17dd423..58f5dff 100644 --- a/docs/media-src/panel-demo.html +++ b/docs/media-src/panel-demo.html @@ -87,6 +87,11 @@ .scr .glass { position: absolute; inset: 0; border-radius: 5px; background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(0,0,0,.05)); } .scr.main .bar { position: absolute; top: 0; left: 0; right: 0; height: 9%; min-height: 3px; border-radius: 5px 5px 0 0; background: rgba(255,255,255,.55); backdrop-filter: blur(4px); } + .scr .dock { display: none; position: absolute; left: 31%; right: 31%; bottom: 5%; height: 10%; min-height: 3px; border-radius: 3px; + background: radial-gradient(circle, rgba(255,255,255,.95) 0 34%, transparent 40%) center / 20% 100% repeat-x, rgba(255,255,255,.4); + backdrop-filter: blur(4px); } + .scr.main .dock { display: block; } + [data-os=windows] .scr .bar, [data-os=windows] .scr .dock { display: none; } .scr.movable, .peer { cursor: grab; } .scr.movable:hover, .peer:hover { box-shadow: 0 0 0 1.5px var(--accent), 0 4px 12px rgba(0,0,0,.22); } .peer { position: absolute; border-radius: 5px; color: var(--peer-text); font-size: 10px; font-weight: 600; @@ -94,6 +99,10 @@ background: linear-gradient(160deg, var(--peer-a), var(--peer-b)); box-shadow: 0 0 0 .5px var(--screen-edge), 0 4px 12px rgba(0,0,0,.25); transition: left .2s, top .2s, box-shadow .15s; } .peer .glyph { opacity: .85; } + /* A look-alike picture for the other computer, so it's clear which one it is. */ + .peer.art { background: #1f5fbf center / cover no-repeat; color: #fff; } + .peer.art .glyph { position: absolute; left: 0; right: 0; bottom: 18%; font-size: 8.5px; opacity: .95; text-shadow: 0 1px 2px rgba(0,0,0,.5); + white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; } .peer.auto { background: transparent; color: var(--muted); box-shadow: none; border: 1.5px dashed var(--faint); } .dragging { cursor: grabbing !important; transition: none !important; z-index: 3; box-shadow: 0 0 0 2px var(--accent), 0 8px 20px rgba(0,0,0,.3) !important; } /* Name bubble on hover, like the one in Displays. */ @@ -279,6 +288,26 @@

MagicInput

return { side, offset, length }; } + // Placeholder pictures for the other computer: a blue Windows-style desktop with a centered + // taskbar, or a Mac-style gradient with a menu bar. (No logos.) + const svgUrl = s => `url('data:image/svg+xml,${encodeURIComponent(s)}')`; + const PEER_ART = { + Windows: svgUrl(` + + + + + + + `), + Mac: svgUrl(` + + + + + `), + }; + const kindOf = r => /ipad/i.test(r.name) ? 'ipad' : /built-in/i.test(r.name) ? 'laptop' : 'monitor'; function drawArrange() { @@ -297,13 +326,16 @@

MagicInput

let html = screens.map((r, i) => { const movable = r.id != null && !r.main && screens.length > 1; const cls = ['scr', r.main ? 'main' : '', movable ? 'movable' : '', drag?.kind === 'screen' && drag.i === i ? 'dragging' : ''].join(' '); - const bg = walls[i] ? `;background-image:url(${walls[i]})` : ''; - return `
` + + // Windows has no wallpapers to show here, so its own screens get the Windows look too. + const bg = walls[i] ? `;background-image:url(${walls[i]})` : S.os === 'windows' ? `;background-image:${PEER_ART.Windows}` : ''; + return `
` + `
${ICON[kindOf(r)]}${esc(r.name || 'Display')}
`; }).join(''); const name = S.peer || (S.os === 'mac' ? 'PC' : 'Mac'); - const pcls = ['peer', S.placement || drag?.kind === 'peer' ? '' : 'auto', drag?.kind === 'peer' ? 'dragging' : ''].join(' '); - html += `
${esc(name)}` + + const placed = S.placement || drag?.kind === 'peer'; + const art = placed && PEER_ART[S.peer_os || (S.os === 'mac' ? 'Windows' : 'Mac')]; + const pcls = ['peer', placed ? '' : 'auto', art ? 'art' : '', drag?.kind === 'peer' ? 'dragging' : ''].join(' '); + html += `
${esc(name)}` + `
${ICON.pc}${esc(name)}${S.placement ? '' : ' · drag to pin'}
`; area.innerHTML = html; } @@ -423,7 +455,7 @@

MagicInput

controlling: params.has('controlling'), controlled: false, screens: [{ x: 0, y: 0, w: 1512, h: 982, name: 'Built-in', id: 1, main: true }, { x: 1512, y: 40, w: 1180, h: 820, name: 'iPad', id: 2, main: false }], peer_size: { w: 1707, h: 960 }, placement: { side: 'right', offset: 0, length: 960 } }); - setWallpapers({ 0: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCAxNjAgMTAwJyBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSdub25lJz48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9J2cnIHgxPScwJyB5MT0nMCcgeDI9JzEnIHkyPScxJz48c3RvcCBvZmZzZXQ9JzAnIHN0b3AtY29sb3I9JyMxZTNhOGEnLz48c3RvcCBvZmZzZXQ9Jy41NScgc3RvcC1jb2xvcj0nIzdjM2FlZCcvPjxzdG9wIG9mZnNldD0nMScgc3RvcC1jb2xvcj0nI2Y0NzJiNicvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHdpZHRoPScxNjAnIGhlaWdodD0nMTAwJyBmaWxsPSd1cmwoI2cpJy8+PGNpcmNsZSBjeD0nMTE4JyBjeT0nMzAnIHI9JzI2JyBmaWxsPSd3aGl0ZScgZmlsbC1vcGFjaXR5PScuMTgnLz48L3N2Zz4=", 1: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCAxNjAgMTAwJyBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSdub25lJz48ZGVmcz48bGluZWFyR3JhZGllbnQgaW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Cb3g9JzAgMCAxNjAgMTAwJyBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSdub25lJz48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9J2cnIHgxPScwJyB5MT0nMCcgeDI9JzEnIHkyPScxJz48c3RvcCBvZmZzZXQ9JzAnIHN0b3AtY29sb3I9JyMwZjc2NmUnLz48c3RvcCBvZmZzZXQ9Jy41NScgc3RvcC1jb2xvcj0nIzI1NjNlYicvPjxzdG9wIG9mZnNldD0nMScgc3RvcC1jb2xvcj0nI2E3OGJmYScvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHdpZHRoPScxNjAnIGhlaWdodD0nMTAwJyBmaWxsPSd1cmwoI2cpJy8+PGNpcmNsZSBjeD0nMTE4JyBjeT0nMzAnIHI9JzI2JyBmaWxsPSd3aGl0ZScgZmlsbC1vcGFjaXR5PScuMTgnLz48L3N2Zz4=" }); document.getElementById('panel').classList.add('in'); if (params.has('pairing')) document.getElementById('panel').classList.add('pairing'); }); diff --git a/docs/store/screenshot-pairing.png b/docs/store/screenshot-pairing.png index 824b30c..bd62575 100644 Binary files a/docs/store/screenshot-pairing.png and b/docs/store/screenshot-pairing.png differ diff --git a/docs/store/screenshot-panel.png b/docs/store/screenshot-panel.png index e43c205..e0a1774 100644 Binary files a/docs/store/screenshot-panel.png and b/docs/store/screenshot-panel.png differ diff --git a/images/hero-dark.png b/images/hero-dark.png index eb71c1c..15b4ceb 100644 Binary files a/images/hero-dark.png and b/images/hero-dark.png differ diff --git a/images/hero-light.png b/images/hero-light.png index 1a459d7..14266a0 100644 Binary files a/images/hero-light.png and b/images/hero-light.png differ diff --git a/images/pairing.png b/images/pairing.png index 37f23a7..0b09b35 100644 Binary files a/images/pairing.png and b/images/pairing.png differ diff --git a/src/ui.html b/src/ui.html index 94e5c03..27b2623 100644 --- a/src/ui.html +++ b/src/ui.html @@ -88,6 +88,11 @@ .scr .glass { position: absolute; inset: 0; border-radius: 5px; background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(0,0,0,.05)); } .scr.main .bar { position: absolute; top: 0; left: 0; right: 0; height: 9%; min-height: 3px; border-radius: 5px 5px 0 0; background: rgba(255,255,255,.55); backdrop-filter: blur(4px); } + .scr .dock { display: none; position: absolute; left: 31%; right: 31%; bottom: 5%; height: 10%; min-height: 3px; border-radius: 3px; + background: radial-gradient(circle, rgba(255,255,255,.95) 0 34%, transparent 40%) center / 20% 100% repeat-x, rgba(255,255,255,.4); + backdrop-filter: blur(4px); } + .scr.main .dock { display: block; } + [data-os=windows] .scr .bar, [data-os=windows] .scr .dock { display: none; } .scr.movable, .peer { cursor: grab; } .scr.movable:hover, .peer:hover { box-shadow: 0 0 0 1.5px var(--accent), 0 4px 12px rgba(0,0,0,.22); } .peer { position: absolute; border-radius: 5px; color: var(--peer-text); font-size: 10px; font-weight: 600; @@ -95,6 +100,10 @@ background: linear-gradient(160deg, var(--peer-a), var(--peer-b)); box-shadow: 0 0 0 .5px var(--screen-edge), 0 4px 12px rgba(0,0,0,.25); transition: left .2s, top .2s, box-shadow .15s; } .peer .glyph { opacity: .85; } + /* A look-alike picture for the other computer, so it's clear which one it is. */ + .peer.art { background: #1f5fbf center / cover no-repeat; color: #fff; } + .peer.art .glyph { position: absolute; left: 0; right: 0; bottom: 18%; font-size: 8.5px; opacity: .95; text-shadow: 0 1px 2px rgba(0,0,0,.5); + white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; } .peer.auto { background: transparent; color: var(--muted); box-shadow: none; border: 1.5px dashed var(--faint); } .dragging { cursor: grabbing !important; transition: none !important; z-index: 3; box-shadow: 0 0 0 2px var(--accent), 0 8px 20px rgba(0,0,0,.3) !important; } /* Name bubble on hover, like the one in Displays. */ @@ -313,6 +322,26 @@

MagicInput

return { side, offset, length }; } + // Placeholder pictures for the other computer: a blue Windows-style desktop with a centered + // taskbar, or a Mac-style gradient with a menu bar. (No logos.) + const svgUrl = s => `url('data:image/svg+xml,${encodeURIComponent(s)}')`; + const PEER_ART = { + Windows: svgUrl(` + + + + + + + `), + Mac: svgUrl(` + + + + + `), + }; + const kindOf = r => /ipad/i.test(r.name) ? 'ipad' : /built-in/i.test(r.name) ? 'laptop' : 'monitor'; function drawArrange() { @@ -331,13 +360,16 @@

MagicInput

let html = screens.map((r, i) => { const movable = r.id != null && !r.main && screens.length > 1; const cls = ['scr', r.main ? 'main' : '', movable ? 'movable' : '', drag?.kind === 'screen' && drag.i === i ? 'dragging' : ''].join(' '); - const bg = walls[i] ? `;background-image:url('${walls[i]}')` : ''; - return `
` + + // Windows has no wallpapers to show here, so its own screens get the Windows look too. + const bg = walls[i] ? `;background-image:url('${walls[i]}')` : S.os === 'windows' ? `;background-image:${PEER_ART.Windows}` : ''; + return `
` + `
${ICON[kindOf(r)]}${esc(r.name || 'Display')}
`; }).join(''); const name = S.peer || (S.os === 'mac' ? 'PC' : 'Mac'); - const pcls = ['peer', S.placement || drag?.kind === 'peer' ? '' : 'auto', drag?.kind === 'peer' ? 'dragging' : ''].join(' '); - html += `
${esc(name)}` + + const placed = S.placement || drag?.kind === 'peer'; + const art = placed && PEER_ART[S.peer_os || (S.os === 'mac' ? 'Windows' : 'Mac')]; + const pcls = ['peer', placed ? '' : 'auto', art ? 'art' : '', drag?.kind === 'peer' ? 'dragging' : ''].join(' '); + html += `
${esc(name)}` + `
${ICON.pc}${esc(name)}${S.placement ? '' : ' · drag to pin'}
`; area.innerHTML = html; }