summaryrefslogtreecommitdiff
path: root/src/renderer/gameserver/server.ts
diff options
context:
space:
mode:
authorLawnCable <lawncable.tmw2@simonlaux.de>2018-06-26 01:28:31 +0200
committerLawnCable <lawncable.tmw2@simonlaux.de>2018-06-26 01:28:31 +0200
commit0227331ff38716076ea0e6b2bdd6ec76b178b5e6 (patch)
treec6ee2f14d1e0fdeb04b9e9f5ca24bba1252784bf /src/renderer/gameserver/server.ts
parent73107257b3bc2c29c553be0df36e9d5248bd78c2 (diff)
downloadelectron-0227331ff38716076ea0e6b2bdd6ec76b178b5e6.tar.gz
electron-0227331ff38716076ea0e6b2bdd6ec76b178b5e6.tar.bz2
electron-0227331ff38716076ea0e6b2bdd6ec76b178b5e6.tar.xz
electron-0227331ff38716076ea0e6b2bdd6ec76b178b5e6.zip
Online Count Visuals
Diffstat (limited to 'src/renderer/gameserver/server.ts')
-rw-r--r--src/renderer/gameserver/server.ts11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/renderer/gameserver/server.ts b/src/renderer/gameserver/server.ts
index 91944b1..235b8be 100644
--- a/src/renderer/gameserver/server.ts
+++ b/src/renderer/gameserver/server.ts
@@ -1,7 +1,8 @@
import GameServerProfile from './profile';
import { shell, ipcRenderer } from 'electron';
-import { switchPage } from '../CustomEvents';
+import { switchPage } from '../customEvents';
import { News, NewsType } from './news';
+import { makeOnlineCounterList } from './onlineCount';
export default class GameServer {
@@ -21,7 +22,11 @@ export default class GameServer {
getMenuEntry():HTMLElement{
const sidebarItem = document.createElement('div');
sidebarItem.classList.add("sidebarItem");
+ //Online counter
+ const OnlineCounterContainer = document.createElement('div');
+ OnlineCounterContainer.appendChild(makeOnlineCounterList(this));
+ sidebarItem.appendChild(OnlineCounterContainer);
//Title
const title = document.createElement('div');
title.classList.add("title");
@@ -32,14 +37,18 @@ export default class GameServer {
const titleText = document.createElement('div');
titleText.innerText = this.menuName;
+
+
title.appendChild(titleIMG);
title.appendChild(titleText);
+
title.addEventListener('click', ()=>{
switchPage("SERVER",this.name);
});
sidebarItem.appendChild(title);
+
//Collapsable
const container = document.createElement('div');
container.classList.add("colapse");