dev ws
This commit is contained in:
Generated
+11
-7
@@ -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": {
|
||||
|
||||
+19
-2
@@ -107,7 +107,7 @@
|
||||
:key="item.url"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
<!-- <div
|
||||
:class="['column', `is-${12 / config.columns}`]"
|
||||
v-for="group in external"
|
||||
:key="group.name"
|
||||
@@ -121,7 +121,7 @@
|
||||
v-bind:item="item"
|
||||
:key="item.url"
|
||||
/>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user