mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-19 18:47:03 +00:00
ui: Convert Layout to use Effects
This commit is contained in:
@@ -3,10 +3,12 @@ module Effect exposing
|
||||
, addRecent
|
||||
, append
|
||||
, batch
|
||||
, clearFlash
|
||||
, deleteMessage
|
||||
, disableRouting
|
||||
, enableRouting
|
||||
, focusModal
|
||||
, focusModalResult
|
||||
, getGreeting
|
||||
, getHeaderList
|
||||
, getMessage
|
||||
@@ -64,6 +66,7 @@ type ApiEffect msg
|
||||
type SessionEffect
|
||||
= FlashClear
|
||||
| FlashShow Session.Flash
|
||||
| ModalFocusResult Modal.Msg
|
||||
| RecentAdd String
|
||||
| RoutingDisable
|
||||
| RoutingEnable
|
||||
@@ -233,6 +236,9 @@ performSession ( session, effect ) =
|
||||
FlashShow flash ->
|
||||
( Session.showFlash flash session, Cmd.none )
|
||||
|
||||
ModalFocusResult result ->
|
||||
( Modal.updateSession result session, Cmd.none )
|
||||
|
||||
RoutingDisable ->
|
||||
( Session.disableRouting session, Cmd.none )
|
||||
|
||||
@@ -283,6 +289,11 @@ focusModal toMsg =
|
||||
ModalFocus toMsg
|
||||
|
||||
|
||||
focusModalResult : Modal.Msg -> Effect msg
|
||||
focusModalResult msg =
|
||||
SessionEffect (ModalFocusResult msg)
|
||||
|
||||
|
||||
deleteMessage : HttpResult msg -> String -> String -> Effect msg
|
||||
deleteMessage toMsg mailboxName id =
|
||||
ApiEffect (DeleteMessage toMsg mailboxName id)
|
||||
|
||||
Reference in New Issue
Block a user