优化更新弹窗
parent
f3dd306f54
commit
6bd18e8078
|
@ -98,6 +98,14 @@ npm run pack
|
||||||
注意:**绿色版**的软件更新功能**不可用**,为了能及时地获取更新,建议使用安装版!!<br>
|
注意:**绿色版**的软件更新功能**不可用**,为了能及时地获取更新,建议使用安装版!!<br>
|
||||||
注意:**Mac版**、**Linux deb**版不支持自动更新!
|
注意:**Mac版**、**Linux deb**版不支持自动更新!
|
||||||
|
|
||||||
|
#### 安装安装版失败
|
||||||
|
|
||||||
|
对于部分电脑出现安装失败的问题我也不懂什么原因,,可以尝试清理下安装文件,或者重启电脑试试。
|
||||||
|
|
||||||
|
#### 缺少`xxx.dll`
|
||||||
|
|
||||||
|
这个是电脑缺少某些dll导致的,正常的系统是没有这个问题的,解决办法需自行百度弹出的错误信息看下别人是怎么解决的。
|
||||||
|
|
||||||
### 致谢
|
### 致谢
|
||||||
|
|
||||||
感谢 [@messoer](https://github.com/messoer) 曾经提供的部分音乐API!
|
感谢 [@messoer](https://github.com/messoer) 曾经提供的部分音乐API!
|
||||||
|
|
|
@ -6,3 +6,10 @@
|
||||||
### 优化
|
### 优化
|
||||||
|
|
||||||
- 新增DNS解析缓存,加快请求速度
|
- 新增DNS解析缓存,加快请求速度
|
||||||
|
- 优化代码逻辑,减少软件对系统资源的占用
|
||||||
|
- 优化新版本信息检测,尽量减少弹出版本获取失败弹窗弹出的概率
|
||||||
|
- 优化下拉列表动画效果
|
||||||
|
|
||||||
|
### 修复
|
||||||
|
|
||||||
|
- 修复一些小Bug
|
||||||
|
|
|
@ -106,6 +106,11 @@ export default {
|
||||||
this.showUpdateModal()
|
this.showUpdateModal()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
this.setVersionModalVisible({ isError: true })
|
||||||
|
this.clearUpdateTimeout()
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.showUpdateModal()
|
||||||
|
})
|
||||||
rendererOn('update-downloaded', () => {
|
rendererOn('update-downloaded', () => {
|
||||||
this.clearUpdateTimeout()
|
this.clearUpdateTimeout()
|
||||||
this.setVersionModalVisible({ isError: false })
|
this.setVersionModalVisible({ isError: false })
|
||||||
|
|
|
@ -622,7 +622,7 @@ export default {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
transform-origin: 0;
|
transform-origin: 0;
|
||||||
transition-property: transform;
|
transition-property: transform;
|
||||||
transition-timing-function: ease;
|
transition-timing-function: ease-out;
|
||||||
border-radius: @radius-progress-border;
|
border-radius: @radius-progress-border;
|
||||||
}
|
}
|
||||||
.progress-bar1 {
|
.progress-bar1 {
|
||||||
|
|
|
@ -134,7 +134,7 @@ export default {
|
||||||
flex-flow: column nowrap;
|
flex-flow: column nowrap;
|
||||||
|
|
||||||
> * {
|
> * {
|
||||||
background-color: @color-theme_2;
|
background-color: @color-theme_2-background_2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -176,7 +176,7 @@ each(@themes, {
|
||||||
.content {
|
.content {
|
||||||
box-shadow: 0 0 3px rgba(0, 0, 0, .3);
|
box-shadow: 0 0 3px rgba(0, 0, 0, .3);
|
||||||
> * {
|
> * {
|
||||||
background-color: ~'@{color-@{value}-theme_2}';
|
background-color: ~'@{color-@{value}-theme_2-background_2}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,7 @@ export default {
|
||||||
border-bottom: 2px solid @color-tab-border-bottom;
|
border-bottom: 2px solid @color-tab-border-bottom;
|
||||||
border-left: 2px solid @color-tab-border-bottom;
|
border-left: 2px solid @color-tab-border-bottom;
|
||||||
border-bottom-left-radius: 4px;
|
border-bottom-left-radius: 4px;
|
||||||
background-color: @color-theme_2;
|
background-color: @color-theme_2-background_2;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transform: scaleY(0);
|
transform: scaleY(0);
|
||||||
transform-origin: 0 0 0;
|
transform-origin: 0 0 0;
|
||||||
|
@ -144,6 +144,7 @@ each(@themes, {
|
||||||
.list {
|
.list {
|
||||||
border-bottom-color: ~'@{color-@{value}-tab-border-bottom}';
|
border-bottom-color: ~'@{color-@{value}-tab-border-bottom}';
|
||||||
border-left-color: ~'@{color-@{value}-tab-border-bottom}';
|
border-left-color: ~'@{color-@{value}-tab-border-bottom}';
|
||||||
|
background-color: ~'@{color-@{value}-theme_2-background_2}';
|
||||||
li {
|
li {
|
||||||
// color: ~'@{color-@{value}-btn}';
|
// color: ~'@{color-@{value}-btn}';
|
||||||
background-color: ~'@{color-@{value}-btn-background}';
|
background-color: ~'@{color-@{value}-btn-background}';
|
||||||
|
|
|
@ -17,16 +17,19 @@ material-modal(:show="version.showModal" @close="handleClose")
|
||||||
|
|
||||||
div(:class="$style.footer" v-if="version.isError")
|
div(:class="$style.footer" v-if="version.isError")
|
||||||
div(:class="$style.desc" v-if="!isUnknow")
|
div(:class="$style.desc" v-if="!isUnknow")
|
||||||
p 发现有新版本啦,但是自动更新功能出问题了
|
p 发现有新版本啦,但是自动更新功能出问题了,
|
||||||
p
|
p
|
||||||
| 你现在可以选择继续使用当前版本或
|
| 你现在可以选择继续使用当前版本或
|
||||||
strong 去发布页下载新版本
|
strong 去发布页下载新版本
|
||||||
| ,推荐到
|
| ,
|
||||||
strong 网盘
|
p
|
||||||
| 下载
|
| 国内Windows/MAC用户推荐到
|
||||||
|
strong.hover.underline(@click="handleOpenUrl('https://www.lanzous.com/b906260/')") 网盘(点击打开)
|
||||||
|
| 下载,密码:
|
||||||
|
strong.hover(@click="handleCopy('glqw')" title="点击复制") glqw
|
||||||
div(:class="$style.btns")
|
div(:class="$style.btns")
|
||||||
material-btn(:class="$style.btn" @click.onec="handleIgnoreClick") 忽略该版本
|
material-btn(:class="$style.btn" @click.onec="handleIgnoreClick") 忽略该版本
|
||||||
material-btn(:class="$style.btn" @click.onec="handleOpenPageClick") 去下载新版本
|
material-btn(:class="$style.btn" @click.onec="handleOpenUrl('https://github.com/lyswhut/lx-music-desktop#readme')") 去软件发布页
|
||||||
div(:class="$style.footer" v-else)
|
div(:class="$style.footer" v-else)
|
||||||
div(:class="$style.desc")
|
div(:class="$style.desc")
|
||||||
p 新版本已下载完毕,
|
p 新版本已下载完毕,
|
||||||
|
@ -43,7 +46,7 @@ material-modal(:show="version.showModal" @close="handleClose")
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters, mapMutations } from 'vuex'
|
import { mapGetters, mapMutations } from 'vuex'
|
||||||
import { rendererSend } from '../../../common/icp'
|
import { rendererSend } from '../../../common/icp'
|
||||||
import { checkVersion, openUrl } from '../../utils'
|
import { checkVersion, openUrl, clipboardWriteText } from '../../utils'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -74,14 +77,17 @@ export default {
|
||||||
// event.target.disabled = true
|
// event.target.disabled = true
|
||||||
this.setSetting(Object.assign({}, this.setting, { ignoreVersion: this.version.newVersion.version }))
|
this.setSetting(Object.assign({}, this.setting, { ignoreVersion: this.version.newVersion.version }))
|
||||||
},
|
},
|
||||||
handleOpenPageClick() {
|
handleOpenUrl(url) {
|
||||||
openUrl('https://github.com/lyswhut/lx-music-desktop#readme')
|
openUrl(url)
|
||||||
},
|
},
|
||||||
handleRestartClick(event) {
|
handleRestartClick(event) {
|
||||||
this.handleClose()
|
this.handleClose()
|
||||||
event.target.disabled = true
|
event.target.disabled = true
|
||||||
rendererSend('quit-update')
|
rendererSend('quit-update')
|
||||||
},
|
},
|
||||||
|
handleCopy(text) {
|
||||||
|
clipboardWriteText(text)
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -123,6 +129,7 @@ export default {
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
padding-right: 5px;
|
||||||
}
|
}
|
||||||
.current {
|
.current {
|
||||||
> p {
|
> p {
|
||||||
|
@ -169,12 +176,9 @@ export default {
|
||||||
flex: 0 0 none;
|
flex: 0 0 none;
|
||||||
.desc {
|
.desc {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
padding: 10px 0;
|
padding-top: 10px;
|
||||||
color: @color-theme;
|
color: @color-theme;
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
strong {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.btn {
|
.btn {
|
||||||
|
@ -183,6 +187,7 @@ export default {
|
||||||
}
|
}
|
||||||
.btns {
|
.btns {
|
||||||
display: grid;
|
display: grid;
|
||||||
|
padding-top: 10px;
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr 1fr;
|
||||||
grid-gap: 0 10px;
|
grid-gap: 0 10px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,15 +3,17 @@ import { httpGet } from '../utils/request'
|
||||||
import { author, name } from '../../../package.json'
|
import { author, name } from '../../../package.json'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
getVersionInfo() {
|
getVersionInfo(state, retryNum = 0) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
httpGet(`https://raw.githubusercontent.com/${author.name}/${name}/master/publish/version.json`, (err, resp, body) => {
|
httpGet(`https://raw.githubusercontent.com/${author.name}/${name}/master/publish/version.json`, {
|
||||||
|
timeout: 20000,
|
||||||
|
}, (err, resp, body) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
return resolve({
|
return ++retryNum > 3 ? resolve({
|
||||||
version: '0.0.0',
|
version: '0.0.0',
|
||||||
desc: '<h3>版本信息获取失败</h3><ul><li>更新信息获取失败,可能是无法访问Github导致的,请手动检查更新!</li><li>检查方法:去设置-关于洛雪音乐打开<strong>开源地址</strong>或<strong>网盘地址</strong>查看<strong>版本号</strong>与当前版本对比是否最新</li></ul>',
|
desc: '<h3>版本信息获取失败</h3><ul><li>更新信息获取失败,可能是无法访问Github导致的,请手动检查更新!</li><li>检查方法:去设置-关于洛雪音乐打开<strong>开源地址</strong>或<strong>网盘地址</strong>查看<strong>版本号</strong>与当前版本对比是否最新</li></ul>',
|
||||||
history: [],
|
history: [],
|
||||||
})
|
}) : this.dispatch('getVersionInfo', retryNum).then(ver => resolve(ver))
|
||||||
}
|
}
|
||||||
resolve(body)
|
resolve(body)
|
||||||
})
|
})
|
||||||
|
|
|
@ -231,7 +231,7 @@ const getProxyInfo = () => window.globalObj.proxy.enable
|
||||||
const fetchData = (url, method, {
|
const fetchData = (url, method, {
|
||||||
headers = {},
|
headers = {},
|
||||||
format = 'json',
|
format = 'json',
|
||||||
timeout = 1000,
|
timeout = 15000,
|
||||||
...options
|
...options
|
||||||
}, callback) => {
|
}, callback) => {
|
||||||
// console.log(url, options)
|
// console.log(url, options)
|
||||||
|
|
|
@ -134,7 +134,7 @@ div.scroll(:class="$style.setting")
|
||||||
| 支持作者哦~~🍻
|
| 支持作者哦~~🍻
|
||||||
p
|
p
|
||||||
span 如果你资金充裕,还可以
|
span 如果你资金充裕,还可以
|
||||||
material-btn(@click="handleOpenUrl('https://cdn.stsky.cn/qrc.png')" min title="土豪,你好 🙂") 打赏下作者
|
material-btn(@click="handleOpenUrl('https://cdn.stsky.cn/qrc.png')" min title="土豪,你好 🙂") 捐赠下作者
|
||||||
span ,以帮我分担点服务器费用~❤️
|
span ,以帮我分担点服务器费用~❤️
|
||||||
p.small
|
p.small
|
||||||
| 本软件仅用于学习交流使用,禁止将本软件用于
|
| 本软件仅用于学习交流使用,禁止将本软件用于
|
||||||
|
|
Loading…
Reference in New Issue