This commit is contained in:
sco
2021-12-09 20:27:55 +01:00
parent 628346b035
commit 7adf56aea1
2 changed files with 30 additions and 9 deletions
+11 -7
View File
@@ -3769,10 +3769,14 @@
} }
}, },
"node_modules/caniuse-lite": { "node_modules/caniuse-lite": {
"version": "1.0.30001156", "version": "1.0.30001279",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001156.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001279.tgz",
"integrity": "sha512-z7qztybA2eFZTB6Z3yvaQBIoJpQtsewRD74adw2UbRWwsRq3jIPvgrQGawBMbfafekQaD21FWuXNcywtTDGGCw==", "integrity": "sha512-VfEHpzHEXj6/CxggTwSFoZBBYGQfQv9Cf42KPlO79sWXCD1QNKWKsKzFeWL7QpZHJQYAvocqV6Rty1yJMkqWLQ==",
"dev": true "dev": true,
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/browserslist"
}
}, },
"node_modules/case-sensitive-paths-webpack-plugin": { "node_modules/case-sensitive-paths-webpack-plugin": {
"version": "2.3.0", "version": "2.3.0",
@@ -18189,9 +18193,9 @@
} }
}, },
"caniuse-lite": { "caniuse-lite": {
"version": "1.0.30001156", "version": "1.0.30001279",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001156.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001279.tgz",
"integrity": "sha512-z7qztybA2eFZTB6Z3yvaQBIoJpQtsewRD74adw2UbRWwsRq3jIPvgrQGawBMbfafekQaD21FWuXNcywtTDGGCw==", "integrity": "sha512-VfEHpzHEXj6/CxggTwSFoZBBYGQfQv9Cf42KPlO79sWXCD1QNKWKsKzFeWL7QpZHJQYAvocqV6Rty1yJMkqWLQ==",
"dev": true "dev": true
}, },
"case-sensitive-paths-webpack-plugin": { "case-sensitive-paths-webpack-plugin": {
+19 -2
View File
@@ -107,7 +107,7 @@
:key="item.url" :key="item.url"
/> />
</div> </div>
<div <!-- <div
:class="['column', `is-${12 / config.columns}`]" :class="['column', `is-${12 / config.columns}`]"
v-for="group in external" v-for="group in external"
:key="group.name" :key="group.name"
@@ -121,7 +121,7 @@
v-bind:item="item" v-bind:item="item"
:key="item.url" :key="item.url"
/> />
</div> </div> -->
</div> </div>
</div> </div>
</div> </div>
@@ -180,6 +180,8 @@ export default {
vlayout: true, vlayout: true,
isDark: null, isDark: null,
showMenu: true, showMenu: true,
wsconnection: null,
wsapi: null,
}; };
}, },
created: async function () { created: async function () {
@@ -189,8 +191,23 @@ export default {
this.services = this.config.services; this.services = this.config.services;
this.external = this.config.external; this.external = this.config.external;
document.title = `${this.config.title} | ${this.config.subtitle}`; 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: { methods: {
sendMessage: function(message) {
console.log(this.connection);
this.connection.send(message);
},
getConfig: function (path = "config.yml") { getConfig: function (path = "config.yml") {
return fetch(path).then((response) => { return fetch(path).then((response) => {
if (!response.ok) { if (!response.ok) {