summaryrefslogtreecommitdiff
path: root/elm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2022-08-30 10:42:09 +0200
committerYorhel <git@yorhel.nl>2022-08-30 10:42:09 +0200
commit34fabe3ebeb17119aac578bcb224fd9c74fb93ea (patch)
tree7551db74b71973577496e50d8d293c0ba8487122 /elm
parentfcab0435c90414b60566b3d8c424a0263d0ce0e4 (diff)
Rename users_prefs_tags.tag -> tid, add update script
Diffstat (limited to 'elm')
-rw-r--r--elm/User/Edit.elm6
1 files changed, 3 insertions, 3 deletions
diff --git a/elm/User/Edit.elm b/elm/User/Edit.elm
index ca427000..5f32f588 100644
--- a/elm/User/Edit.elm
+++ b/elm/User/Edit.elm
@@ -294,10 +294,10 @@ update msg model =
let (nm, c, res) = A.update tagpConfig m model.tagpSearch
in case (res, model.prefs) of
(Just t, Just p) ->
- if t.hidden || List.any (\l -> l.tag == t.id) p.tagprefs
+ if t.hidden || List.any (\l -> l.tid == t.id) p.tagprefs
then ({ model | tagpSearch = A.clear nm "" }, c)
else
- let np = { p | tagprefs = p.tagprefs ++ [{ tag = t.id, name = t.name, spoil = 0, childs = False }] }
+ let np = { p | tagprefs = p.tagprefs ++ [{ tid = t.id, name = t.name, spoil = 0, childs = False }] }
in ({ model | saved = False, tagpSearch = A.clear nm "", prefs = Just np }, c)
_ -> ({ model | tagpSearch = nm }, c)
@@ -472,7 +472,7 @@ view model =
[ formField "Tags"
[ if List.isEmpty m.tagprefs then text ""
else table [] <| List.indexedMap (\i t -> tr []
- [ td [] [ a [ href <| "/" ++ t.tag ] [ text t.name ] ]
+ [ td [] [ a [ href <| "/" ++ t.tid ] [ text t.name ] ]
, td [] [ inputSelect "" t.spoil (Prefs << TagPSpoil i) [ style "width" "200px" ]
[ (-1, "Always show & highlight")
, (0, "Always show")