Speed up downloads by combining multiple network connections in parallel
TypeScript bandwidth-aggregationcross-platformdesktop-appdownloaderdownloadmanagerlinuxmacosmulticonnectionparallel-downloadswindows
Polish landing page borders, copy feedback, and demo controls (#71)
Anmol Kapile5271f43eda9
diff --git a/docs/downloads.js b/docs/downloads.jsindex bc77a18..b8503e6 100644--- a/docs/downloads.js+++ b/docs/downloads.js@@ -44,7 +44,7 @@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`.',- 'Fedora / RHEL: use the AppImage, and install FUSE 2 first with `sudo dnf install fuse-libs`.',+ '.rpm (Fedora / RHEL): `sudo dnf install ./plexo-*.rpm`.','Don’t open the AppImage with Disks (it isn’t a disk image — an “image is smaller than the target device” message means it was opened there). Make it executable and run it as above.','Using more than one network needs Linux kernel 5.7 or newer (any current distro); on older kernels Plexo can only use the default network.']@@ -77,7 +77,7 @@'appimage','AppImage' + archSuffix(arch),'Runs on any distro, no install',- arch === 'arm64' ? 2 : 0+ arch === 'arm64' ? 3 : 0)}if (/\.deb$/.test(n)) {@@ -87,7 +87,7 @@'deb','Debian / Ubuntu' + archSuffix(arch),'.deb package · Debian, Ubuntu, Mint',- arch === 'arm64' ? 3 : 1+ arch === 'arm64' ? 4 : 1)}if (/\.rpm$/.test(n)) {@@ -97,7 +97,7 @@'rpm','Fedora / RHEL' + archSuffix(arch),'.rpm package · Fedora, RHEL, openSUSE',- arch === 'arm64' ? 5 : 4+ arch === 'arm64' ? 5 : 2)}return nulldiff --git a/docs/index.html b/docs/index.htmlindex c6eaa3b..13736c5 100644--- a/docs/index.html+++ b/docs/index.html@@ -884,8 +884,28 @@</div></div><p class="demo-caption">- <button id="demo-motion" type="button" aria-pressed="false">Pause demo</button- ><span id="demo-status" class="sr-only">Downloading</span>+ <button+ id="demo-motion"+ type="button"+ aria-label="Pause demo"+ title="Pause demo"+ aria-pressed="false"+ >+ <svg+ width="20"+ height="20"+ viewBox="0 0 24 24"+ fill="currentColor"+ aria-hidden="true"+ >+ <g id="demo-pause-icon">+ <rect x="6" y="5" width="4" height="14" rx="1" />+ <rect x="14" y="5" width="4" height="14" rx="1" />+ </g>+ <path id="demo-play-icon" d="M8 5v14l11-7Z" hidden />+ </svg>+ </button>+ <span id="demo-status" class="sr-only">Downloading</span></p></section>diff --git a/docs/landing.css b/docs/landing.cssindex 8482d6e..3d16e11 100644--- a/docs/landing.css+++ b/docs/landing.css@@ -689,12 +689,23 @@ summary:focus-visible,color: #0a0a0b;}#demo-motion {- padding: 10px 14px;+ display: inline-flex;+ align-items: center;+ justify-content: center;+ width: 44px;+ padding: 0;border: 1px solid #ffffff26;border-radius: 999px;background: #ffffff08;color: #ededef;min-height: 44px;+ transition:+ background 0.2s,+ border-color 0.2s;+}+#demo-motion:hover {+ border-color: rgba(243, 103, 18, 0.45);+ background: rgba(243, 103, 18, 0.08);}.demo-caption {position: relative;@@ -941,6 +952,12 @@ summary:focus-visible,}.architecture-card:first-child {border-top: 0;+ border-top-left-radius: inherit;+ border-top-right-radius: inherit;+}+.architecture-card:last-child {+ border-bottom-left-radius: inherit;+ border-bottom-right-radius: inherit;}.architecture-card h3 {font-size: 16px;@@ -1002,18 +1019,6 @@ summary:focus-visible,line-height: 1.6;color: #a1a1a8;}-.install-help code {- display: block;- overflow-wrap: anywhere;- padding: 14px;- border: 1px solid #ffffff14;- border-radius: 12px;- background: #0a0a0b;- font:- 13px/1.6 'Geist Mono',- monospace;- color: #ededef;-}.download-fallback {color: #a1a1a8;}@@ -1278,6 +1283,10 @@ summary:focus-visible,.install-help summary:hover {background: rgba(255, 255, 255, 0.025);}+.install-help summary:focus-visible {+ border-radius: inherit;+ outline-offset: -3px;+}.install-help summary::-webkit-details-marker {display: none;}@@ -1398,7 +1407,7 @@ summary:focus-visible,}.command-row {display: flex;- align-items: center;+ align-items: stretch;margin-top: 10px;overflow: hidden;border: 1px solid rgba(255, 255, 255, 0.08);@@ -1412,13 +1421,14 @@ summary:focus-visible,overflow-x: auto;color: #ededef;font:- 13px 'Geist Mono',+ 13px/1.6 'Geist Mono',ui-monospace,monospace;white-space: nowrap;}.copy-command {flex: none;+ width: 88px;min-height: 44px;padding: 0 16px;border: 0;@@ -1426,6 +1436,22 @@ summary:focus-visible,background: transparent;color: #c8c8ce;font-size: 13px;+ transition:+ background 0.2s,+ color 0.2s;+}+.copy-command:hover {+ background: rgba(243, 103, 18, 0.08);+ color: #ff8a3d;+}+.copy-command:focus-visible {+ outline-offset: -3px;+}+.command-status:not(.sr-only) {+ margin: 8px 0 0;+ color: #ff8a3d;+ font-size: 13px;+ line-height: 1.5;}.install-fix,.dialog-fix {@@ -1621,6 +1647,7 @@ a:focus-visible {transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);}.feature-visual:hover {+ z-index: 1;border-color: rgba(243, 103, 18, 0.24) !important;box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);}diff --git a/docs/landing.js b/docs/landing.jsindex ed9d743..afdf5a9 100644--- a/docs/landing.js+++ b/docs/landing.js@@ -105,7 +105,7 @@steps: [['**AppImage:** make it executable, then run it.',- 'chmod +x Plexo-*.AppImage && ./Plexo-*.AppImage'+ 'chmod +x plexo-*.AppImage && ./plexo-*.AppImage'],['**Debian / Ubuntu:** install the .deb with apt.', 'sudo apt install ./plexo_*.deb'],['**Fedora / RHEL:** install the .rpm with dnf.', 'sudo dnf install ./plexo-*.rpm'],@@ -225,6 +225,14 @@button.setAttribute('aria-label', 'Copy command')return button}+ function appendCommand(container, command) {+ const row = element('div', 'command-row')+ row.append(element('code', '', command), copyButton(command))+ const status = element('p', 'command-status sr-only')+ status.setAttribute('role', 'status')+ status.setAttribute('aria-atomic', 'true')+ container.append(row, status)+ }function renderInstallGuideBody(os) {const guide = installGuides[os]const body = element('div', 'install-guide-body')@@ -238,9 +246,7 @@appendRichText(text, description)copy.append(text)if (command) {- const commandRow = element('div', 'command-row')- commandRow.append(element('code', '', command), copyButton(command))- copy.append(commandRow)+ appendCommand(copy, command)}item.append(copy)steps.append(item)@@ -249,9 +255,7 @@if (guide.fix) {const fix = element('div', 'install-fix')fix.append(element('p', '', guide.fix[0]))- const commandRow = element('div', 'command-row')- commandRow.append(element('code', '', guide.fix[1]), copyButton(guide.fix[1]))- fix.append(commandRow)+ appendCommand(fix, guide.fix[1])body.append(fix)}return body@@ -296,7 +300,7 @@card.append(platform, element('span'), element('span'), link)list.append(card)})- panel.append(list)+ panel.append(list, renderInstallGuide(os))})}placeholderPanels('Finding available builds…')@@ -536,17 +540,36 @@$('download-help-dismiss').addEventListener('click', () => {downloadToast.hidden = true})+ const copyStates = new WeakMap()+ async function copyCommand(button) {+ const state = copyStates.get(button) || { timer: null, request: 0 }+ copyStates.set(button, state)+ const request = ++state.request+ window.clearTimeout(state.timer)+ const status = button.closest('.command-row').nextElementSibling+ status.textContent = ''+ status.classList.add('sr-only')+ try {+ if (!navigator.clipboard?.writeText) throw new Error('Clipboard unavailable')+ await navigator.clipboard.writeText(button.dataset.copy)+ if (request !== state.request) return+ button.textContent = 'Copied'+ status.textContent = 'Command copied to clipboard.'+ state.timer = window.setTimeout(() => {+ button.textContent = 'Copy'+ status.textContent = ''+ }, 1800)+ } catch {+ if (request !== state.request) return+ button.textContent = 'Copy'+ status.classList.remove('sr-only')+ status.textContent = 'Couldn’t copy. Select the command and copy it manually.'+ }+ }document.addEventListener('click', (event) => {const copy = event.target.closest('[data-copy]')if (copy) {- const command = copy.dataset.copy- navigator.clipboard?.writeText(command).then(- () => {- copy.textContent = 'Copied'- window.setTimeout(() => (copy.textContent = 'Copy'), 1800)- },- () => {}- )+ copyCommand(copy)return}const link = event.target.closest('a')@@ -590,8 +613,12 @@Math.max(0, value - wifiHistory[index]))function updateMotionButton() {- $('demo-motion').textContent = paused ? 'Play demo' : 'Pause demo'+ const label = paused ? 'Play demo' : 'Pause demo'+ $('demo-motion').setAttribute('aria-label', label)+ $('demo-motion').title = label$('demo-motion').setAttribute('aria-pressed', String(paused))+ $('demo-pause-icon').toggleAttribute('hidden', paused)+ $('demo-play-icon').toggleAttribute('hidden', !paused)document.querySelector('.download-demo').classList.toggle('demo-paused', paused)}updateMotionButton()diff --git a/e2e/downloads.spec.ts b/e2e/downloads.spec.tsindex d00cb00..dd1b9fc 100644--- a/e2e/downloads.spec.ts+++ b/e2e/downloads.spec.ts@@ -435,7 +435,7 @@ test.describe('the download page', () => {}})- test('GitHub unreachable leaves usable links to release builds', async () => {+ test('GitHub unreachable retains release links and installation help for every OS', async () => {const { page, close } = await openPage(BROWSERS.chromeWindows, { apiStatus: 500 })try {await expect(page.locator('#release-meta')).toContainText('Couldn’t load')@@ -444,6 +444,76 @@ test.describe('the download page', () => {'href','https://github.com/anmolkapil/plexo/releases')+ for (const os of ['macOS', 'Windows', 'Linux']) {+ await page.getByRole('tab', { name: os }).click()+ const panel = page.getByRole('tabpanel', { name: os })+ await panel.locator('summary').click()+ await expect(panel.locator('.install-guide-body')).toBeVisible()+ }+ } finally {+ await close()+ }+ })++ test('copy confirmation keeps its width and resets after the most recent click', async () => {+ const { page, close } = await openPage(BROWSERS.chromeMac)+ try {+ await page.evaluate(() => {+ Object.defineProperty(navigator, 'clipboard', {+ value: {+ writeText: async (text: string) => {+ document.body.dataset.copiedCommand = text+ }+ }+ })+ })+ await page.locator('#panel-mac summary').click()+ const button = page.locator('#panel-mac .copy-command')+ const status = page.locator('#panel-mac .command-status')+ await button.click({ trial: true })+ const width = (await button.boundingBox())?.width+ await button.click()+ await expect(button).toHaveText('Copied')+ expect((await button.boundingBox())?.width).toBe(width)+ expect(await page.locator('body').getAttribute('data-copied-command')).toBe(+ await page.locator('#panel-mac code').textContent()+ )+ await expect(status).toHaveAttribute('role', 'status')+ await expect(status).toHaveText('Command copied to clipboard.')+ await page.waitForTimeout(1200)+ await button.click()+ await page.waitForTimeout(800)+ await expect(button).toHaveText('Copied')+ await expect(button).toHaveText('Copy')+ } finally {+ await close()+ }+ })++ test('failed or unavailable clipboard access offers manual copying', async () => {+ const { page, close } = await openPage(BROWSERS.chromeMac)+ try {+ await page.locator('#panel-mac summary').click()+ for (const unavailable of [false, true]) {+ await page.evaluate((missing) => {+ Object.defineProperty(navigator, 'clipboard', {+ configurable: true,+ value: missing+ ? undefined+ : {+ writeText: async () => {+ throw new Error('Clipboard access denied')+ }+ }+ })+ }, unavailable)+ await page.locator('#panel-mac .copy-command').click()+ const status = page.locator('#panel-mac .command-status')+ await expect(status).toBeVisible()+ await expect(status).not.toHaveClass(/sr-only/)+ await expect(status).toHaveText('Couldn’t copy. Select the command and copy it manually.')+ await expect(page.locator('#panel-mac .copy-command')).toHaveText('Copy')+ }} finally {await close()}diff --git a/electron-builder.yml b/electron-builder.ymlindex c41d887..152426d 100644--- a/electron-builder.yml+++ b/electron-builder.yml@@ -60,6 +60,8 @@ linux:arch: [x64, arm64]- target: debarch: [x64, arm64]+ - target: rpm+ arch: [x64, arm64]maintainer: electronjs.orgcategory: Utility# Offered for magnet links and .torrent files ("Open with"), not made their default.