summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/style.css1
-rw-r--r--elm/UList/LabelEdit.elm8
-rw-r--r--elm/UList/VNPage.elm10
-rw-r--r--elm/UList/VoteEdit.elm8
4 files changed, 14 insertions, 13 deletions
diff --git a/data/style.css b/data/style.css
index f6c5976a..a5b201f7 100644
--- a/data/style.css
+++ b/data/style.css
@@ -105,6 +105,7 @@ div.warning h2, div.notice h2 { font-size: 13px; font-weight: bold; margin: 0; }
.elm_dd > div > ul li p { white-space: normal; padding: 3px 5px 3px 3px }
.maintabs .elm_dd > a { box-sizing: border-box; height: 21px; padding: 1px 15px 0 7px; border: 1px solid $border$; border-bottom: none; background-color: $tabbg$; color: $maintext$ }
.elm_votedd .elm_dd > div > ul li { text-align: left }
+.elm_dd_input .elm_dd > a { background-color: $secbg$; color: $maintext$; border: 1px solid $secborder$; font: 14px "Tahoma", "Arial", sans-serif; padding: 1px 15px 1px 2px; margin: -1px }
diff --git a/elm/UList/LabelEdit.elm b/elm/UList/LabelEdit.elm
index 775ef24c..1011d950 100644
--- a/elm/UList/LabelEdit.elm
+++ b/elm/UList/LabelEdit.elm
@@ -19,7 +19,7 @@ main : Program GLE.Recv Model Msg
main = Browser.element
{ init = \f -> (init f, Cmd.none)
, subscriptions = \model -> DD.sub model.dd
- , view = view
+ , view = \m -> view m "-"
, update = update
}
@@ -79,8 +79,8 @@ update msg model =
Saved l b e -> ({ model | state = Dict.insert l (Api.Error e) model.state }, Cmd.none)
-view : Model -> Html Msg
-view model =
+view : Model -> String -> Html Msg
+view model txt =
let
str = String.join ", " <| List.filterMap (\l -> if l.id /= 7 && Set.member l.id model.sel then Just l.label else Nothing) model.labels
@@ -98,5 +98,5 @@ view model =
in
DD.view model.dd
(if List.any (\s -> s == Api.Loading) <| Dict.values model.state then Api.Loading else Api.Normal)
- (text <| if str == "" then "-" else str)
+ (text <| if str == "" then txt else str)
(\_ -> [ ul [] <| List.map item <| List.filter (\l -> l.id /= 7) model.labels ])
diff --git a/elm/UList/VNPage.elm b/elm/UList/VNPage.elm
index 1b241a74..8e827224 100644
--- a/elm/UList/VNPage.elm
+++ b/elm/UList/VNPage.elm
@@ -96,7 +96,7 @@ isPublic model =
view : Model -> Html Msg
view model =
- div [ class "ulistvn" ]
+ div [ class "ulistvn elm_dd_input" ]
[ span [] <|
case (model.state, model.del, model.onlist) of
(Api.Loading, _, _) -> [ span [ class "spinner" ] [] ]
@@ -115,13 +115,13 @@ view model =
, b [] [ text "User options" ]
, table [ style "margin" "4px 0 0 0" ]
[ tr [ class "odd" ]
- [ td [ class "key" ] [ text "Labels" ]
- , td [ colspan 2 ] [ Html.map Labels (LE.view model.labels) ]
+ [ td [ class "key" ] [ text "My labels" ]
+ , td [ colspan 2 ] [ Html.map Labels (LE.view model.labels "- select label -") ]
]
, if model.flags.canvote || (Maybe.withDefault "-" model.flags.vote /= "-")
then tr [ class "nostripe compact" ]
- [ td [] [ text "Vote" ]
- , td [ style "width" "80px" ] [ Html.map Vote (VE.view model.vote) ]
+ [ td [] [ text "My vote" ]
+ , td [ style "width" "80px" ] [ Html.map Vote (VE.view model.vote "- vote -") ]
, td [] []
]
else text ""
diff --git a/elm/UList/VoteEdit.elm b/elm/UList/VoteEdit.elm
index aa5d6027..2ecdde10 100644
--- a/elm/UList/VoteEdit.elm
+++ b/elm/UList/VoteEdit.elm
@@ -19,7 +19,7 @@ main : Program GVE.Send Model Msg
main = Browser.element
{ init = \f -> (init f, Cmd.none)
, subscriptions = \model -> DD.sub model.dd
- , view = view
+ , view = \m -> view m "-"
, update = update
}
@@ -80,11 +80,11 @@ update msg model =
Saved e -> ({ model | state = Api.Error e }, Cmd.none)
-view : Model -> Html Msg
-view model =
+view : Model -> String -> Html Msg
+view model txt =
div [ class "elm_votedd" ]
[ DD.view model.dd model.state
- (text <| Maybe.withDefault "-" model.ovote)
+ (text <| Maybe.withDefault txt model.ovote)
<| \_ ->
[ ul [] <|
List.indexedMap (\n s ->