1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-19 10:37:01 +00:00

ui: Add request context for error flash

- webui: Update mailbox, attachment paths
This commit is contained in:
James Hillyerd
2018-12-15 20:16:20 -08:00
parent 6fd13a5215
commit caec5e7c17
12 changed files with 247 additions and 86 deletions

View File

@@ -101,8 +101,8 @@ subscriptions model =
type Msg
= MetricsReceived (Result Http.Error Metrics)
| ServerConfigLoaded (Result Http.Error ServerConfig)
= MetricsReceived (Result HttpUtil.Error Metrics)
| ServerConfigLoaded (Result HttpUtil.Error ServerConfig)
| Tick Posix
@@ -113,13 +113,13 @@ update session msg model =
( updateMetrics metrics model, Cmd.none, Session.none )
MetricsReceived (Err err) ->
( model, Cmd.none, Session.SetFlash (HttpUtil.errorString err) )
( model, Cmd.none, Session.SetFlash (HttpUtil.errorFlash err) )
ServerConfigLoaded (Ok config) ->
( { model | config = Just config }, Cmd.none, Session.none )
ServerConfigLoaded (Err err) ->
( model, Cmd.none, Session.SetFlash (HttpUtil.errorString err) )
( model, Cmd.none, Session.SetFlash (HttpUtil.errorFlash err) )
Tick time ->
( { model | now = time }, Api.getServerMetrics MetricsReceived, Session.none )