Skip to content

Commit 4153ac9

Browse files
committed
更新[BoxJs]: 修复删除&导入会话时 Loading 动画不能自动消失问题
1 parent 7fe14cb commit 4153ac9

2 files changed

Lines changed: 19 additions & 3 deletions

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.4.3",
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": ["删除&导入会话时 Loading 动画不能自动消失问题"]
13+
}
14+
]
15+
},
316
{
417
"version": "0.4.2",
518
"tags": ["beta"],

chavy.box.js

Lines changed: 6 additions & 3 deletions
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.4.2'
4+
$.version = '0.4.3'
55
$.versionType = 'beta'
66
$.KEY_sessions = 'chavy_boxjs_sessions'
77
$.KEY_versions = 'chavy_boxjs_versions'
@@ -1611,6 +1611,7 @@ function printHtml(data, curapp = null, curview = 'app') {
16111611
})
16121612
},
16131613
onImpSession() {
1614+
this.ui.overlay.show = true
16141615
const impjson = this.ui.impSessionDialog.impval
16151616
const impSession = impjson && JSON.parse(impjson)
16161617
if (impSession && impSession.id && impSession.id === this.ui.curapp.id) {
@@ -1630,11 +1631,12 @@ function printHtml(data, curapp = null, curview = 'app') {
16301631
}
16311632
this.box.sessions.push(session)
16321633
this.ui.curappSessions.push(session)
1633-
this.ui.overlay.show = true
16341634
axios.post('/api', JSON.stringify({ cmd: 'saveSession', val: session })).finally(() => {
16351635
this.ui.impSessionDialog.show = false
1636+
this.ui.overlay.show = false
16361637
})
16371638
} else {
1639+
this.ui.overlay.show = false
16381640
alert('导入失败! 原因: appId 为空?')
16391641
}
16401642
},
@@ -1678,6 +1680,7 @@ function printHtml(data, curapp = null, curview = 'app') {
16781680
if (this.box.sessions.splice(sessionIdx, 1) !== -1) {
16791681
this.ui.curappSessions = this.box.sessions.filter((s) => s.appId === this.ui.curapp.id)
16801682
}
1683+
this.ui.overlay.show = false
16811684
})
16821685
},
16831686
onUseSession(session) {
@@ -1688,6 +1691,7 @@ function printHtml(data, curapp = null, curview = 'app') {
16881691
})
16891692
},
16901693
onImpGlobalBak() {
1694+
this.ui.overlay.show = true
16911695
const env = this.box.syscfgs.env
16921696
const version = this.box.syscfgs.version
16931697
const versionType = this.box.syscfgs.versionType
@@ -1703,7 +1707,6 @@ function printHtml(data, curapp = null, curview = 'app') {
17031707
bakobj.tags = [env, version, versionType]
17041708
this.box.globalbaks.push(bakobj)
17051709
this.ui.impGlobalBakDialog.show = false
1706-
this.ui.overlay.show = true
17071710
axios.post('/api', JSON.stringify({ cmd: 'globalBak', val: bakobj })).finally(() => {
17081711
this.onReload()
17091712
})

0 commit comments

Comments
 (0)