11const $ = 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