Make sign in work
This commit is contained in:
parent
303dddb12e
commit
2a6b255aee
@ -4,6 +4,7 @@ const $ = require("jquery");
|
||||
const socket = require("../socket");
|
||||
const storage = require("../localStorage");
|
||||
const utils = require("../utils");
|
||||
const templates = require("../../views");
|
||||
|
||||
socket.on("auth", function(data) {
|
||||
// If we reconnected and serverHash differs, that means the server restarted
|
||||
@ -17,11 +18,13 @@ socket.on("auth", function(data) {
|
||||
|
||||
utils.serverHash = data.serverHash;
|
||||
|
||||
const login = $("#sign-in");
|
||||
let token;
|
||||
const user = storage.get("user");
|
||||
|
||||
login.find(".btn").prop("disabled", false);
|
||||
const login = $("#sign-in")
|
||||
.html(templates.windows.sign_in())
|
||||
.find(".btn")
|
||||
.prop("disabled", false);
|
||||
|
||||
if (!data.success) {
|
||||
if (login.length === 0) {
|
||||
|
@ -21,7 +21,6 @@ module.exports = {
|
||||
},
|
||||
|
||||
windows: {
|
||||
loading: require("./windows/loading.tpl"),
|
||||
sign_in: require("./windows/sign_in.tpl"),
|
||||
},
|
||||
|
||||
|
@ -1,13 +0,0 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<h1 class="title">The Lounge is loading…</h1>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<p id="loading-page-message">Loading the app… <a href="http://enable-javascript.com/" target="_blank" rel="noopener">Make sure to have JavaScript enabled.</a></p>
|
||||
<div id="loading-slow">
|
||||
<p>This is taking longer than it should, there might be connectivity issues.</p>
|
||||
<button id="loading-slow-reload" class="btn">Reload page</button>
|
||||
</div>
|
||||
<script async src="js/loading-slow-alert.js"></script>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user