summaryrefslogtreecommitdiff
path: root/elm/UList/Widget.elm
diff options
context:
space:
mode:
Diffstat (limited to 'elm/UList/Widget.elm')
-rw-r--r--elm/UList/Widget.elm17
1 files changed, 8 insertions, 9 deletions
diff --git a/elm/UList/Widget.elm b/elm/UList/Widget.elm
index ec4375a5..ac5e0d70 100644
--- a/elm/UList/Widget.elm
+++ b/elm/UList/Widget.elm
@@ -222,8 +222,8 @@ viewStatus : Model -> List (Html Msg)
viewStatus model =
case (model.loadState, model.del, model.onlist) of
(Api.Loading, _, _) -> [ span [ class "spinner" ] [] ]
- (Api.Error e, _, _) -> [ b [ class "standout" ] [ text <| Api.showResponse e ] ]
- (_, _, False) -> [ b [ class "grayedout" ] [ text "not on your list" ] ]
+ (Api.Error e, _, _) -> [ b [] [ text <| Api.showResponse e ] ]
+ (_, _, False) -> [ small [] [ text "not on your list" ] ]
(_, True, _) ->
[ a [ onClickD Delete ] [ text "Yes, delete" ]
, text " | "
@@ -248,15 +248,14 @@ view : Model -> Html Msg
view model =
let
icon () =
- let fn = if not model.onlist then "add"
+ let fn = if not model.onlist then -1
else List.range 1 6
|> List.filter (\n -> Set.member n model.labels.tsel)
|> List.maximum
- |> Maybe.map (\n -> "l" ++ String.fromInt n)
- |> Maybe.withDefault "unknown"
+ |> Maybe.withDefault 0
lbl = if not model.onlist then "Add to list"
else String.join ", " <| List.filterMap (\l -> if Set.member l.id model.labels.tsel && l.id /= 7 then Just l.label else Nothing) model.labels.labels
- in img [ src (Ffi.urlStatic ++ "/f/list-" ++ fn ++ ".svg"), class ("ulist-widget-icon liststatus_icon "++fn), title lbl, onClickN (Open True) ] []
+ in span [ onClickN (Open True), class "ulist-widget-icon" ] [ ulistIcon fn lbl ]
rel r =
case Dict.get r.rid model.relNfo of
@@ -271,7 +270,7 @@ view model =
<| List.map platformIcon nfo.platforms
++ List.map langIcon nfo.lang
++ [ releaseTypeIcon nfo.rtype ]
- , td [ class "tco4" ] [ a [ href ("/"++nfo.id), title nfo.original ] [ text nfo.title ] ]
+ , td [ class "tco4" ] [ a [ href ("/"++nfo.id), title nfo.alttitle ] [ text nfo.title ] ]
]
box () =
@@ -293,7 +292,7 @@ view model =
, td [] <|
[ textarea ([ rows 2, cols 40, onInput Notes, onBlur (NotesSave model.notesRev)] ++ GVN.valNotes) [ text model.notes ]
] ++ case model.notesState of
- Api.Error e -> [ br [] [], b [ class "standout" ] [ text <| Api.showResponse e ] ]
+ Api.Error e -> [ br [] [], b [] [ text <| Api.showResponse e ] ]
_ -> []
]
]
@@ -312,6 +311,6 @@ view model =
[ div [ id "ulist-widget-box" ] <|
case model.loadState of
Api.Loading -> [ div [ class "spinner" ] [] ]
- Api.Error e -> [ b [ class "standout" ] [ text <| Api.showResponse e ] ]
+ Api.Error e -> [ b [] [ text <| Api.showResponse e ] ]
Api.Normal -> box () ]
else icon ()