mirror of
https://github.com/pierre42100/ComunicWeb
synced 2025-06-19 12:25:16 +00:00
Block page loading while WebSocket is not connected
This commit is contained in:
@ -151,7 +151,7 @@ ComunicWeb.user.userLogin = {
|
||||
};
|
||||
|
||||
//What to do after the request is completed
|
||||
var afterAPIrequest = function(result){
|
||||
const afterAPIrequest = async function(result){
|
||||
//Prepare data return
|
||||
var loginstate = false;
|
||||
|
||||
@ -178,7 +178,8 @@ ComunicWeb.user.userLogin = {
|
||||
ComunicWeb.components.mailCaching.set(usermail);
|
||||
|
||||
// Initialize websocket
|
||||
UserWebSocket.Connect();
|
||||
await UserWebSocket.Connect();
|
||||
await UserWebSocket.WaitForConnected();
|
||||
}
|
||||
|
||||
//Perform next action if login failed
|
||||
|
Reference in New Issue
Block a user