mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 13:47:58 +01:00
stringify boolean values in js datastore
This commit is contained in:
parent
6cd71673fe
commit
8c7f633b18
1 changed files with 4 additions and 4 deletions
|
@ -45,14 +45,14 @@ defmodule PhilomenaWeb.LayoutView do
|
||||||
user_name: if(user, do: user.name, else: nil),
|
user_name: if(user, do: user.name, else: nil),
|
||||||
user_slug: if(user, do: user.slug, else: nil),
|
user_slug: if(user, do: user.slug, else: nil),
|
||||||
user_is_signed_in: if(user, do: "true", else: "false"),
|
user_is_signed_in: if(user, do: "true", else: "false"),
|
||||||
user_can_edit_filter: if(user, do: filter.user_id == user.id, else: "false"),
|
user_can_edit_filter: if(user, do: filter.user_id == user.id, else: "false") |> to_string(),
|
||||||
spoiler_type: if(user, do: user.spoiler_type, else: "static"),
|
spoiler_type: if(user, do: user.spoiler_type, else: "static"),
|
||||||
watched_tag_list: Jason.encode!(if(user, do: user.watched_tag_ids, else: [])),
|
watched_tag_list: Jason.encode!(if(user, do: user.watched_tag_ids, else: [])),
|
||||||
fancy_tag_edit: if(user, do: user.fancy_tag_field_on_edit, else: "true"),
|
fancy_tag_edit: if(user, do: user.fancy_tag_field_on_edit, else: "true") |> to_string(),
|
||||||
fancy_tag_upload: if(user, do: user.fancy_tag_field_on_upload, else: "true"),
|
fancy_tag_upload: if(user, do: user.fancy_tag_field_on_upload, else: "true") |> to_string(),
|
||||||
interactions: Jason.encode!(interactions),
|
interactions: Jason.encode!(interactions),
|
||||||
ignored_tag_list: Jason.encode!(ignored_tag_list(conn.assigns[:tags])),
|
ignored_tag_list: Jason.encode!(ignored_tag_list(conn.assigns[:tags])),
|
||||||
hide_staff_tools: conn.cookies["hide_staff_tools"]
|
hide_staff_tools: conn.cookies["hide_staff_tools"] |> to_string()
|
||||||
]
|
]
|
||||||
|
|
||||||
data = Keyword.merge(data, extra)
|
data = Keyword.merge(data, extra)
|
||||||
|
|
Loading…
Reference in a new issue