From 3e93388b758c5a6b227f05e009537daa6850bde5 Mon Sep 17 00:00:00 2001 From: Al Cheung Date: Sun, 17 May 2020 16:19:27 +0800 Subject: [PATCH] fix: version update info. --- package.json | 2 +- src/app.js | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 4ade1c6e..54da5ab3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "champ-r", - "version": "0.9.13-pre2", + "version": "0.9.13-pre4", "license": "MIT", "description": "Get champion builds & runes for lol.", "productName": "ChampR", diff --git a/src/app.js b/src/app.js index 30eb53f0..1a17dfc1 100644 --- a/src/app.js +++ b/src/app.js @@ -1,4 +1,4 @@ -import { ipcRenderer } from 'electron'; +import { ipcRenderer, shell } from 'electron'; import _find from 'lodash/find'; import React, { useReducer, useMemo, useRef, useEffect } from 'react'; @@ -133,8 +133,12 @@ const App = () => { getVerAndItems(); - ipcRenderer.on(`update-available`, (info) => { - new Notification(`New version available: ${info.version}`); + ipcRenderer.on(`update-available`, (ev, info) => { + const notify = new Notification(`New version available: ${info.version}`); + + notify.onclick = () => { + shell.openItem(`https://github.com/cangzhang/champ-r/releases`); + }; }); // ipcRenderer.on(`update-downloaded`, () => {});