Moved error display from chat to cef, cleaned up css code

This commit is contained in:
hydrant
2018-09-21 23:14:43 +02:00
parent 0b5680ac1a
commit d06fd928ac
3 changed files with 46 additions and 48 deletions

View File

@@ -7,10 +7,7 @@
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="Dependences/bootstrap-3.3.7/css/bootstrap.min.css">
<script src="Dependences/jquery-3.3.1.min.js"></script>
<script src="Dependences/bootstrap-3.3.7/js/bootstrap.min.js"></script>
<script src="Dependences/jquery-3.3.1.min.js"></script>
<link rel="stylesheet" href="style.css" />
</head>

View File

@@ -1,13 +1,13 @@
/**
* @overview Life of German Reallife - Login Main main.js
* @author VegaZ
* @author VegaZ, hydrant
* @copyright (c) 2008 - 2018 Life of German
*/
var loginBrowser;
loginBrowser = mp.browsers.new('package://Login/login.html');
mp.gui.chat.activate(false);
mp.gui.cursor.show(true);
mp.gui.cursor.show(true, true);
mp.events.add('loginInformationToServer', (password) => {
@@ -21,12 +21,12 @@ mp.events.add('registerInformationToServer', (password) => {
});
mp.events.add('registerSuccess', () => {
mp.gui.chat.push("Erfolgreich registriert!")
if (loginBrowser)
{
loginBrowser.destroy();
}
mp.gui.cursor.show(false);
mp.gui.cursor.show(false, false);
mp.gui.chat.activate(true);
});
@@ -36,14 +36,14 @@ mp.events.add('loginSuccess', () => {
{
loginBrowser.destroy();
}
mp.gui.cursor.show(false);
mp.gui.cursor.show(false, false);
mp.gui.chat.activate(true);
});
mp.events.add('loginFail', (reason) => {
mp.gui.chat.push(reason);
showCefError(reason);
});
@@ -51,14 +51,16 @@ mp.events.add('loginDeny', (reason) => {
if (loginBrowser) {
loginBrowser.destroy();
}
mp.gui.cursor.show(false);
mp.gui.cursor.show(false, false);
mp.gui.chat.activate(true);
mp.gui.chat.push(reason);
showCefError(reason);
});
mp.events.add('registerFail', (reason) => {
mp.gui.chat.push(reason);
showCefError(reason);
});
function showCefError(error) {
loginBrowser.execute(`showError(\`` + error + `\`)`);
}

View File

@@ -1,6 +1,6 @@
/**
* @overview Life of German Reallife - Login CSS style.css
* @author Orangebox
* @author Orangebox, hydrant
* @copyright (c) 2008 - 2018 Life of German
*/
@@ -35,11 +35,11 @@
background-color: #FFBABA;
}
.isa_info i, .isa_success i, .isa_warning i, .isa_error i {
margin: 10px 22px;
font-size: 2em;
vertical-align: middle;
}
.isa_info i, .isa_success i, .isa_warning i, .isa_error i {
margin: 10px 22px;
font-size: 2em;
vertical-align: middle;
}
.form {
position: relative;
@@ -78,27 +78,27 @@ button {
cursor: pointer;
}
button:hover, .form button:active, .form button:focus {
background: #002574;
}
button:hover, .form button:active, .form button:focus {
background: #002574;
}
.quitBtn {
background-color: orangered;
}
.quitBtn:hover, .quitBtn:focus, .quitBtn:active {
background-color: #cc3700 !important;
}
.quitBtn:hover, .quitBtn:focus, .quitBtn:active {
background-color: #cc3700 !important;
}
.message {
margin: 15px 0 0;
font-size: 12px;
}
.message a {
color: #0035A5;
text-decoration: none;
}
.message a {
color: #0035A5;
text-decoration: none;
}
.register-form {
display: none;
@@ -111,16 +111,16 @@ button {
margin: 0 auto;
}
.container:before, .container:after {
content: "";
display: block;
clear: both;
}
.container:before, .container:after {
content: "";
display: block;
clear: both;
}
.container .info {
margin: 50px auto;
text-align: center;
}
.container .info {
margin: 50px auto;
text-align: center;
}
.info h1 {
margin: 0 0 15px;
@@ -135,17 +135,16 @@ button {
font-size: 12px;
}
.info span a {
color: #000000;
text-decoration: none;
}
.info span a {
color: #000000;
text-decoration: none;
}
.info span .fa {
color: #EF3B3A;
}
.info span .fa {
color: #EF3B3A;
}
body {
background: url(bg_gta_cnr.png);
font-family: "Roboto", sans-serif;
-webkit-font-smoothing: antialiased;
}