Speed up downloads by combining multiple network connections in parallel
TypeScript bandwidth-aggregationcross-platformdesktop-appdownloaderdownloadmanagerlinuxmacosmulticonnectionparallel-downloadswindows
Download page: clear first-launch steps and a decluttered layout (#46)
Anmol Kapild334fc94d30c
diff --git a/docs/downloads.js b/docs/downloads.jsindex dcc08d0..1a38d27 100644--- a/docs/downloads.js+++ b/docs/downloads.js@@ -13,17 +13,34 @@var OS_ORDER = ['mac', 'win', 'linux']var OS_LABEL = { mac: 'macOS', win: 'Windows', linux: 'Linux' }+ // What an unsigned build makes the OS say on first launch, and the way past it: under the+ // download button for the visitor's own OS, and with every other OS's downloads.+ // `code` in backticks, **button names** in stars.+ var MAC_COMMAND = 'xattr -dr com.apple.quarantine /Applications/Plexo.app'+ var FIRST_LAUNCH = {+ mac: {+ system: 'macOS',+ warning: 'Plexo is damaged and can’t be opened',+ fix: 'It isn’t damaged, just not signed by Apple yet. Drag Plexo into **Applications**, then run this once in **Terminal** and open it again:',+ command: MAC_COMMAND,+ aside:+ 'Says it can’t verify Plexo instead? Choose **Open Anyway** in System Settings → Privacy & Security.'+ },+ win: {+ system: 'Windows',+ warning: 'Windows protected your PC',+ fix: 'The installer just isn’t code-signed yet. Click **More info**, then **Run anyway**.',+ command: null,+ aside: 'If your browser warns that the file isn’t commonly downloaded, choose **Keep** first.'+ }+ }+// Shown under each OS's downloads. `code` spans are wrapped in backticks.var NOTES = {mac: [- 'Plexo isn’t signed with an Apple Developer certificate yet, so macOS asks you to confirm the first launch: open the app once, then go to System Settings → Privacy & Security and choose Open Anyway.',- 'If macOS says the app is damaged or can’t be opened, run `xattr -dr com.apple.quarantine /Applications/Plexo.app` in Terminal and open it again.','Not sure which Mac you have? Apple menu → About This Mac: “Chip: Apple M…” is Apple silicon, “Processor: Intel…” is Intel.'],- win: [- 'The installer isn’t code-signed yet, so Windows may say “Windows protected your PC”. Choose More info, then Run anyway.',- 'One installer covers both regular (x64) and ARM PCs.'- ],+ win: ['One installer covers both regular (x64) and ARM PCs.'],linux: ['AppImage: `chmod +x plexo-*.AppImage`, then run it. Recent Ubuntu needs FUSE 2 first: `sudo apt install libfuse2t64` (older releases call it `libfuse2`) — or use the .deb, which needs nothing extra.','.deb: `sudo apt install ./plexo_*.deb`.',@@ -223,7 +240,13 @@a.recommended = a === primaryreturn a})- return { os: os, label: OS_LABEL[os], rows: rows, notes: NOTES[os] }+ return {+ os: os,+ label: OS_LABEL[os],+ rows: rows,+ notes: NOTES[os],+ firstLaunch: FIRST_LAUNCH[os] || null+ }}).filter(function (g) {return g.rows.length > 0})@@ -241,6 +264,8 @@alternates: chosen ? chosen.alternates : [],hint: chosen ? chosen.hint : null,desktop: !!desktop,+ // Only when there is a download for this visitor to open.+ firstLaunch: primary ? FIRST_LAUNCH[env.os] || null : null,empty: assets.length === 0}}@@ -267,10 +292,14 @@out.push('')})out.push(- 'Not signed yet, so macOS and Windows ask you to confirm the first launch — how, and what ' +- 'Linux needs: ' +- siteUrl +- '#downloads'+ '**macOS says Plexo is damaged?** It isn’t: Plexo isn’t signed yet. Move it to Applications, ' ++ 'run `' ++ MAC_COMMAND ++ '` in Terminal, and open it again.',+ '',+ '**Windows protected your PC?** Click More info, then Run anyway.',+ '',+ 'Step by step, and what Linux needs: ' + siteUrl + '#downloads')return out.join('\n')}diff --git a/docs/index.html b/docs/index.htmlindex a703d94..bdd1f53 100644--- a/docs/index.html+++ b/docs/index.html@@ -42,7 +42,7 @@padding: 22px 26px 80px;display: flex;flex-direction: column;- gap: 72px;+ gap: 56px;}header {display: flex;@@ -123,20 +123,6 @@max-width: 600px;text-wrap: pretty;}- .use-cases {- margin: 0;- padding: 0;- list-style: none;- display: flex;- flex-direction: column;- gap: 4px;- }- .use-cases li {- font:- 400 15px/1.6 Manrope,- sans-serif;- color: #c7cace;- }.cta-row {display: flex;align-items: center;@@ -175,13 +161,6 @@color: #5a4413;overflow-wrap: anywhere;}- .release-line {- font:- 400 11.5px/1.6 'Roboto Mono',- monospace;- color: #6f7479;- text-wrap: pretty;- }.carousel {position: relative;}@@ -253,6 +232,27 @@background: #d8a44c;}@media (max-width: 700px) {+ .wrap {+ gap: 32px;+ padding-top: 18px;+ }+ .top {+ gap: 24px;+ }+ .hero {+ gap: 18px;+ }+ h1 {+ margin-top: -4px;+ }+ .cta-meta {+ margin-top: -6px;+ }+ .downloads,+ .guides,+ .support {+ gap: 14px;+ }.carousel-btn {display: none;}@@ -348,6 +348,11 @@background: #2f3437;color: #f5f2ed;}+ /* The pre-release line after the downloads sits with them, not as its own section. */+ .groups > .asset-note:last-child {+ margin-top: -14px;+ padding: 0 4px;+ }.asset-note {padding: 14px 20px;font:@@ -355,29 +360,6 @@monospace;color: #6f7479;}- .cta-alt {- display: flex;- flex-direction: column;- gap: 5px;- font:- 500 12.5px/1.5 Manrope,- sans-serif;- color: #a9adb2;- }- .cta-alt a {- color: #d8a44c;- text-decoration: underline;- text-underline-offset: 3px;- }- .cta-alt a:hover {- color: #e8bb6d;- }- .cta-alt .hint {- font:- 400 11.5px/1.5 'Roboto Mono',- monospace;- color: #6f7479;- }.groups {display: flex;flex-direction: column;@@ -396,10 +378,6 @@letter-spacing: -0.015em;color: #f5f2ed;}- /* Guides slotted under an OS group sit below its heading, not beside it. */- .groups .guide .title {- font-size: 16px;- }.asset-table .asset-row:last-child {border-bottom: 0;}@@ -438,7 +416,8 @@.os-notes li {margin: 5px 0;}- .os-notes code {+ .os-notes code,+ .g-body code {padding: 1px 6px;border-radius: 5px;background: #23262a;@@ -448,6 +427,340 @@monospace;overflow-wrap: anywhere;}+ .first-launch {+ display: flex;+ flex-direction: column;+ gap: 10px;+ padding: 16px 18px;+ border-radius: 12px;+ border: 1px solid #4a3a22;+ background: #1f1b15;+ }+ .first-launch .fl-warning {+ display: flex;+ align-items: flex-start;+ gap: 10px;+ margin: 0;+ font:+ 600 14px/1.45 Manrope,+ sans-serif;+ color: #f5f2ed;+ }+ .first-launch .fl-warning svg {+ flex-shrink: 0;+ margin-top: 1px;+ }+ .first-launch .fl-warning .quote {+ color: #e8bb6d;+ }+ .first-launch p {+ margin: 0;+ font:+ 400 13.5px/1.6 Manrope,+ sans-serif;+ color: #a9adb2;+ text-wrap: pretty;+ }+ .first-launch strong {+ font-weight: 700;+ color: #eae7e2;+ }+ .first-launch code {+ padding: 1px 6px;+ border-radius: 5px;+ background: #23262a;+ color: #c9ccd0;+ font:+ 400 12px/1.5 'Roboto Mono',+ monospace;+ }+ .fl-command {+ display: flex;+ align-items: stretch;+ border-radius: 9px;+ border: 1px solid #33383c;+ background: #121416;+ overflow: hidden;+ }+ .first-launch .fl-command code {+ flex: 1;+ min-width: 0;+ padding: 10px 12px;+ border-radius: 0;+ background: none;+ font:+ 500 12.5px/1.5 'Roboto Mono',+ monospace;+ color: #eae7e2;+ overflow-x: auto;+ white-space: nowrap;+ }+ .fl-command button {+ flex-shrink: 0;+ padding: 0 14px;+ border: 0;+ border-left: 1px solid #33383c;+ background: #262a2d;+ color: #eae7e2;+ font:+ 600 12px/1 Manrope,+ sans-serif;+ cursor: pointer;+ }+ .fl-command button:hover {+ background: #2f3437;+ }+ .fl-command button.done {+ color: #6cc2b4;+ }+ .first-launch .fl-aside {+ font-size: 12px;+ color: #8d9196;+ }+ .os-group .first-launch {+ margin-top: 4px;+ }+ .hero p .examples {+ display: block;+ margin-top: 6px;+ color: #eae7e2;+ }+ .cta-meta {+ display: flex;+ flex-wrap: wrap;+ align-items: baseline;+ gap: 6px 18px;+ margin-top: -10px;+ font:+ 500 12.5px/1.5 Manrope,+ sans-serif;+ }+ .cta-meta #release-line {+ font:+ 400 11.5px/1.5 'Roboto Mono',+ monospace;+ color: #6f7479;+ }+ .cta-alt {+ display: contents;+ }+ .fl-details {+ border-radius: 12px;+ border: 1px solid #4a3a22;+ background: #1f1b15;+ transition:+ border-color 0.3s,+ box-shadow 0.3s;+ }+ .fl-details > summary {+ display: flex;+ align-items: flex-start;+ gap: 10px;+ padding: 12px 16px;+ list-style: none;+ cursor: pointer;+ font:+ 500 13.5px/1.5 Manrope,+ sans-serif;+ color: #c7cace;+ }+ .fl-details > summary::-webkit-details-marker {+ display: none;+ }+ .fl-details > summary svg {+ flex-shrink: 0;+ margin-top: 1px;+ }+ .fl-details > summary .how {+ margin-left: auto;+ padding-left: 12px;+ font-weight: 700;+ color: #d8a44c;+ white-space: nowrap;+ }+ .fl-details[open] > summary .how {+ color: #8d9196;+ }+ .fl-details > .first-launch {+ border: 0;+ border-top: 1px solid #3a2f1f;+ border-radius: 0 0 12px 12px;+ background: none;+ }+ /* The summary line already carries the icon. */+ .fl-details > .first-launch .fl-warning svg {+ display: none;+ }+ .fl-details.downloading {+ border-color: #d8a44c;+ box-shadow: 0 0 0 4px rgba(216, 164, 76, 0.14);+ }+ .fl-details.downloading > summary {+ font-weight: 700;+ color: #f5f2ed;+ }+ .whats-new-head {+ display: flex;+ align-items: center;+ gap: 10px;+ flex-wrap: wrap;+ padding: 0;+ border: 0;+ background: none;+ text-align: left;+ cursor: default;+ }+ .whats-new-head .count {+ display: none;+ }+ @media (max-width: 960px) {+ .whats-new-head {+ display: grid;+ grid-template-columns: minmax(0, 1fr) auto;+ align-items: center;+ gap: 4px 12px;+ cursor: pointer;+ }+ .whats-new-head .ver {+ grid-row: 2;+ }+ .whats-new-head .count {+ display: block;+ grid-column: 2;+ grid-row: 1 / span 2;+ font:+ 600 12.5px/1 Manrope,+ sans-serif;+ color: #d8a44c;+ white-space: nowrap;+ }+ .whats-new:not(.open) .changes,+ .whats-new:not(.open) .older {+ display: none;+ }+ }+ .os-tabs {+ display: flex;+ flex-wrap: wrap;+ gap: 8px;+ }+ .os-tabs button {+ padding: 9px 16px;+ border-radius: 999px;+ border: 1px solid #33383c;+ background: #1b1e20;+ color: #c7cace;+ font:+ 600 13.5px/1.2 Manrope,+ sans-serif;+ cursor: pointer;+ }+ .os-tabs button:hover {+ background: #262a2d;+ color: #f5f2ed;+ }+ .os-tabs button[aria-selected='true'] {+ border-color: #d8a44c;+ background: #d8a44c;+ color: #1b1405;+ }+ .os-tabs .yours {+ margin-left: 6px;+ font:+ 500 10px/1 'Roboto Mono',+ monospace;+ letter-spacing: 0.06em;+ opacity: 0.75;+ }+ /* With tabs, each tab already names its OS. */+ .groups.tabbed .os-group h3 {+ position: absolute;+ width: 1px;+ height: 1px;+ overflow: hidden;+ clip: rect(0 0 0 0);+ white-space: nowrap;+ }+ .guides {+ display: flex;+ flex-direction: column;+ gap: 16px;+ }+ .guide-list {+ border-radius: 13px;+ border: 1px solid #2b2f33;+ background: #1b1e20;+ overflow: hidden;+ }+ .guide-item + .guide-item {+ border-top: 1px solid #23262a;+ }+ .guide-item > summary {+ display: grid;+ grid-template-columns: minmax(0, 1fr) auto;+ column-gap: 16px;+ row-gap: 3px;+ padding: 16px 20px;+ list-style: none;+ cursor: pointer;+ }+ .guide-item > summary::-webkit-details-marker {+ display: none;+ }+ .guide-item > summary::after {+ content: '+';+ grid-column: 2;+ grid-row: 1 / span 2;+ align-self: center;+ font:+ 400 20px/1 Manrope,+ sans-serif;+ color: #8d9196;+ }+ .guide-item[open] > summary::after {+ content: '−';+ }+ .guide-item > summary:hover {+ background: #202428;+ }+ .g-title {+ font:+ 600 15px/1.35 Manrope,+ sans-serif;+ color: #f5f2ed;+ }+ .g-sub {+ font:+ 400 12.5px/1.45 Manrope,+ sans-serif;+ color: #8d9196;+ }+ .g-body {+ display: flex;+ flex-direction: column;+ gap: 12px;+ max-width: 760px;+ padding: 0 20px 20px;+ }+ .g-body p {+ margin: 0;+ font:+ 400 14px/1.6 Manrope,+ sans-serif;+ color: #a9adb2;+ }+ .fl-details > summary:focus-visible,+ .guide-item > summary:focus-visible,+ .whats-new-head:focus-visible,+ .os-tabs button:focus-visible {+ outline: 2px solid #d8a44c;+ outline-offset: 2px;+ }+ @media (prefers-reduced-motion: reduce) {+ .fl-details {+ transition: none;+ }+ }.guide {display: flex;flex-direction: column;@@ -471,6 +784,10 @@.top {grid-template-columns: minmax(0, 1fr);}+ /* Stacked, the hero spans the same width as What's new below it. */+ .hero {+ max-width: none;+ }}.card {border-radius: 13px;@@ -483,12 +800,6 @@padding: 20px 20px 18px;gap: 16px;}- .whats-new-head {- display: flex;- align-items: center;- gap: 10px;- flex-wrap: wrap;- }.whats-new-head .title {font:700 16px/1.2 Manrope,@@ -640,27 +951,6 @@600 12.5px/1.4 Manrope,sans-serif;}- .poll-nudge {- align-self: flex-start;- display: inline-flex;- align-items: center;- gap: 9px;- padding: 8px 14px;- border-radius: 999px;- border: 1px solid #2b2f33;- background: #1b1e20;- font:- 500 12.5px/1.3 Manrope,- sans-serif;- color: #c7cace;- }- .poll-nudge:hover {- border-color: #4a3a22;- color: #f5f2ed;- }- .poll-nudge .arrow {- color: #d8a44c;- }.poll-dialog {width: min(440px, calc(100% - 32px));padding: 0;@@ -1029,13 +1319,12 @@<section class="hero"><div class="eyebrow">DOWNLOAD MANAGER · MULTI-LINK</div><h1>One download.<br />Every network.</h1>- <p>Plexo combines all your available internet connections to download files faster.</p>- <ul class="use-cases">- <li>Wi-Fi + Ethernet.</li>- <li>Two tethered phones.</li>- <li>Wi-Fi, Ethernet, and a tethered phone.</li>- <li>Whatever your computer can connect to.</li>- </ul>+ <p>+ Plexo combines all your available internet connections to download files faster.+ <span class="examples"+ >Wi-Fi, Ethernet, tethered phones, any mix your computer has.</span+ >+ </p><div class="cta-row"><a@@ -1061,22 +1350,27 @@<span class="meta" id="primary-meta">Loading latest release…</span></span></a>+ </div>+ <div class="cta-meta">+ <span id="release-line">Checking GitHub for the latest release…</span>+ <span class="cta-alt" id="cta-alt"></span><a href="#downloads">All downloads</a></div>- <div class="cta-alt" id="cta-alt"></div>- <div class="release-line" id="release-line">Checking GitHub for the latest release…</div>- <a class="poll-nudge" id="poll-nudge" href="#support">- <span class="live-dot"></span>- Quick poll: help decide how Plexo is funded- <span class="arrow">↓</span>- </a>+ <div id="first-launch-slot"></div></section><aside class="card whats-new" id="whats-new" aria-labelledby="whats-new-title">- <div class="whats-new-head">- <div class="title" id="whats-new-title">What’s new</div>- <div class="ver" id="whats-new-ver"></div>- </div>+ <button+ type="button"+ class="whats-new-head"+ id="whats-new-toggle"+ aria-expanded="false"+ aria-controls="changes"+ >+ <span class="title" id="whats-new-title">What’s new</span>+ <span class="ver" id="whats-new-ver"></span>+ <span class="count" id="whats-new-count"></span>+ </button><ul class="changes" id="changes"></ul><div class="older"><div class="label" id="older-label" hidden>EARLIER VERSIONS</div>@@ -1143,79 +1437,90 @@</div></section>- <section class="guide" id="multiple-connections">- <div class="downloads-head">- <div class="title">Use separate connections</div>- </div>- <p>- Plexo is faster only when each network has its own Internet line, like home Wi-Fi plus a- phone on USB tethering. Two connections to the same router share one line, so they won't- add speed.- </p>- <p>- <a href="https://github.com/anmolkapil/plexo#combining-multiple-network-connections"- >Full guide on GitHub →</a- >- </p>- </section>-<section class="downloads" id="downloads"><div class="downloads-head"><div class="title">All downloads</div><div class="source" id="asset-source">PUBLISHED ON GITHUB RELEASES</div></div>+ <div class="os-tabs" id="os-tabs" role="tablist" aria-label="Operating system" hidden></div><div class="groups" id="asset-groups"><div class="asset-note">Loading releases…</div></div></section>- <section class="guide" id="mac-tethering">+ <section class="guides" id="guides"><div class="downloads-head">- <div class="title">USB tethering on macOS</div>+ <div class="title">Setup guides</div></div>- <p>- Macs don't recognize an Android phone's USB tethering out of the box — you'll need a free- helper app called <a href="https://github.com/XiaoMiku01/TetherKit">TetherKit</a>- first.- </p>- <ol class="os-notes">- <li>- Install TetherKit: open Terminal and run- <code>brew install XiaoMiku01/tap/tetherkit</code>- </li>- <li>Connect your Android phone to your Mac with a USB cable.</li>- <li>- On your phone: Settings → Network & Internet → Hotspot & tethering → turn on USB- tethering.- </li>- <li>Open Plexo — it'll pick up the connection automatically.</li>- </ol>- <p>- <a href="https://github.com/anmolkapil/plexo#using-a-usb-tethered-android-phone"- >Full guide on GitHub →</a- >- </p>- </section>+ <div class="guide-list">+ <details class="guide-item" id="multiple-connections" open>+ <summary>+ <span class="g-title">Use separate connections</span>+ <span class="g-sub">Why two networks on the same router won’t add speed</span>+ </summary>+ <div class="g-body">+ <p>+ Plexo is faster only when each network has its own Internet line, like home Wi-Fi+ plus a phone on USB tethering. Two connections to the same router share one line, so+ they won’t add speed.+ </p>+ <p>+ If two connections have addresses on the same local network (both+ <code>192.168.1.x</code>, say), your computer sends everything through one of them.+ Plexo warns you when two selected connections look like that.+ </p>+ </div>+ </details>- <section class="guide" id="windows-wifi">- <div class="downloads-head">- <div class="title">Wi-Fi keeps dropping?</div>+ <details class="guide-item" id="mac-tethering">+ <summary>+ <span class="g-title">USB tethering on macOS</span>+ <span class="g-sub">Android phones need a free helper app first</span>+ </summary>+ <div class="g-body">+ <p>+ Macs don’t recognize an Android phone’s USB tethering out of the box. Install the+ free <a href="https://github.com/XiaoMiku01/TetherKit">TetherKit</a> first.+ </p>+ <ol class="os-notes">+ <li>+ Install TetherKit: open Terminal and run+ <code>brew install XiaoMiku01/tap/tetherkit</code>+ </li>+ <li>Connect your Android phone to your Mac with a USB cable.</li>+ <li>+ On your phone: Settings → Network & Internet → Hotspot & tethering → turn on USB+ tethering.+ </li>+ <li>Open Plexo. It picks up the connection automatically.</li>+ </ol>+ </div>+ </details>++ <details class="guide-item" id="windows-wifi">+ <summary>+ <span class="g-title">Wi-Fi drops when Ethernet is plugged in</span>+ <span class="g-sub">Windows 10 and 11</span>+ </summary>+ <div class="g-body">+ <p>+ Some Windows PCs switch off Wi-Fi as soon as an Ethernet cable is connected. To stop+ that:+ </p>+ <ol class="os-notes">+ <li>Press Win + R, type <code>gpedit.msc</code>, and press Enter.</li>+ <li>+ Go to Computer Configuration → Administrative Templates → Network → Windows+ Connection Manager.+ </li>+ <li>+ Set “Minimize the number of simultaneous connections to the Internet or a Windows+ domain” to <strong>Disabled</strong>.+ </li>+ </ol>+ </div>+ </details></div>- <p>- Some Windows 10/11 PCs switch off Wi-Fi as soon as an Ethernet cable is connected. To stop- that:- </p>- <ol class="os-notes">- <li>Press Win + R, type <code>gpedit.msc</code>, and press Enter.</li>- <li>- Go to Computer Configuration → Administrative Templates → Network → Windows Connection- Manager.- </li>- <li>- Set “Minimize the number of simultaneous connections to the Internet or a Windows- domain” to <strong>Disabled</strong>.- </li>- </ol></section><section class="support" id="support">@@ -1354,6 +1659,23 @@}})()+ ;(function () {+ // On narrow screens What's new is one row until tapped.+ var aside = document.getElementById('whats-new')+ var toggle = document.getElementById('whats-new-toggle')+ toggle.addEventListener('click', function () {+ toggle.setAttribute('aria-expanded', String(aside.classList.toggle('open')))+ })++ // A link to a guide (#mac-tethering) opens it.+ function openTarget() {+ var target = location.hash && document.getElementById(location.hash.slice(1))+ if (target && target.tagName === 'DETAILS') target.open = true+ }+ window.addEventListener('hashchange', openTarget)+ openTarget()+ })()+;(function () {var REPO = 'anmolkapil/plexo'var repoUrl = 'https://github.com/' + REPO@@ -1379,6 +1701,92 @@return node}+ // Text with `code` spans and **bold** button names, built without innerHTML.+ function rich(node, text) {+ text.split('**').forEach(function (part, i) {+ if (!part) return+ node.appendChild(i % 2 ? el('strong', '', part) : withCode(el('span'), part))+ })+ return node+ }++ var WARNING_ICON =+ '<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="#e8bb6d" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z"/><path d="M12 9v4"/><path d="M12 17h.01"/></svg>'++ // How to get past the unsigned-app warning the first time Plexo opens.+ function firstLaunchBox(fl) {+ var box = el('div', 'first-launch')+ var warning = el('p', 'fl-warning')+ warning.innerHTML = WARNING_ICON // a fixed icon, not page data+ var line = el('span', '', fl.system + ' may say ')+ line.appendChild(el('span', 'quote', '“' + fl.warning + '”'))+ warning.appendChild(line)+ box.appendChild(warning)+ box.appendChild(rich(el('p'), fl.fix))+ if (fl.command) box.appendChild(commandRow(fl.command))+ if (fl.aside) box.appendChild(rich(el('p', 'fl-aside'), fl.aside))+ return box+ }++ // Folded to one line until the visitor downloads; the download button opens it.+ function firstLaunchDisclosure(fl) {+ var details = el('details', 'fl-details')+ details.id = 'first-launch'+ var summary = el('summary')+ summary.innerHTML = WARNING_ICON // a fixed icon, not page data+ var text = el(+ 'span',+ 'fl-summary',+ 'Plexo isn’t signed yet, so opening it the first time takes one extra step.'+ )+ summary.appendChild(text)+ summary.appendChild(el('span', 'how', 'See how'))+ details.appendChild(summary)+ details.appendChild(firstLaunchBox(fl))+ details.addEventListener('toggle', function () {+ summary.lastChild.textContent = details.open ? 'Hide' : 'See how'+ })+ $('primary-btn').addEventListener('click', function () {+ details.open = true+ details.classList.add('downloading')+ text.textContent = 'Downloading. Next, open Plexo the first time:'+ })+ return details+ }++ function commandRow(command) {+ var wrap = el('div', 'fl-command')+ var code = el('code', '', command)+ var copy = el('button', '', 'Copy')+ copy.type = 'button'+ copy.setAttribute('aria-label', 'Copy the command')+ copy.addEventListener('click', function () {+ function done() {+ copy.textContent = 'Copied'+ copy.classList.add('done')+ setTimeout(function () {+ copy.textContent = 'Copy'+ copy.classList.remove('done')+ }, 2000)+ }+ function selectIt() {+ var range = document.createRange()+ range.selectNodeContents(code)+ var sel = window.getSelection()+ sel.removeAllRanges()+ sel.addRange(range)+ }+ if (navigator.clipboard && navigator.clipboard.writeText) {+ navigator.clipboard.writeText(command).then(done, selectIt)+ } else {+ selectIt()+ }+ })+ wrap.appendChild(code)+ wrap.appendChild(copy)+ return wrap+ }+// Only Chromium browsers will say what chip this is; the rest leave it null.function environment() {var uaData = navigator.userAgentData@@ -1413,6 +1821,8 @@function fallback(failed) {$('asset-groups').textContent = ''$('cta-alt').textContent = ''+ $('first-launch-slot').textContent = ''+ $('os-tabs').hidden = true$('asset-groups').appendChild(el('div',@@ -1445,6 +1855,7 @@groupsEl.textContent = ''alt.textContent = ''+ $('first-launch-slot').textContent = ''if (!release || model.empty) return fallback()@@ -1458,11 +1869,7 @@: ''versionEl.textContent = 'PLEXO · ' + versionsourceEl.textContent = REPO.toUpperCase() + ' · ' + version.toUpperCase()- releaseLine.textContent =- version +- ' · ' +- (release.prerelease ? 'pre-release' : 'stable') +- (date ? ' · ' + date : '')+ releaseLine.textContent = version + (date ? ' · ' + date : '')if (model.primary) {primaryTitle.textContent = model.primary.title@@ -1480,34 +1887,63 @@}model.alternates.forEach(function (a) {- var link = el('a', '', a.text + ' →')+ var link = el('a', '', a.text)link.href = a.asset.urlalt.appendChild(link)})- if (model.hint) alt.appendChild(el('div', 'hint', model.hint))- if (env.os === 'mac') {- var tetherAlt = el('a', '', 'Tethering an Android phone? See the USB tethering guide →')- tetherAlt.href = '#mac-tethering'- alt.appendChild(tetherAlt)+ if (model.firstLaunch) {+ $('first-launch-slot').appendChild(firstLaunchDisclosure(model.firstLaunch))}+ // One OS at a time, starting with the visitor's own.+ var tabs = $('os-tabs')+ var selected = model.groups.some(function (g) {+ return g.os === env.os+ })+ ? env.os+ : model.groups[0].os+ var panels = []+ tabs.textContent = ''+ tabs.hidden = model.groups.length < 2+ groupsEl.classList.toggle('tabbed', !tabs.hidden)+model.groups.forEach(function (g) {var section = el('section', 'os-group')+ section.id = 'os-' + g.os+ section.setAttribute('role', 'tabpanel')+ section.hidden = g.os !== selected+ var tab = el('button', '', g.label)+ tab.type = 'button'+ tab.id = 'tab-' + g.os+ tab.setAttribute('role', 'tab')+ tab.setAttribute('aria-controls', section.id)+ tab.setAttribute('aria-selected', String(g.os === selected))+ if (g.os === env.os) tab.appendChild(el('span', 'yours', 'YOURS'))+ tab.addEventListener('click', function () {+ panels.forEach(function (p) {+ p.section.hidden = p.os !== g.os+ p.tab.setAttribute('aria-selected', String(p.os === g.os))+ })+ })+ section.setAttribute('aria-labelledby', tab.id)+ tabs.appendChild(tab)+ panels.push({ os: g.os, tab: tab, section: section })section.appendChild(el('h3', '', g.label))var table = el('div', 'asset-table')g.rows.forEach(function (asset) {table.appendChild(row(asset))})section.appendChild(table)+ // The visitor's own OS already has this under the download button.+ if (g.firstLaunch && !(model.firstLaunch && g.os === env.os)) {+ section.appendChild(firstLaunchBox(g.firstLaunch))+ }var notes = el('ul', 'os-notes')g.notes.forEach(function (text) {notes.appendChild(withCode(el('li'), text))})section.appendChild(notes)groupsEl.appendChild(section)- // Slot each OS's static guide right under its group, not after every OS.- var guideSection = $({ mac: 'mac-tethering', win: 'windows-wifi' }[g.os])- if (guideSection) groupsEl.appendChild(guideSection)})if (release.prerelease) {@@ -1585,6 +2021,8 @@older.appendChild(li)})$('older-label').hidden = list.length < 2+ $('whats-new-count').textContent =+ items.length + (items.length === 1 ? ' change' : ' changes') + ' ›'}if (!D) {@@ -1698,7 +2136,6 @@}function showVoted(v) {- document.getElementById('poll-nudge').hidden = truepoll.querySelector('#poll-choices').hidden = trueresults.hidden = falseways.hidden = falsediff --git a/e2e/downloads.spec.ts b/e2e/downloads.spec.tsindex 88d45db..ecad682 100644--- a/e2e/downloads.spec.ts+++ b/e2e/downloads.spec.ts@@ -261,6 +261,7 @@ test.describe('which download is offered', () => {for (const name of NOISE) expect(text).not.toContain(name)expect(text).toContain('[Apple silicon]')expect(text).toContain('https://anmolkapil.github.io/plexo/#downloads')+ expect(text).toContain('`xattr -dr com.apple.quarantine /Applications/Plexo.app`')})})@@ -341,14 +342,22 @@ test.describe('the download page', () => {test('each OS explains its first launch, with commands set apart as code', async () => {const { page, close } = await openPage(BROWSERS.chromeWindows)try {- const notes = page.locator('.os-group').nth(0).locator('.os-notes')- await expect(notes).toContainText('Open Anyway')- await expect(notes.locator('code').first()).toHaveText(- 'xattr -dr com.apple.quarantine /Applications/Plexo.app'+ // The unsigned-app warning and the way past it, under the button for this visitor's OS...+ const hero = page.locator('#first-launch-slot .first-launch')+ await expect(hero).toHaveCount(1)+ await expect(hero.locator('.fl-warning')).toHaveText(+ 'Windows may say “Windows protected your PC”')- await expect(page.locator('.os-group').nth(1).locator('.os-notes')).toContainText(- 'Run anyway'+ await expect(hero).toContainText('Run anyway')+ // ...once: not again with their own OS's downloads, but with every other OS's.+ await expect(page.locator('.os-group').nth(1).locator('.first-launch')).toHaveCount(0)+ const mac = page.locator('.os-group').nth(0).locator('.first-launch')+ await expect(mac.locator('.fl-warning')).toContainText('Plexo is damaged and can’t be opened')+ await expect(mac.locator('.fl-command code')).toHaveText(+ 'xattr -dr com.apple.quarantine /Applications/Plexo.app')+ await expect(mac).toContainText('Open Anyway')+ await expect(page.locator('.os-group').nth(2).locator('.first-launch')).toHaveCount(0)await expect(page.locator('.os-group').nth(2).locator('.os-notes')).toContainText('libfuse2t64')