Added message to main screen

This commit is contained in:
marcin.sciesinski
2020-04-22 22:31:35 -07:00
parent 5d6f6d6769
commit 8be8a3033b

View File

@@ -70,65 +70,65 @@
if (password != password2) {
$(".error").html("Password and Password repeated are different! Try again");
} else {
comm.register(login, password, function() {
location.href = "/gemp-lotr/hall.html";
},
{
"0": function() {
alert("Unable to connect to server, either server is down or there is a problem" +
" with your internet connection");
comm.register(login, password, function () {
location.href = "/gemp-lotr/hall.html";
},
"400":function() {
$(".error").html("Login is invalid. Login must be between 2-10 characters long, and contain only<br/>" +
" english letters, numbers or _ (underscore) and - (dash) characters.");
},
"409": function() {
$(".error").html("User with this login already exists in the system. Try a different one.");
},
"503": function() {
$(".error").html("Server is down for maintenance. Please come at a later time.");
}
});
{
"0": function () {
alert("Unable to connect to server, either server is down or there is a problem" +
" with your internet connection");
},
"400": function () {
$(".error").html("Login is invalid. Login must be between 2-10 characters long, and contain only<br/>" +
" english letters, numbers or _ (underscore) and - (dash) characters.");
},
"409": function () {
$(".error").html("User with this login already exists in the system. Try a different one.");
},
"503": function () {
$(".error").html("Server is down for maintenance. Please come at a later time.");
}
});
}
}
function registrationScreen() {
comm.getRegistrationForm(
function(html) {
$(".error").html();
$(".interaction").html(html);
$("#registerButton").button().click(register);
});
function (html) {
$(".error").html();
$(".interaction").html(html);
$("#registerButton").button().click(register);
});
}
function login() {
var login = $("#login").val();
var password = $("#password").val();
comm.login(login, password, function() {
location.href = "/gemp-lotr/hall.html";
},
{
"0": function() {
alert("Unable to connect to server, either server is down or there is a problem" +
" with your internet connection");
comm.login(login, password, function () {
location.href = "/gemp-lotr/hall.html";
},
"401":function() {
$(".error").html("Invalid username or password. Try again.");
loginScreen();
},
"403": function() {
$(".error").html("You have been permanently banned. If you think it was a mistake you can try sending a private message to Merrick_H on <a href='http://lotrtcgwiki.com/forums/'>TLHH forums</a>.");
$(".interaction").html("");
},
"409": function() {
$(".error").html("You have been temporarily banned. You can try logging in at a later time. If you think it was a mistake you can try sending a private message to Merrick_H on <a href='http://lotrtcgwiki.com/forums/'>TLHH forums</a>.");
$(".interaction").html("");
},
"503": function() {
$(".error").html("Server is down for maintenance. Please come at a later time.");
}
});
{
"0": function () {
alert("Unable to connect to server, either server is down or there is a problem" +
" with your internet connection");
},
"401": function () {
$(".error").html("Invalid username or password. Try again.");
loginScreen();
},
"403": function () {
$(".error").html("You have been permanently banned. If you think it was a mistake you can try sending a private message to Merrick_H on <a href='http://lotrtcgwiki.com/forums/'>TLHH forums</a>.");
$(".interaction").html("");
},
"409": function () {
$(".error").html("You have been temporarily banned. You can try logging in at a later time. If you think it was a mistake you can try sending a private message to Merrick_H on <a href='http://lotrtcgwiki.com/forums/'>TLHH forums</a>.");
$(".interaction").html("");
},
"503": function () {
$(".error").html("Server is down for maintenance. Please come at a later time.");
}
});
}
function loginScreen() {
@@ -155,20 +155,24 @@
}
$(document).ready(
function () {
comm.getStatus(
function(html) {
$(".status").append(html);
});
loginScreen();
$(".centerContainer").center();
});
function () {
comm.getStatus(
function (html) {
$(".status").append(html);
});
loginScreen();
$(".centerContainer").center();
});
</script>
</head>
<body bgcolor="#000000">
<div style="float: left;height: 98%"><img src="images/troll.png" height="98%"/></div>
<div style="float: right;height: 98%"><img src="images/man.png" height="98%"/></div>
<div style="float: right;height: 10%; color:white;">
<div style="font-size: 500%">#stayathome</div>
<div style="font-size: 200%">There are orcs to be slain</div>
</div>
<div class="centerContainer">
<div class="status" style="color:#ffffff;"></div>
<div class="error" style="color: #ff0000;"></div>