add: tournament page

This commit is contained in:
2023-12-21 00:21:18 +01:00
parent 8e0514514b
commit 6295c5120f
5 changed files with 153 additions and 11 deletions

View File

@ -3,6 +3,8 @@ import { MatchMaking } from "./matchmaking.js";
import { Profiles } from "./profiles.js";
import { Channels } from './chat/channels.js';
import { MyProfile } from "./MyProfile.js";
import { navigateTo } from "../index.js"
import { Tourmanents } from "./tournament/tournaments.js";
function getCookie(name)
{
@ -22,6 +24,7 @@ class Client
this.account = new Account(this);
this.profiles = new Profiles(this);
this.matchmaking = new MatchMaking(this);
this.tournaments = new Tourmanents(this);
this._logged = undefined;
this.channels = new Channels(this);
@ -101,6 +104,10 @@ class Client
this.me = new MyProfile(this);
await this.me.init();
}
if (this.logged && !state)
{
navigateTo("/login");
}
this.logged = state;
}