mirror of
https://github.com/purocean/yn.git
synced 2026-09-24 15:46:02 +08:00
增加更新内容查看
This commit is contained in:
@@ -159,7 +159,7 @@ yarn run start
|
||||
## 更新日志
|
||||
[最新发布](https://github.com/purocean/yn/releases)
|
||||
|
||||
### [v2.0.0-beta4.6](https://github.com/purocean/yn/releases/tag/v2.0.0-beta4.6) 2019-08-11
|
||||
### [v2.0.0-beta4.7](https://github.com/purocean/yn/releases/tag/v2.0.0-beta4.7) 2019-08-11
|
||||
1. 增加 2.0 计划
|
||||
1. Electron 打包
|
||||
1. 增加 HTML 小工具渲染
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "yank.note.yang",
|
||||
"version": "2.0.0-beta4.6",
|
||||
"version": "2.0.0-beta4.7",
|
||||
"description": "Yank-Note",
|
||||
"main": "dist/app.js",
|
||||
"author": {
|
||||
|
||||
+5
-2
@@ -2,6 +2,7 @@ import { dialog, app } from 'electron'
|
||||
import { autoUpdater, CancellationToken } from 'electron-updater'
|
||||
const ProgressBar = require('electron-progressbar')
|
||||
const Store = require('electron-store')
|
||||
const opn = require('opn')
|
||||
import logger from 'electron-log'
|
||||
|
||||
logger.transports.file.level = 'info'
|
||||
@@ -20,7 +21,7 @@ const init = (call: () => void) => {
|
||||
const { response } = await dialog.showMessageBox({
|
||||
cancelId: 999,
|
||||
type: 'question',
|
||||
buttons: ['下载更新', '取消', '不再提醒'],
|
||||
buttons: ['下载更新', '查看更新内容', '取消', '不再提醒'],
|
||||
title: 'Yank Note 发现新版本',
|
||||
message: `当前版本 ${app.getVersion()}\n最新版本:${info.version}`
|
||||
})
|
||||
@@ -55,7 +56,9 @@ const init = (call: () => void) => {
|
||||
console.log('cancel download')
|
||||
cancellationToken.cancel()
|
||||
})
|
||||
} else if (response === 2) {
|
||||
} else if (response === 1) {
|
||||
opn('https://github.com/purocean/yn#%E6%9B%B4%E6%96%B0%E6%97%A5%E5%BF%97')
|
||||
} else if (response === 3) {
|
||||
store.set('dontCheckUpdates', true)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user