reconnect clear prompt
This commit is contained in:
parent
57780416c8
commit
0bb10a65ed
@ -90,6 +90,9 @@ function registerEvents(registry, events) {
|
||||
ws.sendAccountCreate(USERNAME, PASSWORD);
|
||||
}
|
||||
|
||||
const existing = document.querySelector('#login'); // Selector of your toast
|
||||
if (existing) toast.hide({}, existing, 'reconnect');
|
||||
|
||||
toast.question({
|
||||
id: 'login',
|
||||
theme: 'dark',
|
||||
|
||||
@ -16,23 +16,6 @@ function createSocket(events) {
|
||||
|
||||
let gameStateTimeout;
|
||||
|
||||
function bootstrap() {
|
||||
send({ method: 'account_create', params: { name: 'ntr', password: 'grepgrepgrep' } });
|
||||
send({ method: 'cryp_spawn', params: { name: 'muji' } });
|
||||
send({ method: 'cryp_spawn', params: { name: 'drake' } });
|
||||
send({ method: 'cryp_spawn', params: { name: 'xray' } });
|
||||
}
|
||||
|
||||
function bootstrapMashy() {
|
||||
send({ method: 'account_create', params: { name: 'mashy', password: 'grepgrepgrep' } });
|
||||
send({ method: 'cryp_spawn', params: { name: 'maury' } });
|
||||
send({ method: 'cryp_spawn', params: { name: 'midshaker' } });
|
||||
send({ method: 'cryp_spawn', params: { name: 'artour' } });
|
||||
}
|
||||
|
||||
window.bootstrap = bootstrap;
|
||||
window.bootstrapMashy = bootstrapMashy;
|
||||
|
||||
function connect() {
|
||||
ws = new WebSocket(SOCKET_URL);
|
||||
ws.binaryType = 'arraybuffer';
|
||||
@ -44,7 +27,7 @@ function createSocket(events) {
|
||||
});
|
||||
|
||||
events.loginPrompt();
|
||||
// send({ method: 'account_login', params: { name: 'ntr', password: 'grepgrepgrep' } });
|
||||
send({ method: 'account_login', params: { name: 'ntr', password: 'grepgrepgrep' } });
|
||||
});
|
||||
|
||||
// Listen for messages
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user