diff --git a/assets/web/app.js b/assets/web/app.js index cc35931..f24857b 100644 --- a/assets/web/app.js +++ b/assets/web/app.js @@ -111,8 +111,11 @@ tavern.onlogin = (s) => { login.style.display = 'none'; game.style.display = 'flex'; // get last 50 msgs (i think that is enough for now) when we get in + // TODO: Maybe move this into the server itself? that is a lot of stuff that we know are gonna happen... + // For now i'll keep it like that tho tavern.get_last_msgs(50); - tavern.get_current_scene(); + // TODO: Perhaps figure out a way to show a certain scene? maybe on the server it would make more sense + tavern.get_scene_list(); } else { alert("Invalid username or password!"); @@ -210,6 +213,14 @@ tavern.onshowscene = (show) => { tavern.onspawntoken(token); } } +tavern.onscenelist = (list) => { + console.log(list); + let div = document.getElementById('scene-list'); + div.innerHTML = ''; + for (let scene of list.scenes) { + div.innerHTML += ``; + } +} function onLoginClick() { let username = document.getElementById('login-username').value; let pass = document.getElementById('login-pass').value; diff --git a/assets/web/index.html b/assets/web/index.html index 21d01d6..b934326 100644 --- a/assets/web/index.html +++ b/assets/web/index.html @@ -36,8 +36,7 @@
-
- floating
stuff +