diff options
Diffstat (limited to 'src/views/Control/SerialOverLan/SerialOverLanConsole.vue')
-rw-r--r-- | src/views/Control/SerialOverLan/SerialOverLanConsole.vue | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/views/Control/SerialOverLan/SerialOverLanConsole.vue b/src/views/Control/SerialOverLan/SerialOverLanConsole.vue index d5e9b214..b734bb13 100644 --- a/src/views/Control/SerialOverLan/SerialOverLanConsole.vue +++ b/src/views/Control/SerialOverLan/SerialOverLanConsole.vue @@ -42,13 +42,13 @@ export default { name: 'SerialOverLanConsole', components: { IconLaunch, - StatusIcon + StatusIcon, }, props: { isFullWindow: { type: Boolean, - default: true - } + default: true, + }, }, computed: { hostStatus() { @@ -61,7 +61,7 @@ export default { return this.hostStatus === 'on' ? this.$t('pageSerialOverLan.connected') : this.$t('pageSerialOverLan.disconnected'); - } + }, }, created() { this.$store.dispatch('global/getHostStatus'); @@ -74,7 +74,7 @@ export default { const token = this.$store.getters['authentication/token']; const ws = new WebSocket(`wss://${window.location.host}/console0`, [ - token + token, ]); // Refer https://github.com/xtermjs/xterm.js/ for xterm implementation and addons. @@ -82,7 +82,7 @@ export default { const term = new Terminal({ fontSize: 15, fontFamily: - 'SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace' + 'SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace', }); const attachAddon = new AttachAddon(ws); @@ -94,7 +94,7 @@ export default { const SOL_THEME = { background: '#19273c', cursor: 'rgba(83, 146, 255, .5)', - scrollbar: 'rgba(83, 146, 255, .5)' + scrollbar: 'rgba(83, 146, 255, .5)', }; term.setOption('theme', SOL_THEME); @@ -102,10 +102,10 @@ export default { fitAddon.fit(); try { - ws.onopen = function() { + ws.onopen = function () { console.log('websocket console0/ opened'); }; - ws.onclose = function(event) { + ws.onclose = function (event) { console.log( 'websocket console0/ closed. code: ' + event.code + @@ -123,8 +123,8 @@ export default { '_blank', 'directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=600,height=550' ); - } - } + }, + }, }; </script> |