Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

Commit

Permalink
0.7.8
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangyitao committed Oct 26, 2020
1 parent 9af2ebb commit 98e2ce6
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "opendx-frontend",
"version": "0.7.7",
"version": "0.7.8",
"description": "opendx前端,基于https://github.com/PanJiaChen/vue-element-admin开发",
"author": "jiangyitao",
"license": "MIT",
Expand Down
3 changes: 2 additions & 1 deletion src/pages/browser/BrowserWebsocketBoard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,15 @@ export default {
},
mounted() {
this.loading = true
this.closeBoardByClickCloseBtn = false
this.ws = new WebSocket('ws://' + this.agentIp + ':' + this.agentPort + '/browser/' + this.browserId + '/user/' + this.username + '/project/' + this.$store.state.project.id)
this.ws.onclose = () => {
this.loading = false
if (!this.closeBoardByClickCloseBtn) { // 点击关闭调试,不弹提示
this.alertOnWsClose()
this.closeBoard()
}
this.closeBoard()
}
this.ws.onerror = () => {
this.loading = false
Expand Down
12 changes: 12 additions & 0 deletions src/pages/browser/list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,18 @@ export default {
}
}
},
computed: {
showBrowser() {
return this.$store.state.browser.show
}
},
watch: {
showBrowser(newValue, oldValue) {
if (oldValue === true && newValue === false) {
setTimeout(this.fetchBrowserList, 2000)
}
}
},
created() {
this.fetchBrowserList()
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ export default {
},
mounted() {
this.loading = true
this.closeBoardByClickCloseBtn = false
const player = new Player()
const canvas = player.canvas
canvas.setAttribute('id', 'scrcpyCanvas') // style width: 100%;
Expand All @@ -62,8 +64,8 @@ export default {
this.loading = false
if (!this.closeBoardByClickCloseBtn) { // 点击关闭,不弹提示
this.alertOnWsClose()
this.$refs.controllerButtom.closeBoard()
}
this.$refs.controllerButtom.closeBoard()
}
this.androidWebsocket.onerror = () => {
this.loading = false
Expand Down
4 changes: 3 additions & 1 deletion src/pages/mobile/android/components/AndroidStfController.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ export default {
},
mounted() {
this.loading = true
this.closeBoardByClickCloseBtn = false
const canvas = document.getElementById('stfCanvas')
const g = canvas.getContext('2d')
const BLANK_IMG = 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=='
Expand All @@ -67,8 +69,8 @@ export default {
this.loading = false
if (!this.closeBoardByClickCloseBtn) { // 点击关闭,不弹提示
this.alertOnWsClose()
this.$refs.controllerButtom.closeBoard()
}
this.$refs.controllerButtom.closeBoard()
}
this.androidWebsocket.onerror = () => {
this.loading = false
Expand Down
4 changes: 3 additions & 1 deletion src/pages/mobile/ios/components/IosController.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ export default {
},
mounted() {
this.loading = true
this.closeBoardByClickCloseBtn = false
const canvas = document.getElementById('iosControllerCanvas')
const g = canvas.getContext('2d')
const BLANK_IMG = 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=='
Expand All @@ -65,8 +67,8 @@ export default {
this.loading = false
if (!this.closeBoardByClickCloseBtn) { // 点击关闭,不弹提示
this.alertOnWsClose()
this.$refs.controllerButtom.closeBoard()
}
this.$refs.controllerButtom.closeBoard()
}
this.iosWebsocket.onerror = () => {
this.loading = false
Expand Down
12 changes: 12 additions & 0 deletions src/pages/mobile/list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,18 @@ export default {
}
}
},
computed: {
showMobile() {
return this.$store.state.mobile.show
}
},
watch: {
showMobile(newValue, oldValue) {
if (oldValue === true && newValue === false) {
setTimeout(this.fetchMobileList, 2000)
}
}
},
created() {
this.fetchMobileList()
},
Expand Down

0 comments on commit 98e2ce6

Please sign in to comment.