返回提交历史
Modified
static/webui/script.js
+2
-1
XFEstudio/XFESpaceNinjaServer
chore(webui): avoid doing permission sync twice after a ws reconnect (#3880)
Closes #3873 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3880 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
e93a74f7
代码差异
1 个文件
+2
-1
@@ -63,6 +63,8 @@ function openWebSocket() {
63
63
}
64
64
if ("config_reloaded" in msg) {
65
65
refreshServerConfig();
66
// Our permissions may have changed, so resync them with the server.
67
ws.send(JSON.stringify({ allPermissions }));
66
68
}
67
69
if ("auth_succ" in msg) {
68
70
auth_pending = false;
@@ -170,7 +172,6 @@ openWebSocket();
170
172
171
173
function refreshServerConfig() {
172
174
//window.is_admin = undefined;
173
ws.send(JSON.stringify({ allPermissions }));
174
175
if (single.getCurrentPath() == "/webui/cheats" || single.getCurrentPath() == "/webui/admin") {
175
176
single.loadRoute(single.getCurrentPath());
176
177
return true;