summaryrefslogtreecommitdiff
path: root/src/renderer/gameserver/server.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/renderer/gameserver/server.ts')
-rw-r--r--src/renderer/gameserver/server.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/renderer/gameserver/server.ts b/src/renderer/gameserver/server.ts
index ed462c4..4c54235 100644
--- a/src/renderer/gameserver/server.ts
+++ b/src/renderer/gameserver/server.ts
@@ -2,8 +2,7 @@ import GameServerProfile from './profile';
import { shell, ipcRenderer } from 'electron';
import { switchPage } from '../customEvents';
import { News, NewsType } from './news';
-import { makeOnlineCounterList } from './onlineCount';
-
+import { makeOnlineCounterList, OnlineListParser } from './onlineCount';
export default class GameServer {
constructor(
@@ -16,7 +15,8 @@ export default class GameServer {
public backgrounds:{isVideo:boolean,file:string}[],
public icon:string,
public socialLinks:socialLink[],
- public TOSLink:string
+ public TOSLink:string,
+ public OnlineList:{parser:OnlineListParser,url:string},
){}
getMenuEntry():HTMLElement{
@@ -48,15 +48,15 @@ export default class GameServer {
let onlineBoxActive:boolean = false;
let onlineBoxSchouldBeActive:boolean = false;
- let updateOnlineContainer = () => {
+ let updateOnlineContainer = async () => {
if(onlineBoxSchouldBeActive == onlineBoxActive)return;
+ onlineBoxActive = onlineBoxSchouldBeActive;
while (OnlineCounterContainer.firstChild) {
OnlineCounterContainer.removeChild(OnlineCounterContainer.firstChild);
}
if(onlineBoxSchouldBeActive){
- OnlineCounterContainer.appendChild(makeOnlineCounterList(this));
+ OnlineCounterContainer.appendChild(await makeOnlineCounterList(this));
}
- onlineBoxActive = onlineBoxSchouldBeActive;
console.log(onlineBoxSchouldBeActive);
}