diff --git a/src/plugins/socket.ts b/src/plugins/socket.ts index b81c187..b3750d6 100644 --- a/src/plugins/socket.ts +++ b/src/plugins/socket.ts @@ -11,9 +11,10 @@ import * as io from 'socket.io-client' // transports: ['websocket'], // query: { EIO: '3', transport: 'websocket' } // } +let ws = (location.protocol == "http:") ? "ws://" : "wss://" Vue.use( new VueSocketIO({ - connection: io(`ws://${location.host}`, { + connection: io(`${ws}${location.host}`, { upgrade: true, secure: true, reconnection: true, diff --git a/src/views/plugins.vue b/src/views/plugins.vue index 4d45ca1..cb80921 100644 --- a/src/views/plugins.vue +++ b/src/views/plugins.vue @@ -62,8 +62,8 @@ import 'codemirror/theme/seti.css' export default class Plugins extends Vue { selectedItem = -1 plugin:{ - name: string - }[] = [] + name: string + }[] = [] LuaFileName = '' LuaFileSrc = ''