diff --git a/resource/template/theme-default/home.html b/resource/template/theme-default/home.html index 3a11400..f39523b 100644 --- a/resource/template/theme-default/home.html +++ b/resource/template/theme-default/home.html @@ -10,89 +10,95 @@
@#(group.Tag!==''?group.Tag:'默认')#@
-
-
-
@#server.Name + - (server.live?'':' [已离线]')#@ - - +
@@ -105,7 +111,7 @@ delimiters: ['@#', '#@'], data: { data: initData, - groups:[], + groups: [], cache: [], }, created() { @@ -172,7 +178,8 @@ } } }) - function groupingData(data, filed){ + + function groupingData(data, filed) { let map = {}; let dest = []; @@ -204,6 +211,7 @@ return dest; } + const wsProtocol = window.location.protocol == "https:" ? "wss" : "ws" const ws = new WebSocket(wsProtocol + '://' + window.location.host + '/ws'); ws.onopen = function (evt) { @@ -230,7 +238,7 @@ } } } - statusCards.groups=groupingData(statusCards.servers,"Tag") + statusCards.groups = groupingData(statusCards.servers, "Tag") } ws.onclose = function () { $.suiAlert({ @@ -242,7 +250,7 @@ }); } $('.ui.accordion') - .accordion({"exclusive":false}) + .accordion({"exclusive": false}) ; {{end}}