Add electron

Ghost User requested to merge am-electron into master

Behavior

Electron handles downloading parity, running parity, fetching signer token:

  • on first run, there's a loading screen to show progress. In the future, we'll showing the Onboarding in parallel to this loading screen. During onboarding, we should also show the syncing progress.
  • Once downloaded (or if parity already existed on hard drive), the run Parity. That's the "Connecting to api..." part
  • When we're connected to the api, then we show the normal app.
  • On subsequent launches of the app, the "Connecting to api..." step takes ~500ms, so the app flashes a bit right now. TODO.

ezgif com-video-to-gif

Tutorials

Recommended way for development

  • yarn install and yarn start, and wait for the React page to load
  • then yarn start-electron, it will open an Electron window
  • the page inside Electron should reload when file changes (like on browser), allows fast iterations

The production way

  • yarn electron should handle everything
  • not possible to do fast iterations

The fallback way

  • Development in the browser (like before)
  • run parity --light --ws-origins all in the background
  • parity signer new-token to get a token
  • paste it, without the dashes, in line 66 of ./src/stores/ParityStore.js, replacing the line this.token.replace(/[^a-zA-Z0-9]/g, '')

Notes

  • Most electron files are copied from parity-js/shell.
  • https://github.com/maxogden/menubar not added yet, will do in next PR
  • @brianflanagan I added some data from the node below the 3 token balances, feel free to delete them when doing the UI.

Merge request reports