Admin controller draft
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 46 KiB |
@@ -54,6 +54,7 @@
|
||||
"2p_velvet_duress": "Velvet Duress (2)",
|
||||
"2p_fraziersdemise": "Fraziers Demise (2)",
|
||||
"2p_vortex_plateau": "Vortex Plateau (2)",
|
||||
"2p_chaos_gate": "Chaos gate (2)",
|
||||
"2p_valley_of_khorne": "Valley of Khorne (2)",
|
||||
"2p_tiboraxx":"Tiboraxx (2)",
|
||||
"3p_fortress": "Fortress (3)",
|
||||
|
||||
@@ -45,8 +45,8 @@ window.onload = function() {
|
||||
'</button>';
|
||||
|
||||
return memo + '<tr>\n' +
|
||||
' <td>'+ lobby.user1Info.name +'</td>\n' +
|
||||
' <td>'+ lobby.user2Info.name +'</td>\n' +
|
||||
' <td>'+ lobby.user1Info.name.substring(0, 20) +'</td>\n' +
|
||||
' <td>'+ lobby.user2Info.name.substring(0, 20) +'</td>\n' +
|
||||
' <td>'+ lobby.status +'</td>\n' +
|
||||
' <td>' + joinButton + ' ' + observerButton +
|
||||
' </td>' +
|
||||
@@ -81,13 +81,6 @@ window.onload = function() {
|
||||
}));
|
||||
});
|
||||
|
||||
$("#updateDecider").click(function(event) {
|
||||
event.preventDefault();
|
||||
ws.send(JSON.stringify({
|
||||
type: "updateDecider"
|
||||
}));
|
||||
});
|
||||
|
||||
$("#submitmsg").click(function(event) {
|
||||
sendMessage();
|
||||
});
|
||||
@@ -105,6 +98,7 @@ window.onload = function() {
|
||||
}));
|
||||
$("#decider").hide();
|
||||
$("#lobbies").show();
|
||||
$(".navbar").show();
|
||||
});
|
||||
|
||||
if($.cookie('user')=== undefined){
|
||||
@@ -157,9 +151,12 @@ window.onload = function() {
|
||||
type: "userName",
|
||||
name: $.cookie('user')
|
||||
}));
|
||||
ws.send(JSON.stringify({
|
||||
type: "getLobbies"
|
||||
}));
|
||||
}
|
||||
|
||||
let timerId = setInterval(() =>
|
||||
var timerId = setInterval(() =>
|
||||
ws.send(JSON.stringify({
|
||||
type: "getLobbies"
|
||||
})), 2000);
|
||||
@@ -168,6 +165,7 @@ window.onload = function() {
|
||||
function changeNick() {
|
||||
result = prompt("Введите ник", $.cookie('user'));
|
||||
if(result == null) return;
|
||||
result = result.substr(0, 20);
|
||||
$.cookie('user', result, { expires: 7 });
|
||||
ws.send(JSON.stringify({
|
||||
type: "userName",
|
||||
@@ -195,6 +193,9 @@ function disconnectLobby(error) {
|
||||
$("#decider").hide();
|
||||
$(".navbar").show();
|
||||
$("#lobbies").show();
|
||||
ws.send(JSON.stringify({
|
||||
type: "getLobbies"
|
||||
}));
|
||||
alert(error);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user