Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Notify users when there is new version available #196

Closed
slaweet opened this issue May 9, 2017 · 1 comment
Closed

Notify users when there is new version available #196

slaweet opened this issue May 9, 2017 · 1 comment
Assignees
Milestone

Comments

@slaweet
Copy link
Contributor

slaweet commented May 9, 2017

Expected behaviour

When a user launches Lisk Nano and it's not the latest version, some kind of unobtrusive notification should inform the user about the newer version. Possibly with a download link.

Actual behaviour

When a new version of Lisk Nano is released, users have to follow Lisk communication channels (chat, blog, etc.) to find out about it or check Lisk website themeselves.

@slaweet slaweet added this to the Version 1.1.0 milestone May 9, 2017
@slaweet
Copy link
Contributor Author

slaweet commented May 29, 2017

Part 3 of this post contains most of what's necessary:
https://nulab-inc.com/blog/typetalk/3-necessary-things-to-correctly-release-a-product-based-on-the-electron-app/

# set api url
var feedUrl = 'https://YOUR_API_ENDPOINT?version=' + app.getVersion();
autoUpdater.setFeedURL(feedUrl);

# event handling after download new release
autoUpdater.on('update-downloaded', function (event, releaseNotes, releaseName, releaseDate, updateUrl, quitAndUpdate) {

  # confirm install or not to user
  var index = dialog.showMessageBox(mainWindow, {
    type: 'info',
    buttons: [i18n.__('Restart'), i18n.__('Later')],
    title: "Lisk Nano",
    message: i18n.__('The new version has been downloaded. Please restart the application to apply the updates.'),
    detail: releaseName + "\n\n" + releaseNotes
  });

  if (index === 1) {
    return;
  }

  # restart app, then update will be applied
  quitAndUpdate();

The post also describes the server side:

exports.handler = function (event, context) {
  var latestRelease = {
    version: "1.2.0",
    url: "http://example.com/LiskNano.app.zip",
    name: "Lisk Nano " + version,
    notes: "- Proxy authentication\n- Show window menu\n- improve performance"
  };
 
  if (event.version < latestRelease.version) {
    context.done(null, latestRelease);
  } else {
    context.done("Not Modified");
  }
};

So we need a ticket in a server-side project to create this kind of API end point. I suggest to put it to lisk-website.

@slaweet slaweet self-assigned this Jun 8, 2017
@slaweet slaweet added *medium and removed *hard labels Aug 3, 2017
@slaweet slaweet modified the milestones: Version 1.3.0, Version 1.2.0 Aug 4, 2017
slaweet added a commit that referenced this issue Sep 22, 2017
slaweet added a commit that referenced this issue Sep 22, 2017
slaweet added a commit that referenced this issue Sep 22, 2017
@slaweet slaweet added *hard and removed *medium labels Nov 15, 2017
slaweet added a commit that referenced this issue Nov 20, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants