Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace duration handler with special HTML elements if available #364

Open
kachick opened this issue Jul 12, 2023 · 0 comments
Open

Replace duration handler with special HTML elements if available #364

kachick opened this issue Jul 12, 2023 · 0 comments

Comments

@kachick
Copy link
Member

kachick commented Jul 12, 2023

emobu/src/Main.elm

Lines 526 to 560 in d192a47

newIntervalFields : Model -> Html Msg
newIntervalFields model =
let
( hoursOptions, minutesOptions, secondsOptions ) =
MobSession.newIntervalOptions model.intervalSeconds
optionsFormatter =
List.map
(\( val, selected ) -> option [ Attr.value val, Attr.selected selected ] [ text val ])
in
div [ Attr.class "interval-input" ]
[ text "/"
, space
, select
[ Attr.class "value-select"
, onInput (UpdateInterval MobSession.Hour)
, Attr.disabled model.mobbing
]
(hoursOptions |> optionsFormatter)
, text ":"
, select
[ Attr.class "value-select"
, onInput (UpdateInterval MobSession.Min)
, Attr.disabled model.mobbing
]
(minutesOptions |> optionsFormatter)
, text ":"
, select
[ Attr.class "value-select"
, onInput (UpdateInterval MobSession.Sec)
, Attr.disabled model.mobbing
]
(secondsOptions |> optionsFormatter)
]

whatwg/html#5488 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant