mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-21 03:27:01 +00:00
ui: Add friendly date to Mailbox message view
- Refactor some date stuff
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
module Data.Message exposing (..)
|
||||
|
||||
import Data.Date exposing (date)
|
||||
import Date exposing (Date)
|
||||
import Json.Decode as Decode exposing (..)
|
||||
import Json.Decode.Pipeline exposing (..)
|
||||
|
||||
@@ -10,7 +12,7 @@ type alias Message =
|
||||
, from : String
|
||||
, to : List String
|
||||
, subject : String
|
||||
, date : String
|
||||
, date : Date
|
||||
, size : Int
|
||||
, seen : Bool
|
||||
, text : String
|
||||
@@ -34,7 +36,7 @@ decoder =
|
||||
|> optional "from" string ""
|
||||
|> required "to" (list string)
|
||||
|> optional "subject" string ""
|
||||
|> required "date" string
|
||||
|> required "date" date
|
||||
|> required "size" int
|
||||
|> required "seen" bool
|
||||
|> required "text" string
|
||||
|
||||
Reference in New Issue
Block a user