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:
@ -4,7 +4,6 @@ module Comp.EmailSettingsTable exposing
|
||||
, emptyModel
|
||||
, init
|
||||
, update
|
||||
, view
|
||||
, view2
|
||||
)
|
||||
|
||||
@ -12,7 +11,6 @@ import Api.Model.EmailSettings exposing (EmailSettings)
|
||||
import Comp.Basic as B
|
||||
import Html exposing (..)
|
||||
import Html.Attributes exposing (..)
|
||||
import Html.Events exposing (onClick)
|
||||
import Styles as S
|
||||
|
||||
|
||||
@ -46,46 +44,6 @@ update msg model =
|
||||
|
||||
|
||||
|
||||
--- View
|
||||
|
||||
|
||||
view : Model -> Html Msg
|
||||
view model =
|
||||
table [ class "ui selectable pointer table" ]
|
||||
[ thead []
|
||||
[ tr []
|
||||
[ th [ class "collapsible" ] [ text "Name" ]
|
||||
, th [] [ text "Host/Port" ]
|
||||
, th [] [ text "From" ]
|
||||
]
|
||||
]
|
||||
, tbody []
|
||||
(List.map (renderLine model) model.emailSettings)
|
||||
]
|
||||
|
||||
|
||||
renderLine : Model -> EmailSettings -> Html Msg
|
||||
renderLine model ems =
|
||||
let
|
||||
hostport =
|
||||
case ems.smtpPort of
|
||||
Just p ->
|
||||
ems.smtpHost ++ ":" ++ String.fromInt p
|
||||
|
||||
Nothing ->
|
||||
ems.smtpHost
|
||||
in
|
||||
tr
|
||||
[ classList [ ( "active", model.selected == Just ems ) ]
|
||||
, onClick (Select ems)
|
||||
]
|
||||
[ td [ class "collapsible" ] [ text ems.name ]
|
||||
, td [] [ text hostport ]
|
||||
, td [] [ text ems.from ]
|
||||
]
|
||||
|
||||
|
||||
|
||||
--- View2
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user