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

@ -4,7 +4,6 @@ module Comp.CalEventInput exposing
, init
, initDefault
, update
, view
, view2
)
@ -127,153 +126,6 @@ update flags ev msg model =
--- View
view : String -> CalEvent -> Model -> Html Msg
view extraClasses ev model =
let
yearLen =
Basics.max 4 (String.length ev.year)
otherLen str =
Basics.max 2 (String.length str)
in
div
[ classList
[ ( extraClasses, True )
]
]
[ div [ class "calevent-input" ]
[ div []
[ label [] [ text "Weekday" ]
, input
[ type_ "text"
, class "time-input"
, size
(Maybe.map otherLen ev.weekday
|> Maybe.withDefault 4
)
, Maybe.withDefault "" ev.weekday
|> value
, onInput SetWeekday
]
[]
]
, div []
[ label [] [ text "Year" ]
, input
[ type_ "text"
, class "time-input"
, size yearLen
, value ev.year
, onInput SetYear
]
[]
]
, div [ class "date separator" ]
[ text ""
]
, div []
[ label [] [ text "Month" ]
, input
[ type_ "text"
, class "time-input"
, size (otherLen ev.month)
, value ev.month
, onInput SetMonth
]
[]
]
, div [ class "date separator" ]
[ text ""
]
, div []
[ label [] [ text "Day" ]
, input
[ type_ "text"
, class "time-input"
, size (otherLen ev.day)
, value ev.day
, onInput SetDay
]
[]
]
, div [ class "datetime separator" ]
[ text " "
]
, div []
[ label [] [ text "Hour" ]
, input
[ type_ "text"
, class "time-input"
, size (otherLen ev.hour)
, value ev.hour
, onInput SetHour
]
[]
]
, div [ class "time separator" ]
[ text ":"
]
, div []
[ label [] [ text "Minute" ]
, input
[ type_ "text"
, class "time-input"
, size (otherLen ev.minute)
, value ev.minute
, onInput SetMinute
]
[]
]
]
, div
[ classList
[ ( "ui basic red pointing label", True )
, ( "hidden invisible", not (isCheckError model) )
]
]
[ text "Error: "
, Maybe.map .message model.checkResult
|> Maybe.withDefault ""
|> text
]
, div
[ classList
[ ( "ui message", True )
, ( "hidden invisible"
, model.checkResult == Nothing || isCheckError model
)
]
]
[ dl []
[ dt []
[ text "Schedule: "
]
, dd []
[ code []
[ Maybe.andThen .event model.checkResult
|> Maybe.withDefault ""
|> text
]
]
, dt []
[ text "Next: "
]
, dd []
(Maybe.map .next model.checkResult
|> Maybe.withDefault []
|> List.map Util.Time.formatDateTime
|> List.map text
|> List.intersperse (br [] [])
)
]
]
]
--- View2