Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

Check for update at startup and inform the user if a new version is available #707

Merged
merged 8 commits into from May 26, 2016

Conversation

hiddentao
Copy link
Contributor

@hiddentao hiddentao commented May 25, 2016

When the app runs this checks the ethereum/mist Github releases list for newer release that's not in draft mode. If one is available (newer release will have a version tag > version in app's package.json) then a popup will be shown to the user informing them of this. The internal logic checks to see what you're running (Mist or Wallet) and adjusts the look and feel and text accordingly.

The popup contains a link to the specific new release's page on Github releases.

A "Check for updates..." item in the main menu (under "About") also allows the user to trigger this check at will.

@luclu
Copy link
Contributor

luclu commented May 25, 2016

works for me!
But the icon looks a bit off to the side.
Could you also add a link to the releases page?

@hiddentao
Copy link
Contributor Author

Woah, this is still a work in progress ;) Will let you all know when it's ready.

@hiddentao
Copy link
Contributor Author

hiddentao commented May 25, 2016

Ok, this is now ready for review! Here is how to test this:

Test 1: When no new version is available

  1. Start Wallet from command-line as normal
  2. You should see normal behaviour
  3. Once Wallet has started up goto Menu -> Check for Updates...
  4. This should show a popup window informing that you that it is checking for updates.
  5. After a second or so it should say that no updates were found.

Test 2: When a new version is available

  1. Edit package.json and change the version to 1.0.0
  2. Start Wallet from command-line as normal
  3. You should see the update checker popup automatically show up informing you that an update is available.
  4. If you click the link in the popup it should take you to the page for the latest release.
  5. If you close it you should be able to continue using the app as normal
  6. You can still goto Menu -> Check for Updates... at any time to check for updates.

@hiddentao hiddentao changed the title Check for update at startup and inform a user if a new version is available Check for update at startup and inform the user if a new version is available May 25, 2016
@luclu
Copy link
Contributor

luclu commented May 25, 2016

haha, guess I was to curious ;)
it works and looks good to me!
Only nothing happens when I click on the download-link.
update: thanks!

bildschirmfoto 2016-05-25 um 11 10 25

@hiddentao
Copy link
Contributor Author

Sorry about that, now fixed.

On 25 May 2016 at 17:12:53, Luca Zeug (notifications@github.com) wrote:

haha, guess I was to curious ;)
it works and looks good to me!
Only nothing happens when I click on the download-link.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub

