diff --git a/Client/Login/login.html b/Client/Login/login.html index 61d492e1..35d14c3f 100644 --- a/Client/Login/login.html +++ b/Client/Login/login.html @@ -7,10 +7,7 @@ - - - - + diff --git a/Client/Login/main.js b/Client/Login/main.js index b10cf16e..abd8c73c 100644 --- a/Client/Login/main.js +++ b/Client/Login/main.js @@ -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 + `\`)`); +} diff --git a/Client/Login/style.css b/Client/Login/style.css index 2405799c..9148ee72 100644 --- a/Client/Login/style.css +++ b/Client/Login/style.css @@ -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; }