略微整理更新超时机制
parent
0aeab00289
commit
0586639e07
|
@ -44,12 +44,12 @@
|
||||||
- Mac OS
|
- Mac OS
|
||||||
- Linux
|
- Linux
|
||||||
|
|
||||||
|
注意:win7需要开启**透明效果**软件才可使用
|
||||||
|
|
||||||
软件变化请查看:[更新日志](https://github.com/lyswhut/lx-music-desktop/blob/master/CHANGELOG.md)<br>
|
软件变化请查看:[更新日志](https://github.com/lyswhut/lx-music-desktop/blob/master/CHANGELOG.md)<br>
|
||||||
软件下载请转到:[发布页面](https://github.com/lyswhut/lx-music-desktop/releases)<br>
|
软件下载请转到:[发布页面](https://github.com/lyswhut/lx-music-desktop/releases)<br>
|
||||||
或者到网盘下载(网盘内有MAC、windows版):`https://www.lanzous.com/b906260/` 密码:`glqw`
|
或者到网盘下载(网盘内有MAC、windows版):`https://www.lanzous.com/b906260/` 密码:`glqw`
|
||||||
|
|
||||||
注意:win7需要开启**透明效果**软件才可使用
|
|
||||||
|
|
||||||
#### 关于软件更新
|
#### 关于软件更新
|
||||||
|
|
||||||
软件启动时若发现新版本时会自动从本仓库下载安装包,下载完毕会弹窗提示更新。<br>
|
软件启动时若发现新版本时会自动从本仓库下载安装包,下载完毕会弹窗提示更新。<br>
|
||||||
|
|
|
@ -7,14 +7,14 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"pack": "node build-config/pack.js && npm run pack:win",
|
"pack": "node build-config/pack.js && npm run pack:win",
|
||||||
"pack:win": "npm run pack:win:setup && npm run pack:win:7z",
|
"pack:win": "npm run pack:win:setup && npm run pack:win:7z",
|
||||||
"pack:win:setup": "cross-env TARGET=Setup ARCH=x64_x86 electron-builder -w=nsis --x64 --ia32",
|
"pack:win:setup": "cross-env TARGET=win安装版 ARCH=x64_x86 electron-builder -w=nsis --x64 --ia32",
|
||||||
"pack:win:portable": "npm run pack:win:portable:x64_x86 && npm run pack:win:portable:x64 && npm run pack:win:portable:x86",
|
"pack:win:portable": "npm run pack:win:portable:x64_x86 && npm run pack:win:portable:x64 && npm run pack:win:portable:x86",
|
||||||
"pack:win:portable:x64_x86": "cross-env TARGET=便携版 ARCH=x64_x86 electron-builder -w=portable --x64 --ia32",
|
"pack:win:portable:x64_x86": "cross-env TARGET=便携版 ARCH=x64_x86 electron-builder -w=portable --x64 --ia32",
|
||||||
"pack:win:portable:x64": "cross-env TARGET=便携版 ARCH=x64 electron-builder -w=portable --x64",
|
"pack:win:portable:x64": "cross-env TARGET=便携版 ARCH=x64 electron-builder -w=portable --x64",
|
||||||
"pack:win:portable:x86": "cross-env TARGET=便携版 ARCH=x86 electron-builder -w=portable --ia32",
|
"pack:win:portable:x86": "cross-env TARGET=便携版 ARCH=x86 electron-builder -w=portable --ia32",
|
||||||
"pack:win:7z": "npm run pack:win:7z:x64 && npm run pack:win:7z:x86",
|
"pack:win:7z": "npm run pack:win:7z:x64 && npm run pack:win:7z:x86",
|
||||||
"pack:win:7z:x64": "cross-env TARGET=绿色版 ARCH=x64 electron-builder -w=7z --x64",
|
"pack:win:7z:x64": "cross-env TARGET=win绿色版 ARCH=x64 electron-builder -w=7z --x64",
|
||||||
"pack:win:7z:x86": "cross-env TARGET=绿色版 ARCH=x86 electron-builder -w=7z --ia32",
|
"pack:win:7z:x86": "cross-env TARGET=win绿色版 ARCH=x86 electron-builder -w=7z --ia32",
|
||||||
"publish": "node publish",
|
"publish": "node publish",
|
||||||
"publish:gh": "node build-config/pack.js && npm run publish:win",
|
"publish:gh": "node build-config/pack.js && npm run publish:win",
|
||||||
"publish:win": "npm run publish:win:7z && npm run publish:win:setup",
|
"publish:win": "npm run publish:win:7z && npm run publish:win:setup",
|
||||||
|
|
|
@ -98,6 +98,7 @@ export default {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
rendererOn('update-error', () => {
|
rendererOn('update-error', () => {
|
||||||
|
if (!this.updateTimeout) return
|
||||||
this.setVersionModalVisible({ isError: true })
|
this.setVersionModalVisible({ isError: true })
|
||||||
this.clearUpdateTimeout()
|
this.clearUpdateTimeout()
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
@ -109,12 +110,14 @@ export default {
|
||||||
this.showUpdateModal()
|
this.showUpdateModal()
|
||||||
})
|
})
|
||||||
rendererOn('update-not-available', () => {
|
rendererOn('update-not-available', () => {
|
||||||
|
if (!this.updateTimeout) return
|
||||||
if (this.setting.ignoreVersion) this.setSetting(Object.assign({}, this.setting, { ignoreVersion: null }))
|
if (this.setting.ignoreVersion) this.setSetting(Object.assign({}, this.setting, { ignoreVersion: null }))
|
||||||
this.clearUpdateTimeout()
|
this.clearUpdateTimeout()
|
||||||
this.setNewVersion({
|
this.setNewVersion({
|
||||||
version: this.version.version,
|
version: this.version.version,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
// 更新超时定时器
|
||||||
this.updateTimeout = setTimeout(() => {
|
this.updateTimeout = setTimeout(() => {
|
||||||
this.updateTimeout = null
|
this.updateTimeout = null
|
||||||
this.setVersionModalVisible({ isError: true })
|
this.setVersionModalVisible({ isError: true })
|
||||||
|
|
Loading…
Reference in New Issue