Skip to content

Commit 84799cf

Browse files
committed
更新[BoxJs]: 应用订阅可以排序
1 parent 0db3a8e commit 84799cf

2 files changed

Lines changed: 28 additions & 1 deletion

File tree

‎box/release/box.release.json‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
{
22
"releases": [
3+
{
4+
"version": "0.6.4",
5+
"tags": ["beta"],
6+
"author": "@chavyleung",
7+
"icon": "https://avatars3.githubusercontent.com/u/29748519",
8+
"repo": "https://github.com/chavyleung",
9+
"notes": [
10+
{
11+
"name": "优化",
12+
"descs": ["应用订阅可以排序"]
13+
}
14+
]
15+
},
316
{
417
"version": "0.6.3",
518
"tags": ["beta"],

‎chavy.box.js‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const $ = new Env('BoxJs')
22
$.domain = '8.8.8.8'
33

4-
$.version = '0.6.3'
4+
$.version = '0.6.4'
55
$.versionType = 'beta'
66
$.KEY_sessions = 'chavy_boxjs_sessions'
77
$.KEY_versions = 'chavy_boxjs_versions'
@@ -1220,6 +1220,13 @@ function printHtml(data, curapp = null, curview = 'app') {
12201220
<v-list-item-title>复制</v-list-item-title>
12211221
</v-list-item>
12221222
<v-divider></v-divider>
1223+
<v-list-item v-if="subIdx > 0" @click="onMoveSub(subIdx, -1)">
1224+
<v-list-item-title>上移</v-list-item-title>
1225+
</v-list-item>
1226+
<v-list-item v-if="subIdx + 1 < appsubs.length" @click="onMoveSub(subIdx, 1)">
1227+
<v-list-item-title>下移</v-list-item-title>
1228+
</v-list-item>
1229+
<v-divider></v-divider>
12231230
<v-list-item @click="onDelAppSub(sub)">
12241231
<v-list-item-title>删除</v-list-item-title>
12251232
</v-list-item>
@@ -1748,6 +1755,13 @@ function printHtml(data, curapp = null, curview = 'app') {
17481755
this.box.usercfgs.favapps.splice(fromIdx, 1, ...this.box.usercfgs.favapps.splice(toIdx, 1, this.box.usercfgs.favapps[fromIdx]))
17491756
this.onUserCfgsChange()
17501757
},
1758+
onMoveSub(subIdx, moveCnt) {
1759+
const fromIdx = subIdx
1760+
const toIdx = subIdx + moveCnt
1761+
this.box.appsubs.splice(fromIdx, 1, ...this.box.appsubs.splice(toIdx, 1, this.box.appsubs[fromIdx]))
1762+
this.box.usercfgs.appsubs.splice(fromIdx, 1, ...this.box.usercfgs.appsubs.splice(toIdx, 1, this.box.usercfgs.appsubs[fromIdx]))
1763+
this.onUserCfgsChange()
1764+
},
17511765
onFav(app) {
17521766
const appIdx = this.box.sysapps.findIndex((appId) => appId === app.id)
17531767
app.isFav = !app.isFav

0 commit comments

Comments
 (0)