mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core&ui: add all enroll users status in training (#456)
Co-authored-by: undefined <i@undefined.moe>
This commit is contained in:
1 parent
d02934f766
commit
c2f5541e83
12 files changed
+312
-156
No files matched your search
@@ -3,6 +3,7 @@ import ReconnectingWebSocket from 'reconnecting-websocket';
|
||||
export default class Sock {
|
||||
constructor(url) {
|
||||
const i = new URL(url, window.location.href);
|
||||
if (i.host !== window.location.host) i.searchParams.append('sid', document.cookie.split('sid=')[1].split(';')[0]);
|
||||
i.protocol = i.protocol.replace('http', 'ws');
|
||||
this.url = i.toString();
|
||||
this.sock = new ReconnectingWebSocket(this.url);
|
||||
|
||||
Reference in new issue
Block a user