diff --git a/package-lock.json b/package-lock.json index b9a69ec..3b7183e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3769,10 +3769,14 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001156", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001156.tgz", - "integrity": "sha512-z7qztybA2eFZTB6Z3yvaQBIoJpQtsewRD74adw2UbRWwsRq3jIPvgrQGawBMbfafekQaD21FWuXNcywtTDGGCw==", - "dev": true + "version": "1.0.30001279", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001279.tgz", + "integrity": "sha512-VfEHpzHEXj6/CxggTwSFoZBBYGQfQv9Cf42KPlO79sWXCD1QNKWKsKzFeWL7QpZHJQYAvocqV6Rty1yJMkqWLQ==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + } }, "node_modules/case-sensitive-paths-webpack-plugin": { "version": "2.3.0", @@ -18189,9 +18193,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001156", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001156.tgz", - "integrity": "sha512-z7qztybA2eFZTB6Z3yvaQBIoJpQtsewRD74adw2UbRWwsRq3jIPvgrQGawBMbfafekQaD21FWuXNcywtTDGGCw==", + "version": "1.0.30001279", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001279.tgz", + "integrity": "sha512-VfEHpzHEXj6/CxggTwSFoZBBYGQfQv9Cf42KPlO79sWXCD1QNKWKsKzFeWL7QpZHJQYAvocqV6Rty1yJMkqWLQ==", "dev": true }, "case-sensitive-paths-webpack-plugin": { diff --git a/src/App.vue b/src/App.vue index 92c3a1e..44e539e 100644 --- a/src/App.vue +++ b/src/App.vue @@ -107,7 +107,7 @@ :key="item.url" /> -
-
+ --> @@ -180,6 +180,8 @@ export default { vlayout: true, isDark: null, showMenu: true, + wsconnection: null, + wsapi: null, }; }, created: async function () { @@ -189,8 +191,23 @@ export default { this.services = this.config.services; this.external = this.config.external; document.title = `${this.config.title} | ${this.config.subtitle}`; + // ws section + this.wsconnection = new WebSocket("wss://sco.snakes.wtf/api"); + + this.wsconnection.onmessage = function(event) { + console.log(event.data) + } + this.wsconnection.onopen = function(event) { + console.log(event) + this.sendMessage("onopen"); + } + }, methods: { +sendMessage: function(message) { + console.log(this.connection); + this.connection.send(message); + }, getConfig: function (path = "config.yml") { return fetch(path).then((response) => { if (!response.ok) {