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.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
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.

View file

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

View file

@ -14,6 +14,9 @@ defmodule Philomena.Images.Query do
def user_my_transform(%{user: %{id: id}}, "downvotes"),
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"),
do: {:error, "Recursive watchlists are not allowed."}

View file

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

View file

@ -58,7 +58,7 @@ header.header
i.fa.fa-fw.fa-comments>
| Comments
a.header__link href="/posts/posted"
i.fas.fa-fw.fa-pen-square>
i.fa.fa-fw.fa-pencil>
| Posts
a.header__link href='/user_links'
i.fa.fa-fw.fa-link>
@ -69,8 +69,11 @@ header.header
a.header__link href="/conversations"
i.fa.fa-fw.fa-envelope>
| 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'
i.fas.fa-fw.fa-sign-out-alt>
i.fa.fa-fw.fa-sign-out>
| Logout
- else
a.header__link.hide-mobile href="/filters"

View file

@ -11,9 +11,12 @@ p
h3 API Key
p
' Your API key is
code
=> @current_user.authentication_token
code>
= @current_user.authentication_token
' - 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
p

View file

@ -11,4 +11,8 @@ p
.field
= 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"