LS client waits for socket.onopen.
parent
e8ace8a6eb
commit
1270408aca
|
@ -12,6 +12,7 @@ LoginForm = (args) ->
|
||||||
self = {
|
self = {
|
||||||
on-login: args.on-login || ->
|
on-login: args.on-login || ->
|
||||||
on-error: args.on-error || ->
|
on-error: args.on-error || ->
|
||||||
|
schedule-render: args.schedule-render || ->
|
||||||
current-view: "login"
|
current-view: "login"
|
||||||
|
|
||||||
enable-registration: args.enable-registration || false
|
enable-registration: args.enable-registration || false
|
||||||
|
@ -22,7 +23,7 @@ LoginForm = (args) ->
|
||||||
password: ""
|
password: ""
|
||||||
repeat-password: ""
|
repeat-password: ""
|
||||||
}
|
}
|
||||||
locked-input: false
|
locked-input: true
|
||||||
|
|
||||||
error: void
|
error: void
|
||||||
|
|
||||||
|
@ -34,6 +35,10 @@ LoginForm = (args) ->
|
||||||
|
|
||||||
auth-ws = AuthWS self.authws-url
|
auth-ws = AuthWS self.authws-url
|
||||||
|
|
||||||
|
auth-ws.socket.onopen = ->
|
||||||
|
self.locked-input := false
|
||||||
|
self.schedule-render!
|
||||||
|
|
||||||
auth-ws.user-on-socket-error.push (...) ->
|
auth-ws.user-on-socket-error.push (...) ->
|
||||||
self.error = "socket error"
|
self.error = "socket error"
|
||||||
self.on-error ...
|
self.on-error ...
|
||||||
|
|
Loading…
Reference in New Issue