Login component now raises LoginComplete message.
[?]
Apr 22, 2017, 4:47 AM
TKGBRIQT7XCPJ3LA5JAEMMGMPFWQWINMSDRW76V2IMZZGT5AWTYACDependencies
- [2]
JXG3FCXYUpgrade ps + halogen versions. - [3]
ARX7SHY5Begin work on login UI. - [4]
QQXR7DTORework login component to use more appropriate Bootstrap theme. - [5]
RB2ETNIFAdd skeletal PureScript client project. - [6]
EA5BFM5GSplit Login component into its own module. - [*]
HO2PFRABClient login now handles response correctly.
Change contents
- replacement in client/bower.json at line 19
"purescript-now": "^2.0.0""purescript-now": "^2.0.0","purescript-routing": "^4.0.0","purescript-uuid": "^3.0.0" - replacement in client/src/Aftok/Login.purs at line 3
import Prelude (type (~>), Void, bind, pure, ($), ($>), (<$>), const)import Prelude (type (~>), bind, pure, ($), ($>), (<$>), const) - replacement in client/src/Aftok/Login.purs at line 22
type LoginState = { username :: String, password :: String }data LoginResponse= OK| Forbidden| Error { status :: StatusCode, message :: String }type LoginState ={ username :: String, password :: String, loginResponse :: Maybe LoginResponse} - replacement in client/src/Aftok/Login.purs at line 34
initialState = { username: "", password: "" }initialState = { username: "", password: "", loginResponse: Nothing } - edit in client/src/Aftok/Login.purs at line 45
data LoginComplete = LoginComplete - replacement in client/src/Aftok/Login.purs at line 48
ui :: forall eff. H.Component HH.HTML LoginAction LoginState Void (Aff (LoginEffects eff))ui :: forall eff. H.Component HH.HTML LoginAction LoginState LoginComplete (Aff (LoginEffects eff)) - replacement in client/src/Aftok/Login.purs at line 92
eval :: LoginAction ~> H.ComponentDSL LoginState LoginAction Void (Aff (LoginEffects eff))eval :: LoginAction ~> H.ComponentDSL LoginState LoginAction LoginComplete (Aff (LoginEffects eff)) - replacement in client/src/Aftok/Login.purs at line 96
result <- H.liftAff (login user pass)response <- H.liftAff (login user pass)case response ofOK -> H.raise LoginComplete_ -> H.put { username: "", password: "", loginResponse: Just response } - edit in client/src/Aftok/Login.purs at line 102
data LoginResponse= OK| Forbidden| Error { status :: StatusCode, message :: String } - replacement in client/src/Main.purs at line 3
import Prelude (Unit, bind, ($))import Prelude (Unit, bind, ($), (<$), (<$>), (*>), (<<<)) - edit in client/src/Main.purs at line 5
import Control.Alt ((<|>)) - edit in client/src/Main.purs at line 8
import Data.Maybe (maybe)import Data.UUID (UUID, parseUUID)import Routing.Match (Match)import Routing.Match.Class (lit, str) - edit in client/src/Main.purs at line 18
import Aftok.Login as L - edit in client/src/Main.purs at line 21[3.1190][8.1159]
import Aftok.Login as L - edit in client/src/Main.purs at line 29[2.7170]
data ARoute= Home| Login| Project UUID| NotFoundrouting :: Match ARouterouting = Home <$ lit ""<|> Login <$ (lit "" *> lit "login")<|> (maybe NotFound Project <<< parseUUID) <$> (lit "" *> lit "project" *> str)