mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-23 19:08:26 +00:00
Remove old ui code in frontend
This commit is contained in:
@ -5,7 +5,6 @@ module Comp.SentMails exposing
|
||||
, initMails
|
||||
, isEmpty
|
||||
, update
|
||||
, view
|
||||
, view2
|
||||
)
|
||||
|
||||
@ -57,88 +56,6 @@ update msg model =
|
||||
|
||||
|
||||
|
||||
--- View
|
||||
|
||||
|
||||
view : Model -> Html Msg
|
||||
view model =
|
||||
case model.selected of
|
||||
Just mail ->
|
||||
div [ class "ui blue basic segment" ]
|
||||
[ div [ class "ui list" ]
|
||||
[ div [ class "item" ]
|
||||
[ text "From"
|
||||
, div [ class "header" ]
|
||||
[ text mail.sender
|
||||
, text " ("
|
||||
, text mail.connection
|
||||
, text ")"
|
||||
]
|
||||
]
|
||||
, div [ class "item" ]
|
||||
[ text "Date"
|
||||
, div [ class "header" ]
|
||||
[ Util.Time.formatDateTime mail.created |> text
|
||||
]
|
||||
]
|
||||
, div [ class "item" ]
|
||||
[ text "Recipients"
|
||||
, div [ class "header" ]
|
||||
[ String.join ", " mail.recipients |> text
|
||||
]
|
||||
]
|
||||
, div [ class "item" ]
|
||||
[ text "Subject"
|
||||
, div [ class "header" ]
|
||||
[ text mail.subject
|
||||
]
|
||||
]
|
||||
]
|
||||
, div [ class "ui horizontal divider" ] []
|
||||
, div [ class "mail-body" ]
|
||||
[ text mail.body
|
||||
]
|
||||
, a
|
||||
[ class "ui right corner label"
|
||||
, onClick Hide
|
||||
, href "#"
|
||||
]
|
||||
[ i [ class "close icon" ] []
|
||||
]
|
||||
]
|
||||
|
||||
Nothing ->
|
||||
table [ class "ui selectable pointer very basic table" ]
|
||||
[ thead []
|
||||
[ tr []
|
||||
[ th [ class "collapsing" ] [ text "Recipients" ]
|
||||
, th [] [ text "Subject" ]
|
||||
, th [ class "collapsible" ] [ text "Sent" ]
|
||||
, th [ class "collapsible" ] [ text "Sender" ]
|
||||
]
|
||||
]
|
||||
, tbody [] <|
|
||||
List.map
|
||||
renderLine
|
||||
model.mails
|
||||
]
|
||||
|
||||
|
||||
renderLine : SentMail -> Html Msg
|
||||
renderLine mail =
|
||||
tr [ onClick (Show mail) ]
|
||||
[ td [ class "collapsing" ]
|
||||
[ String.join ", " mail.recipients |> text
|
||||
]
|
||||
, td [] [ text mail.subject ]
|
||||
, td [ class "collapsing" ]
|
||||
[ Util.Time.formatDateTime mail.created |> text
|
||||
]
|
||||
, td [ class "collapsing" ] [ text mail.sender ]
|
||||
]
|
||||
|
||||
|
||||
|
||||
--- View2
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user