Skip to content

feat: one-click update install + connection button icons#48

Merged
DGINXREAL merged 2 commits into
mainfrom
feat/some-adjustments
Jul 22, 2026
Merged

feat: one-click update install + connection button icons#48
DGINXREAL merged 2 commits into
mainfrom
feat/some-adjustments

Conversation

@DGINXREAL

@DGINXREAL DGINXREAL commented Jul 22, 2026

Copy link
Copy Markdown
Member

Summary

Two changes on this branch:

1. One-click update install (Settings)

The update checker gains a "Download & install" button. It downloads the release asset matching the current platform and architecture (.dmg/.exe/.deb) and opens the installer via shell.openPath. The existing browser "Download" link stays as a fallback (Linux without a matching package, unknown platforms).

  • checkForUpdate: parses the GitHub release assets[], new pure function pickInstallerAsset(platform, arch), exposes the chosen installer on UpdateInfo
  • downloadInstaller: streams the asset into the downloads directory with a host allowlist (github.com / *.githubusercontent.com, https only) and filename sanitizing against path traversal
  • new downloadUpdate IPC channel (preload → register → main)
  • useDownloadUpdate hook + install button with pending/success/error states
  • i18n keys in all 6 locales

2. Import/export button icons (Connections)

FiDownload (import) and FiUpload (export all) for consistent button styling.

Notes

  • macOS + Windows + Linux with a matching package only: the direct installer is only offered when a matching asset exists; otherwise the browser fallback applies.
  • Windows/Squirrel: the setup installer may require the app to be closed — an automatic "quit app after opening" was intentionally left out.
  • The real download flow can only be tested against an actual GitHub release (not in npm start).

Verification

  • tsc --noEmit clean
  • 546/546 tests passing (incl. new tests for the picker, host allowlist, download streaming, button flow)
  • Lint: 0 errors

Daniel Elskamp added 2 commits July 22, 2026 20:49
Adds a "Download & install" button to the update checker that fetches
the platform/arch-matching release asset (.dmg/.exe/.deb) and opens the
installer via shell.openPath. The existing browser download link stays
as a fallback for Linux without a matching package and unknown platforms.

- checkForUpdate: parse GitHub release assets, pickInstallerAsset(platform,arch),
  expose the chosen installer on UpdateInfo
- downloadInstaller: stream asset to the downloads dir with a GitHub host
  allowlist (github.com / *.githubusercontent.com, https only) and filename
  sanitizing
- new downloadUpdate IPC channel wired through preload/register/main
- useDownloadUpdate hook + Settings install button with pending/success/error states
- i18n keys in all 6 locales; unit tests for picker, host allowlist, download
  streaming, and the button flow
@DGINXREAL
DGINXREAL force-pushed the feat/some-adjustments branch from 114d85c to a1f6b06 Compare July 22, 2026 18:50
@DGINXREAL
DGINXREAL merged commit 4846013 into main Jul 22, 2026
1 check passed
@DGINXREAL
DGINXREAL deleted the feat/some-adjustments branch July 22, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant