Skip to content

Commit

Permalink
fix(boxjs): 尝试修复删除订阅问题
Browse files Browse the repository at this point in the history
  • Loading branch information
chavyleung committed May 10, 2022
1 parent 8a94136 commit ba62f60
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 6 deletions.
11 changes: 7 additions & 4 deletions box/chavy.boxjs.html
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@
<v-list-item-title>{{ $t('base.sort.dn') }}</v-list-item-title>
</v-list-item>
<v-divider></v-divider>
<v-list-item @click="delSub(subIdx)">
<v-list-item @click="delSub(sub.id)">
<v-list-item-title class="text-uppercase red--text">{{ $t('base.cmd.del') }}</v-list-item-title>
</v-list-item>
</v-list>
Expand Down Expand Up @@ -2048,7 +2048,7 @@ <h2 :class="version === ver.version ? 'primary--text' : undefined">v{{ver.versio
sub.author = sub.author ? sub.author : '@anonymous'
sub.repo = sub.repo ? sub.repo : sub.url
})
return subs
return subs.sort((a, b) => b.updateTime > a.updateTime)
},
// 获取`订阅`缓存
appSubCaches() {
Expand Down Expand Up @@ -2447,8 +2447,11 @@ <h2 :class="version === ver.version ? 'primary--text' : undefined">v{{ver.versio
appsubs.splice(fromIdx, 1, ...appsubs.splice(toIdx, 1, appsubs[fromIdx]))
},
// 删除订阅
delSub(subIdx) {
this.box.usercfgs.appsubs.splice(subIdx, 1)
delSub(subId) {
debugger
const subs = this.box.usercfgs.appsubs
const subIdx = subs.findIndex((sub) => sub.id === subId)
subs.splice(subIdx, 1)
},
// 收藏应用
favApp(appId) {
Expand Down
2 changes: 1 addition & 1 deletion box/chavy.boxjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const $ = new Env('BoxJs')
// 为 eval 准备的上下文环境
const $eval_env = {}

$.version = '0.10.0'
$.version = '0.10.1'
$.versionType = 'beta'

// 发出的请求需要需要 Surge、QuanX 的 rewrite
Expand Down
16 changes: 16 additions & 0 deletions box/release/box.release.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
{
"releases": [
{
"version": "0.10.1",
"tags": ["beta"],
"author": "@chavyleung",
"msg": "fix(boxjs): 尝试修复删除订阅问题",
"notes": [
{
"name": "优化",
"descs": ["订阅列表按最后更新时间倒序排序"]
},
{
"name": "修复",
"descs": ["部分情况删除订阅引发的问题"]
}
]
},
{
"version": "0.10.0",
"tags": ["beta"],
Expand Down
16 changes: 16 additions & 0 deletions box/release/box.release.tf.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
{
"releases": [
{
"version": "0.10.1",
"tags": ["beta"],
"author": "@chavyleung",
"msg": "fix(boxjs): 尝试修复删除订阅问题",
"notes": [
{
"name": "优化",
"descs": ["订阅列表按最后更新时间倒序排序"]
},
{
"name": "修复",
"descs": ["部分情况删除订阅引发的问题"]
}
]
},
{
"version": "0.10.0",
"tags": ["beta"],
Expand Down
2 changes: 1 addition & 1 deletion chavy.box.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const $ = new Env('BoxJs')
// 为 eval 准备的上下文环境
const $eval_env = {}

$.version = '0.10.0'
$.version = '0.10.1'
$.versionType = 'beta'

// 发出的请求需要需要 Surge、QuanX 的 rewrite
Expand Down

0 comments on commit ba62f60

Please sign in to comment.