Remove old ui code in frontend

This commit is contained in:
Eike Kettner
2021-03-09 20:16:05 +01:00
parent ee694dc719
commit b95338e744
90 changed files with 50 additions and 11038 deletions

View File

@ -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