timeout: 3000,
json: true,
})
.then((res) => {
Copy link
Contributor

@luclu luclu May 25, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link works for me!
Would it be possible to add a differentiation between Mist and Ethereum-Wallet as otherwise users will get a prompt if we release another Mist version? And vise-versa for another Etherum-Wallet.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was the intention (for the future) but I saw we haven't done a Mist version so merged them for now - maybe I'm wrong about that, is there a Mist version?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated now anyway.

@@ -20,6 +20,8 @@ const check = exports.check = function() {
switch (global.mode) {
// right now we are just releasing the wallet!
case 'mist':
str = 'mist':
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo :P

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh sorry, I meant the missing semicolon str = 'mist':

@frozeman
Copy link
Contributor

There is one released mist version.

@method (iconPath)
**/
Template.registerHelper('appIconPath', function(){
return 'file://'+ window.mist.dirname +'/icons/'+ window.mist.mode +'/icon2x.png';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this PR is containing stuff alex added a while back, or did you change thet stuff @hiddentao?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed things. I added in more global template helpers that made sense - and then removed the local equivalents from the "about" template. Because I needed the same ones in the "updateAvailable" template.

@frozeman
Copy link
Contributor

I didn't test, but looked over the code and it seems fine.

The only note i have is my first comment:
"id's are a no go :) especially if you nest it them in a class. i would simply target the image, or use a class"
If this was already there, i'm unclear why it was added.

@hiddentao
Copy link
Contributor Author

Pending issues fixed.

@alexvandesande
Copy link
Collaborator

I like how it detects Mist upgrades as well.

captura de tela 2016-05-26 as 12 18 07 pm

@alexvandesande alexvandesande merged commit 98aa070 into ethereum:develop May 26, 2016
alexvandesande pushed a commit that referenced this pull request Jun 15, 2016
* Remove old git diff tags

* updated nodes (#655)

* Upgrade code to work with Electron 1.0.1 (#651)

* Remove old git diff tags

* fix code to work with Electron 1.0.1

* Korean Translation (#645)

* Create app.kr.i18n.json

Korean Translation

* Create mist.kr.i18n.json

* Update app.kr.i18n.json

* Added mist.kr.i18n.json

Added Korean Translation

* Added Korean Translation - app.kr.i18n.json

Added Korean Translation

* Added Korean Translation -app.kr.i18n.json

Added Korean Translation

* Added Korean Translation - mist.kr.i18n.json

Added Korean Translation

* Added Korean (kr)

Added Korean (kr)

* fixed few Korean translation

fixed few Korean translation

* Update app.kr.i18n.json

* Update mist.kr.i18n.json

fixed some Korean translation

* fixed linux32 node path and binary (#665)

* Node startup and synchronization improvements (#559)

* remove commented-out code, cleanup

* work towards new socket system and ethereum nodes manager

* main: work towards finishing up node connection

* refactored node start code

* remove old ethereum nodes code

* get basic IPC connection to geth working

* rename socket to sockets

* - shift all node startup code into ethereumNode
- remove nodeConnector, shift its functionality into ethereumNode
- redo checkNodeSync to be more robust

* nodeSync needs to be able to emit events

* fixed a number of bugs, and finished sync rewrite. now need to test

* basic sync working

* slow down the sync check

* check that onboarding followed by sync works for testnet

* better log msgs, reduce socket disconnection timeout, fix bug

* sync is much more resilient now and auto-restarts if node changes

* ensure that switching network works once app is loaded

* add node 4 dep

* Fix menu items code

* improve tab resetting logic to happen before Mist crashes

* fix how we detect whether eth has started up, remove nodeConnector

* ensure can switch network type while syncing

* - Make sure it works when using Geth 1.4 (tested the Darwin x64 version).
- We now show network info in top-right of both splash screen and onboarding window

* Improved how we determine splash screen status messages. Now much more responsive to underlying connection process.

* Remove old git diff tags

* build windows management architecture, to avoid 'window already destroyed' errors

* replace popupWindow with Windows manager interface

* remove peer search timeout functionality and simplify splash screen logic

* remove now-redundant meteor package

* fix bugs and issues for electron 1.0 support

* got tx sending working again

* rename IPC message types

* added i18n support to networkIndicator element, added better highlighting

* dont auto-exit if startup fails - show logging info instead

* fix bug preventing distributable build

* fixes for electron 1.0, get wallet distributable working

* remove old redundant code

* Check for node startup error (#673)

* Remove old git diff tags

* check for geth fatal startup error

* more helpful error message if geth unable to bind to port

* UI Changes to network indicator (#675)

* untracked public/i18n (#692)

* small typo: some_where (#693)

* Remove old, redundant code (#674)

* Remove old git diff tags

* remove old redundant code

* Integrate #601 along with some improvements to IPC Path

* Remove old git diff tags

* integrate #601

* check for geth fatal startup error

* remove old redundant code

* UI Changes to network indicator

* merge

* updates nodes to 1.4.5

* update the menu string

* Pass custom CLI options to the Ethereum node (#689)

* integrate #601

* better cli arg parsingj

* better cli arg parsingj

* Simplify cliArgs API.

* update readme

* fix bug

* Nav bar glitch and new art for Mist (#696)

* Solves navbar glitch and adds new icon and splash screen art

* adds new splash screen art for Mist

* added a yellow tint to the image

* added node linux 32 (#711)

* added unlock and send (#700)

* Check for update at startup and inform the user if a new version is available (#707)

* refactor globals setup by preloader

* final version of update checker mechanism

* if in mist mode search for a mist update

* replace image ids with better system

* Remove dependency on node log output for detecting startup success (#706)

* remove dependency on node log output for detecting startup success

* only start the startup timeout once some data has been received

* Norwegian Bokmål translation (#705)

* bump version to 0.7.5

* Upgrade to web3 version in order to fix broken Send tx funtionality

* update web3 to npm version

* Suggestions and misspelling (#753)

A few suggestions for a slightly less informal translation.

* fixed preloader scripts

* changed file permissions back

* changed file permissions back

* Fix Mist/Wallet app bundling (#721)

* fix Mist/Wallet app bundling

* update electron-packager to 7.0.2

* Minor changes (#769)

Formal used also in the error message.

* Full translation in italian (#768)

File has been translated in Italian.

* start ci

* trigger build

* only build on node 4g

* fix deps

* test develop branch

* added alex and fabian to notification list

* corrected %appdata% path in readme (#776)

* Refactoring Dapp IPC connection (#724)

* work towards new ipc backend wrapper

* work towards refactoring ipc provider backend

* work towards refactor

* work towards refactoring request processing

* work towards new ipc backend wrapper

* work towards refactoring ipc provider backend

* work towards refactor

* work towards refactoring request processing

* improved web3ipcsocket logic, work towards request/response processing in provider backend

* split per-method handlers into separate files, dynamically loaded.
- fixed web3 ipc socket response handlng
- finalized sendRequest() initial draft

* rename generic to base
- fix bugs in use of socket

* enforce timeout of 0 for sockets

* work towards handling batch requests

* remove old provider backend

* fix batch result parsing

* fix numerous bugs, improve how window id gets set

* remove redundant error

* have a connection per webview rather than per-window

* defensive coding

* adds default wallet hosted by github (#767)

* adds default wallet hosted by github

* change to ethereum.org page, adds id to avoid inserting multiple times

* new icon

* Refactor splash screen (#772)

* Refactoring of the splash screen

* center the checking network message

* Show Start App button sooner

* update geth to 1.4.6 + win32 support (#784)

* update travis notification email addr

* Fix problem with geth node being detached (#789)

* fix node detaching, improve socket ipc backend connector

* launch app link should show straight away

* fix bug

* Changes to onboarding screen (#786)

* Fix bug that was preventing onboarding to start

* allows account creation to be skipped and checks passwords

* skip account page

* Added number animation to blocknumbers

* speed down to prevent hanging

* removes log and adds comments to code

* only math.floor the display block not the actual number

* adds shapeshift reference

* fix handling of array results

* fix handling of results - ensure json result is always set

* readme: beautify privatenet ipcpath

* fix remaining issues

* ensure error reponse doesn't include method and params

* upgrade to electron 1.2.2

* Fix the testnet label alignment (#792)

* fix the testnet label alignment

* on the onboarding, just show states as percentage

* fix web3.isConnected() issue

* fixes issue where onboarding screen would not appear

* fixed dragging

* adds a drag region to the mist sidebar (#820)

* download nodes

* added download-nodes

* remove unecessary packages

* remove unecessary drags

* added gulp update nodes to travis

* Update menu items label

* update eth to 1.2.9 (#825)
@lock
Copy link

lock bot commented Apr 1, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked and limited conversation to collaborators Apr 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants