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

@ -3,13 +3,11 @@ module Comp.EmailInput exposing
, Msg
, init
, update
, view
, view2
)
import Api
import Api.Model.ContactList exposing (ContactList)
import Comp.Dropdown
import Data.ContactType
import Data.DropdownStyle as DS
import Data.Flags exposing (Flags)
@ -136,69 +134,6 @@ update flags current msg model =
--- View
view : List String -> Model -> Html Msg
view values model =
div
[ classList
[ ( "ui search dropdown multiple selection", True )
, ( "open", model.menuOpen )
]
]
(List.map renderValue values
++ [ input
[ type_ "text"
, class "search long-search"
, placeholder "Recipients"
, onKeyUp KeyPress
, onInput SetInput
, value model.input
]
[]
, renderMenu model
]
)
renderValue : String -> Html Msg
renderValue str =
a
[ class "ui label"
, href "#"
, onClick (RemoveEmail str)
]
[ text str
, i [ class "delete icon" ] []
]
renderMenu : Model -> Html Msg
renderMenu model =
let
mkItem v =
a
[ classList
[ ( "item", True )
, ( "active", model.active == Just v )
]
, href "#"
, onClick (AddEmail v)
]
[ text v
]
in
div
[ classList
[ ( "menu", True )
, ( "transition visible", model.menuOpen )
]
]
(List.map mkItem model.candidates)
--- View2