@@ -495,17 +495,12 @@ module App =
495 let mapCmd cmdMsg =
495 let mapCmd cmdMsg =
496 match cmdMsg with
496 match cmdMsg with
497 | CmdConnect(url, identity) ->
497 | CmdConnect(url, identity) ->
499− (fun (url, id) -> authenticate url id)
498+ Cmd.OfAsync.either (fun (url, id) -> authenticate url id) (url, identity) AuthOk (fun ex ->
502− (fun ex -> AuthErr ex.Message)
499+ AuthErr ex.Message)
504 | CmdSend(session, recipientHex, envelope) ->
501 | CmdSend(session, recipientHex, envelope) ->
506− (fun (s, r, e) -> sendEnvelope s r e)
507− (session, recipientHex, envelope)
502+ Cmd.OfAsync.attempt (fun (s, r, e) -> sendEnvelope s r e) (session, recipientHex, envelope) (fun ex ->
508− (fun ex -> SendFailed ex.Message)
503+ SendFailed ex.Message)
510 | CmdPoll(session, cursor) ->
505 | CmdPoll(session, cursor) ->
511 Cmd.ofEffect (fun dispatch ->
506 Cmd.ofEffect (fun dispatch ->
@@ -650,13 +645,10 @@ module App =
650 (VStack(spacing = 24.) {
645 (VStack(spacing = 24.) {
651 Image("logo.png").margin(8, 0).maximumWidth (300)
646 Image("logo.png").margin(8, 0).maximumWidth (300)
653− Label("Skrepka").font(size = 32.).centerTextHorizontal ()
648+ Label("Skrepka").font(size = 32., fontFamily = "UnboundedBold").centerTextHorizontal ()
654−
649+ BoxView(Colors.Transparent).height (50)
655− Label("End-to-end encrypted messaging").font(size = 16.).centerTextHorizontal ()
658 button "Next" GenIdentity
651 button "Next" GenIdentity
659− Button("Generate Identity", GenIdentity).centerHorizontal ()
661 .padding(30.)
653 .padding(30.)
662 .centerVertical ()
654 .centerVertical ()