fix a few errors

This commit is contained in:
byte[] 2019-11-15 10:32:26 -05:00
parent 32d3098da4
commit 4cfaf47573
7 changed files with 22 additions and 5 deletions

View file

@ -36,7 +36,7 @@ function applyMediaSize(container, size) {
item.style.width = `${size}px`; item.style.width = `${size}px`;
item.style.height = `${size}px`; item.style.height = `${size}px`;
const header = item.parentNode.childNodes[0]; const header = item.parentNode.firstElementChild;
// TODO: Make this proper and/or rethink this entire croc of bullshit // TODO: Make this proper and/or rethink this entire croc of bullshit
item.parentNode.style.width = `${size}px`; item.parentNode.style.width = `${size}px`;
/* When the large box has width less than mediaLargeMinSize, the header gets wrapped and occupies more than one line. /* When the large box has width less than mediaLargeMinSize, the header gets wrapped and occupies more than one line.

View file

@ -69,6 +69,9 @@ config :philomena, PhilomenaWeb.Mailer,
config :philomena, :mailer_address, config :philomena, :mailer_address,
"noreply@philomena.lc" "noreply@philomena.lc"
# Use this to debug slime templates
# config :slime, :keep_lines, true
# Set a higher stacktrace during development. Avoid configuring such # Set a higher stacktrace during development. Avoid configuring such
# in production as building large stacktraces may be expensive. # in production as building large stacktraces may be expensive.
config :phoenix, :stacktrace_depth, 20 config :phoenix, :stacktrace_depth, 20

View file

@ -14,6 +14,9 @@ defmodule Philomena.Images.Query do
def user_my_transform(%{user: %{id: id}}, "downvotes"), def user_my_transform(%{user: %{id: id}}, "downvotes"),
do: {:ok, %{term: %{downvoter_ids: id}}} do: {:ok, %{term: %{downvoter_ids: id}}}
def user_my_transform(%{user: %{id: id}}, "uploads"),
do: {:ok, %{term: %{true_uploader_id: id}}}
def user_my_transform(%{watch: true}, "watched"), def user_my_transform(%{watch: true}, "watched"),
do: {:error, "Recursive watchlists are not allowed."} do: {:error, "Recursive watchlists are not allowed."}

View file

@ -116,6 +116,7 @@ defmodule Philomena.Users.User do
|> pow_extension_changeset(attrs) |> pow_extension_changeset(attrs)
|> cast(attrs, []) |> cast(attrs, [])
|> validate_required([]) |> validate_required([])
|> unique_constraint(:email, name: :index_users_on_email)
end end
def creation_changeset(user, attrs) do def creation_changeset(user, attrs) do

View file

@ -58,7 +58,7 @@ header.header
i.fa.fa-fw.fa-comments> i.fa.fa-fw.fa-comments>
| Comments | Comments
a.header__link href="/posts/posted" a.header__link href="/posts/posted"
i.fas.fa-fw.fa-pen-square> i.fa.fa-fw.fa-pencil>
| Posts | Posts
a.header__link href='/user_links' a.header__link href='/user_links'
i.fa.fa-fw.fa-link> i.fa.fa-fw.fa-link>
@ -69,8 +69,11 @@ header.header
a.header__link href="/conversations" a.header__link href="/conversations"
i.fa.fa-fw.fa-envelope> i.fa.fa-fw.fa-envelope>
| Messages | Messages
a.header__link href=Routes.pow_registration_path(@conn, :edit)
i.fa.fa-fw.fa-user>
| Account
a.header__link href="/session" data-method='delete' a.header__link href="/session" data-method='delete'
i.fas.fa-fw.fa-sign-out-alt> i.fa.fa-fw.fa-sign-out>
| Logout | Logout
- else - else
a.header__link.hide-mobile href="/filters" a.header__link.hide-mobile href="/filters"

View file

@ -11,9 +11,12 @@ p
h3 API Key h3 API Key
p p
' Your API key is ' Your API key is
code code>
=> @current_user.authentication_token = @current_user.authentication_token
' - you can use this to allow API consumers to access your account. ' - you can use this to allow API consumers to access your account.
p
' Avoid sharing this key with others, as it could be used to compromise
' your account.
h3 Update Settings h3 Update Settings
p p

View file

@ -11,4 +11,8 @@ p
.field .field
= text_input f, :email, class: "input", placeholder: "Email" = text_input f, :email, class: "input", placeholder: "Email"
.field
= checkbox f, :captcha, class: "js-captcha", value: 0
= label f, :captcha, "I am not a robot!"
= submit "Submit", class: "button" = submit "Submit", class: "button"