mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
Merge branch 'feature/websocket' of https://bitbucket.org/equilibriumito/gabinete-digital into feature/websocket
This commit is contained in:
@@ -40,7 +40,7 @@ export class LoginPage implements OnInit {
|
|||||||
private clearStoreService: ClearStoreService,
|
private clearStoreService: ClearStoreService,
|
||||||
private changeProfileService: ChangeProfileService,
|
private changeProfileService: ChangeProfileService,
|
||||||
public ThemeService: ThemeService,
|
public ThemeService: ThemeService,
|
||||||
private storageservice: StorageService,
|
private storageservice: StorageService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export class AuthService {
|
|||||||
headers: HttpHeaders;
|
headers: HttpHeaders;
|
||||||
public ValidatedUser: UserSession;
|
public ValidatedUser: UserSession;
|
||||||
public wsValidatedUserChat:any;
|
public wsValidatedUserChat:any;
|
||||||
public ValidatedUserChat:any;
|
public ValidatedUserChat:any = {}
|
||||||
public isWsAuthenticated: boolean = false;
|
public isWsAuthenticated: boolean = false;
|
||||||
opts:any;
|
opts:any;
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,10 @@ export class WsChatService {
|
|||||||
constructor() {}
|
constructor() {}
|
||||||
|
|
||||||
connect() {
|
connect() {
|
||||||
if(this.ws.connected == true) { return false }
|
// dont connect if is already connected
|
||||||
|
if(this.ws.connected == true) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
this.ws.connect();
|
this.ws.connect();
|
||||||
|
|
||||||
@@ -43,8 +46,12 @@ export class WsChatService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
login() {
|
login() {
|
||||||
|
// dont login if is already login
|
||||||
if(this.isLogin == true) { return new Promise((resolve, reject)=>{ resolve(this.loginResponse) }) }
|
if(this.isLogin == true) {
|
||||||
|
return new Promise((resolve, reject)=>{
|
||||||
|
resolve(this.loginResponse)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const requestId = uuidv4()
|
const requestId = uuidv4()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user