<body>
<div id="login-background" class="hidden">
<div id="login">
+ <div class="pokerwave-logo">PokerWave</div>
<label id="username-label" for="username-input">username</label>
<input id="username-input" />
<label id="password-label" for="password-input">password</label>
<div id="login-text-container">
<p id="login-error"></p>
<p id="sign-up">Sign Up</p>
+ <p id="login-back">Back</p>
</div>
</div>
</div>
function login() {
const username = document.getElementById("username-input").value;
const password = document.getElementById("password-input").value;
- delete document.getElementById("login-button").onclick;
- delete document.getElementById("password-input").onchange;
+ document.getElementById("login-button").onclick = () => {};
+ document.getElementById("password-input").onchange = () => {};
+ document.getElementById("password-input").value = "";
+ document.getElementById("password-confirm-input").value = "";
const auth = new Auth(username, password);
for (const socket of sockets) {
socket.login(auth);
case "LogoutSuccess":
delete this.auth;
this.show_login();
+ this.splash.show();
this.state = "Connected";
break;
case "ProtocolError":
document.getElementById("login-background").classList.remove("hidden");
document.getElementById("password-confirm-label").classList.add("hidden");
document.getElementById("password-confirm-input").classList.add("hidden");
+ document.getElementById("sign-up").classList.remove("hidden");
+ document.getElementById("login-back").classList.add("hidden");
document.getElementById("login-button").onclick = this.login_all_sockets;
document.getElementById("password-input").onchange = this.login_all_sockets;
document.getElementById("login-button").innerText = "Sign In";
document.getElementById("sign-up").onclick = () => this.show_create_user();
+ document.getElementById("login-back").onclick = () => this.show_login();
}
show_create_user(error) {
document.getElementById("password-confirm-label").classList.remove("hidden");
document.getElementById("password-confirm-input").classList.remove("hidden");
document.getElementById("sign-up").classList.add("hidden");
+ document.getElementById("login-back").classList.remove("hidden");
document.getElementById("login-button").innerText = "Sign Up";
document.getElementById("password-input").onchange = () => {};
document.getElementById("login-button").onclick = () => {
case "LoggedIn":
this.send({type: "Logout"});
window.localStorage.removeItem("auth");
- this.splash.show();
break;
case "InLobby":
this.send({type: "LeaveLobby"});
this.wave_group = create_svg_element(this.svg, "g", [], []);
- this.logo = create_svg_element(this.svg, "text", ["splash-logo"], [["x", "1000"], ["y", "250"]]);
+ this.logo = create_svg_element(this.svg, "text", ["splash-logo", "pokerwave-logo"], [["x", "1000"], ["y", "250"]]);
this.logo_text = document.createTextNode("PokerWave");
this.logo.append(this.logo_text);
pointer-events: none;
}
+@font-face {
+ font-family: "vegapunk";
+ src: url("./fonts/VegapunkFree-2O8WX.otf");
+}
+
+.pokerwave-logo {
+ font-family: vegapunk;
+ text-align: center;
+ text-shadow: 5px 5px red;
+ color: purple;
+ fill: purple;
+ pointer-events: none;
+}
+
#game-tile-background {
width: 100%;
height: 100%;
flex-direction: row;
}
-#sign-up {
+#sign-up, #login-back {
font-size: 2vw;
text-align: right;
flex-grow: 1;
cursor: pointer;
}
-#sign-up:hover {
+#sign-up:hover, #login-back:hover {
text-decoration: underline;
}
object-fit: contain;
width: 200px;
height: 160px;
- cursor-events: none;
+ pointer-events: none;
}
.game-format-icon > p {
font-family: sans;
font-size: 20px;
margin-top: 0px;
- cursor-events: none;
+ pointer-events: none;
}
to { opacity: 99%; }
}
-@font-face {
- font-family: "vegapunk";
- src: url("../fonts/VegapunkFree-2O8WX.otf");
-}
-
.splash-screen {
cursor: pointer;
}
font-size: 30pt;
text-anchor: middle;
dominant-baseline: middle;
- font-family: vegapunk;
- text-shadow: 5px 5px red;
- fill: purple;
- cursor-events: none;
}
.splash-upper-bar {