Skip to content

Commit c8881be

Browse files
committed
v0.7.21 优化loading 暗黑样式 ,新增版本检测
1 parent 888e2e8 commit c8881be

File tree

4 files changed

+25
-6
lines changed

4 files changed

+25
-6
lines changed

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
GH_TOKEN=24f0914002270ceb8031787549550b7e43ddcc74
1+
GH_TOKEN=97570b8c9f368027800fb555f9a860aa5bf91121

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "zy",
3-
"version": "0.7.20",
3+
"version": "0.7.21",
44
"author": "Hunlongyu",
55
"description": "ZY Player 资源播放器",
66
"private": true,

src/assets/theme/dark.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@
4242
width: 0px;
4343
}
4444
}
45+
.el-loading-mask{
46+
background-color: var(--d-bgc);
47+
opacity: 0.9;
48+
}
4549
.Header, .Aside{
4650
i{
4751
color: var(--d-icon);

src/page/setting.vue

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,16 @@
2626
</el-card>
2727
</el-row>
2828
</el-row>
29-
<el-row class="item update">
29+
<el-row class="item update about">
3030
<el-row class="title"><i class="el-icon-refresh"></i><span>更新</span></el-row>
31+
<el-row class="info">
32+
<ul>
33+
<li>当前版本: {{version}}</li>
34+
<li>最新版本: {{version}}</li>
35+
</ul>
36+
</el-row>
3137
<el-row class="btns">
32-
<el-button size="small" @click="checkUpdate">检查更新</el-button>
38+
<el-button v-show="download" size="small" @click="linkOpen('https://github.com/Hunlongyu/ZY-Player/releases/latest')">下载更新</el-button>
3339
</el-row>
3440
</el-row>
3541
<el-row class="item about">
@@ -56,7 +62,9 @@ export default Vue.extend({
5662
data () {
5763
return {
5864
sites: sites,
59-
dbSite: 0
65+
dbSite: 0,
66+
version: 'v0.7.21',
67+
download: false
6068
}
6169
},
6270
computed: {
@@ -118,11 +126,18 @@ export default Vue.extend({
118126
})
119127
},
120128
checkUpdate () {
121-
fly.get('https://api.github.com/repos/Hunlongyu/ZY-Player/releases/latest').then(() => {}).catch(() => {})
129+
fly.get('https://api.github.com/repos/Hunlongyu/ZY-Player/releases/latest').then(res => {
130+
if (res.data.tag_name !== this.version) {
131+
this.download = true
132+
} else {
133+
this.download = false
134+
}
135+
})
122136
}
123137
},
124138
created () {
125139
this.initSetting()
140+
this.checkUpdate()
126141
}
127142
})
128143
</script>

0 commit comments

Comments
 (0)