Login errors are now displayed, although crudely.
This commit is contained in:
parent
04a3d5119a
commit
10891d193d
@ -512,6 +512,8 @@ socket.on-message = (event) ->
|
||||
when "user"
|
||||
if message.user
|
||||
model.users[message.user.uid] := message.user
|
||||
when "login-error"
|
||||
model.login-error = message.error
|
||||
else
|
||||
console.log "RECEIVED UNKNOWN MESSAGE TYPE: #{message.type}"
|
||||
|
||||
@ -544,6 +546,10 @@ renderer = ->
|
||||
when "login"
|
||||
h \div.container [
|
||||
h \div.box [
|
||||
if model.login-error
|
||||
h \div.notification.is-danger [
|
||||
model.login-error
|
||||
]
|
||||
h \form [
|
||||
bulma.field [
|
||||
bulma.label "Login"
|
||||
@ -569,6 +575,7 @@ renderer = ->
|
||||
onclick: (e) ->
|
||||
e.prevent-default!
|
||||
|
||||
model.login-error = undefined
|
||||
socket.login model.login, model.password
|
||||
} [ "Letsu go!" ]
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user