make app responsive

This commit is contained in:
shibao 2022-02-15 23:52:44 -05:00
parent 669afd5dcb
commit d6e4090650
35 changed files with 470 additions and 422 deletions

View File

@ -17,6 +17,8 @@
-o-transform: scale(1.5);
transform: scale(1.5);
padding: 10px;
margin-left: auto;
margin-right: auto;
}
.title {
@ -45,6 +47,10 @@
@apply border border-primary-300 w-full max-w-2xl;
}
.hr-light {
@apply border border-white w-full max-w-2xl;
}
.link {
@apply hover:underline;
@apply transition-colors duration-500 ease-in-out;

View File

@ -12,8 +12,7 @@ if System.get_env("PHX_SERVER") && System.get_env("RELEASE_NAME") do
config :cannery, CanneryWeb.Endpoint, server: true
end
config :cannery, CanneryWeb.ViewHelpers,
shibao_mode: System.get_env("SHIBAO_MODE") == "true"
config :cannery, CanneryWeb.ViewHelpers, shibao_mode: System.get_env("SHIBAO_MODE") == "true"
# Set locale
Gettext.put_locale(System.get_env("LOCALE") || "en_US")

View File

@ -7,7 +7,7 @@
let={f}
for={@changeset}
id="shot-group-form"
class="grid grid-cols-3 justify-center items-center space-y-4"
class="flex flex-col sm:grid sm:grid-cols-3 justify-center items-center space-y-4"
phx-target={@myself}
phx-change="validate"
phx-submit="save"

View File

@ -26,8 +26,11 @@ defmodule CanneryWeb.Components.InviteCard do
</h2>
<% end %>
<div class="flex flex-row justify-center items-center space-x-4">
<code id={"code-#{@invite.id}"} class="text-xs px-4 py-2 rounded-lg text-gray-100 bg-primary-800"><%= Routes.user_registration_url(Endpoint, :new, invite: @invite.token) %>
<div class="flex flex-row flex-wrap justify-center items-center">
<code
id={"code-#{@invite.id}"}
class="mx-2 my-1 text-xs px-4 py-2 rounded-lg text-center break-all text-gray-100 bg-primary-800"
><%= Routes.user_registration_url(Endpoint, :new, invite: @invite.token) %>
</code>
<%= if @code_actions do %>

View File

@ -5,7 +5,8 @@
<%= if @containers |> Enum.empty?() do %>
<h2 class="title text-xl text-primary-500">
<%= gettext("No other containers") %> <%= display_emoji("😔") %>
<%= gettext("No other containers") %>
<%= display_emoji("😔") %>
</h2>
<%= live_patch(dgettext("actions", "Add another container!"),

View File

@ -13,102 +13,105 @@ defmodule CanneryWeb.Components.Topbar do
%{results: [], title_content: nil, flash: nil, current_user: nil} |> Map.merge(assigns)
~H"""
<header class="mb-8 px-8 py-4 w-full bg-primary-400 overflow-x-hidden">
<nav role="navigation">
<div class="flex flex-row justify-between items-center space-x-4">
<div class="flex flex-row justify-start items-center space-x-2">
<%= link to: Routes.live_path(Endpoint, HomeLive) do %>
<h1 class="leading-5 text-xl text-white hover:underline">
Cannery
</h1>
<% end %>
<%= if @title_content do %>
<span>|</span>
<%= @title_content %>
<% end %>
</div>
<nav role="navigation" class="mb-8 px-8 py-4 w-full bg-primary-400">
<div class="flex flex-col sm:flex-row justify-between items-center">
<div class="mb-4 sm:mb-0 sm:mr-8 flex flex-row justify-start items-center space-x-2">
<%= link to: Routes.live_path(Endpoint, HomeLive) do %>
<h1 class="mx-2 my-1 leading-5 text-xl text-white hover:underline">
Cannery
</h1>
<% end %>
<ul class="flex flex-col sm:flex-row flex-wrap justify-center items-center
space-x-4 text-lg text-white text-ellipsis">
<%= if @current_user do %>
<li>
<%= link(gettext("Tags"),
<%= if @title_content do %>
<span class="mx-2 my-1">
|
</span>
<%= @title_content %>
<% end %>
</div>
<hr class="mb-2 sm:hidden hr-light">
<ul class="flex flex-row flex-wrap justify-center items-center
text-lg text-white text-ellipsis">
<%= if @current_user do %>
<li class="mx-2 my-1">
<%= link(gettext("Tags"),
class: "hover:underline",
to: Routes.tag_index_path(Endpoint, :index)
) %>
</li>
<li class="mx-2 my-1">
<%= link(gettext("Containers"),
class: "hover:underline",
to: Routes.container_index_path(Endpoint, :index)
) %>
</li>
<li class="mx-2 my-1">
<%= link(gettext("Ammo"),
class: "hover:underline",
to: Routes.ammo_type_index_path(Endpoint, :index)
) %>
</li>
<li class="mx-2 my-1">
<%= link(gettext("Manage"),
class: "hover:underline",
to: Routes.ammo_group_index_path(Endpoint, :index)
) %>
</li>
<li class="mx-2 my-1">
<%= link(gettext("Range"),
class: "hover:underline",
to: Routes.range_index_path(Endpoint, :index)
) %>
</li>
<%= if @current_user.role == :admin do %>
<li class="mx-2 my-1">
<%= link(gettext("Invites"),
class: "hover:underline",
to: Routes.tag_index_path(Endpoint, :index)
to: Routes.invite_index_path(Endpoint, :index)
) %>
</li>
<li>
<%= link(gettext("Containers"),
class: "hover:underline",
to: Routes.container_index_path(Endpoint, :index)
) %>
</li>
<li>
<%= link(gettext("Ammo"),
class: "hover:underline",
to: Routes.ammo_type_index_path(Endpoint, :index)
) %>
</li>
<li>
<%= link(gettext("Manage"),
class: "hover:underline",
to: Routes.ammo_group_index_path(Endpoint, :index)
) %>
</li>
<li>
<%= link(gettext("Range"),
class: "hover:underline",
to: Routes.range_index_path(Endpoint, :index)
) %>
</li>
<%= if @current_user.role == :admin do %>
<li>
<%= link(gettext("Invites"),
class: "hover:underline",
to: Routes.invite_index_path(Endpoint, :index)
) %>
</li>
<% end %>
<li class="mx-2 my-1">
<%= link(@current_user.email,
class: "hover:underline truncate",
to: Routes.user_settings_path(Endpoint, :edit)
) %>
</li>
<li class="mx-2 my-1">
<%= link to: Routes.user_session_path(Endpoint, :delete),
method: :delete,
data: [confirm: dgettext("prompts", "Are you sure you want to log out?")] do %>
<i class="fas fa-sign-out-alt"></i>
<% end %>
<li>
<%= link(@current_user.email,
class: "hover:underline truncate",
to: Routes.user_settings_path(Endpoint, :edit)
) %>
</li>
<li>
<%= link to: Routes.user_session_path(Endpoint, :delete),
method: :delete,
data: [confirm: dgettext("prompts", "Are you sure you want to log out?")] do %>
<i class="fas fa-sign-out-alt"></i>
</li>
<%= if @current_user.role == :admin and function_exported?(Routes, :live_dashboard_path, 2) do %>
<li class="mx-2 my-1">
<%= link to: Routes.live_dashboard_path(Endpoint, :home) do %>
<i class="fas fa-tachometer-alt"></i>
<% end %>
</li>
<%= if @current_user.role == :admin and function_exported?(Routes, :live_dashboard_path, 2) do %>
<li>
<%= link to: Routes.live_dashboard_path(Endpoint, :home) do %>
<i class="fas fa-tachometer-alt"></i>
<% end %>
</li>
<% end %>
<% else %>
<%= if Accounts.allow_registration?() do %>
<li>
<%= link(dgettext("actions", "Register"),
class: "hover:underline",
to: Routes.user_registration_path(Endpoint, :new)
) %>
</li>
<% end %>
<li>
<%= link(dgettext("actions", "Log in"),
<% end %>
<% else %>
<%= if Accounts.allow_registration?() do %>
<li class="mx-2 my-1">
<%= link(dgettext("actions", "Register"),
class: "hover:underline",
to: Routes.user_session_path(Endpoint, :new)
to: Routes.user_registration_path(Endpoint, :new)
) %>
</li>
<% end %>
</ul>
</div>
</nav>
</header>
<li class="mx-2 my-1">
<%= link(dgettext("actions", "Log in"),
class: "hover:underline",
to: Routes.user_session_path(Endpoint, :new)
) %>
</li>
<% end %>
</ul>
</div>
</nav>
"""
end
end

View File

@ -13,7 +13,7 @@ defmodule CanneryWeb.Components.UserCard do
border border-gray-400 rounded-lg shadow-lg hover:shadow-md
transition-all duration-300 ease-in-out"
>
<h1 class="px-4 py-2 rounded-lg title text-xl">
<h1 class="px-4 py-2 rounded-lg title text-xl break-all">
<%= @user.email %>
</h1>

View File

@ -10,7 +10,7 @@
phx-target={@myself}
phx-change="validate"
phx-submit="save"
class="grid grid-cols-3 justify-center items-center space-y-4"
class="flex flex-col sm:grid sm:grid-cols-3 justify-center items-center space-y-4"
>
<%= if @changeset.action && not @changeset.valid? do %>
<div class="invalid-feedback col-span-3 text-center">

View File

@ -1,11 +1,12 @@
<div class="mx-8 flex flex-col space-y-8 justify-center items-center">
<div class="flex flex-col space-y-8 justify-center items-center">
<h1 class="title text-2xl title-primary-500">
<%= gettext("Ammo") %>
</h1>
<%= if @ammo_groups |> Enum.empty?() do %>
<h2 class="title text-xl text-primary-500">
<%= gettext("No Ammo") %> <%= display_emoji("😔") %>
<%= gettext("No Ammo") %>
<%= display_emoji("😔") %>
</h2>
<%= live_patch(dgettext("actions", "Add your first box!"),
@ -35,7 +36,7 @@
<%= gettext("Notes") %>
</th>
<th class="p-2">
<%= gettext("Staging") %>
<%= gettext("Staged for Range") %>
</th>
<th class="p-2">
<%= gettext("Container") %>
@ -75,7 +76,7 @@
phx-click="toggle_staged"
phx-value-ammo_group_id={ammo_group.id}
>
<%= if ammo_group.staged, do: gettext("Unstage from range"), else: gettext("Stage for range") %>
<%= if ammo_group.staged, do: gettext("Unstage"), else: gettext("Stage") %>
</button>
</td>
@ -88,7 +89,7 @@
<% end %>
</td>
<td class="p-2 w-full h-full space-x-2 flex justify-center items-center">
<td class="p-2">
<div class="px-4 py-2 space-x-4 flex justify-center items-center">
<%= live_redirect to: Routes.ammo_group_show_path(@socket, :show, ammo_group),
class: "text-primary-500 link" do %>

View File

@ -24,25 +24,25 @@
<% end %>
</div>
<div class="flex space-x-4 justify-center items-center text-primary-500">
<div class="flex flex-wrap justify-center items-center text-primary-500">
<%= live_patch(dgettext("actions", "Ammo Details"),
to: Routes.ammo_type_show_path(Endpoint, :show, @ammo_group.ammo_type),
class: "btn btn-primary"
class: "mx-4 my-2 btn btn-primary"
) %>
<%= live_patch to: Routes.ammo_group_show_path(Endpoint, :edit, @ammo_group),
class: "text-primary-500 link" do %>
class: "mx-4 my-2 text-primary-500 link" do %>
<i class="fa-fw fa-lg fas fa-edit"></i>
<% end %>
<%= link to: "#",
class: "text-primary-500 link",
class: "mx-4 my-2 text-primary-500 link",
phx_click: "delete",
data: [confirm: dgettext("prompts", "Are you sure you want to delete this ammo?")] do %>
<i class="fa-fw fa-lg fas fa-trash"></i>
<% end %>
<button type="button" class="btn btn-primary" phx-click="toggle_staged">
<button type="button" class="mx-4 my-2 btn btn-primary" phx-click="toggle_staged">
<%= if @ammo_group.staged, do: gettext("Unstage from range"), else: gettext("Stage for range") %>
</button>

View File

@ -9,7 +9,7 @@
phx-target={@myself}
phx-change="validate"
phx-submit="save"
class="grid grid-cols-3 justify-center items-center space-y-4"
class="flex flex-col sm:grid sm:grid-cols-3 justify-center items-center space-y-4"
>
<%= if @changeset.action && not @changeset.valid? do %>
<div class="invalid-feedback col-span-3 text-center">

View File

@ -1,11 +1,12 @@
<div class="mx-8 flex flex-col space-y-8 justify-center items-center">
<div class="flex flex-col space-y-8 justify-center items-center">
<h1 class="title text-2xl title-primary-500">
<%= gettext("Ammo Types") %>
</h1>
<%= if @ammo_types |> Enum.empty?() do %>
<h2 class="title text-xl text-primary-500">
<%= gettext("No Ammo Types") %> <%= display_emoji("😔") %>
<%= gettext("No Ammo Types") %>
<%= display_emoji("😔") %>
</h2>
<%= live_patch(dgettext("actions", "Add your first type!"),

View File

@ -7,7 +7,7 @@
let={f}
for={:tag}
id="add-tag-to-container-form"
class="grid grid-cols-3 justify-center items-center space-x-2"
class="flex flex-col sm:grid sm:grid-cols-3 justify-center items-center space-x-2"
phx-target={@myself}
phx-submit="save"
>

View File

@ -6,7 +6,7 @@
let={f}
for={@changeset}
id="container-form"
class="grid grid-cols-3 justify-center items-center space-y-4"
class="flex flex-col sm:grid sm:grid-cols-3 justify-center items-center space-y-4"
phx-target={@myself}
phx-change="validate"
phx-submit="save"

View File

@ -5,7 +5,8 @@
<%= if @containers |> Enum.empty?() do %>
<h2 class="title text-xl text-primary-500">
<%= gettext("No containers") %> <%= display_emoji("😔") %>
<%= gettext("No containers") %>
<%= display_emoji("😔") %>
</h2>
<%= live_patch(dgettext("actions", "Add your first container!"),
@ -19,7 +20,7 @@
) %>
<% end %>
<div class="flex flex-row flex-wrap">
<div class="flex flex-row flex-wrap justify-center items-center">
<%= for container <- @containers do %>
<.container_card container={container}>
<%= live_patch to: Routes.container_index_path(@socket, :edit, container),

View File

@ -44,7 +44,8 @@
<%= if @container.tags |> Enum.empty?() do %>
<div class="flex flex-row justify-center items-center space-x-4">
<h2 class="title text-lg text-primary-500">
<%= gettext("No tags for this container") %> <%= display_emoji("😔") %>
<%= gettext("No tags for this container") %>
<%= display_emoji("😔") %>
</h2>
<%= live_patch(dgettext("actions", "Why not add one?"),

View File

@ -6,7 +6,7 @@
let={f}
for={@changeset}
id="invite-form"
class="grid grid-cols-3 justify-center items-center space-y-4"
class="flex flex-col sm:grid sm:grid-cols-3 justify-center items-center space-y-4"
phx-target={@myself}
phx-change="validate"
phx-submit="save"

View File

@ -5,7 +5,8 @@
<%= if @invites |> Enum.empty?() do %>
<h1 class="title text-xl text-primary-500">
<%= gettext("No invites") %> <%= display_emoji("😔") %>
<%= gettext("No invites") %>
<%= display_emoji("😔") %>
</h1>
<%= live_patch(dgettext("actions", "Invite someone new!"),
@ -26,7 +27,7 @@
<form phx-submit={JS.dispatch("cannery:clipcopy", to: "#code-#{invite.id}")}>
<button
type="submit"
class="btn btn-primary"
class="mx-2 my-1 btn btn-primary"
phx-click="copy_to_clipboard"
phx-value-invite_id={"#code-#{invite.id}"}
>

View File

@ -7,7 +7,7 @@
let={f}
for={@changeset}
id="shot-group-form"
class="grid grid-cols-3 justify-center items-center space-y-4"
class="flex flex-col sm:grid sm:grid-cols-3 justify-center items-center space-y-4"
phx-target={@myself}
phx-change="validate"
phx-submit="save"

View File

@ -1,11 +1,12 @@
<div class="mx-8 flex flex-col space-y-8 justify-center items-center">
<div class="flex flex-col space-y-8 justify-center items-center">
<h1 class="title text-2xl title-primary-500">
<%= gettext("Range day") %>
</h1>
<%= if @ammo_groups |> Enum.empty?() do %>
<h1 class="title text-xl text-primary-500">
<%= gettext("No ammo staged") %> <%= display_emoji("😔") %>
<%= gettext("No ammo staged") %>
<%= display_emoji("😔") %>
</h1>
<%= live_patch(dgettext("actions", "Why not get some ready to shoot?"),
@ -42,7 +43,8 @@
<%= if @shot_groups |> Enum.empty?() do %>
<h1 class="title text-xl text-primary-500">
<%= gettext("No shots recorded") %> <%= display_emoji("😔") %>
<%= gettext("No shots recorded") %>
<%= display_emoji("😔") %>
</h1>
<% else %>
<h1 class="title text-2xl text-primary-500">
@ -89,18 +91,20 @@
</td>
<td class="p-2 w-full h-full space-x-2 flex justify-center items-center">
<%= live_patch to: Routes.range_index_path(Endpoint, :edit, shot_group),
class: "text-primary-500 link" do %>
<i class="fa-fw fa-lg fas fa-edit"></i>
<% end %>
<div class="px-4 py-2 space-x-4 flex justify-center items-center">
<%= live_patch to: Routes.range_index_path(Endpoint, :edit, shot_group),
class: "text-primary-500 link" do %>
<i class="fa-fw fa-lg fas fa-edit"></i>
<% end %>
<%= link to: "#",
class: "text-primary-500 link",
phx_click: "delete",
phx_value_id: shot_group.id,
data: [confirm: dgettext("prompts", "Are you sure you want to delete this shot record?")] do %>
<i class="fa-fw fa-lg fas fa-trash"></i>
<% end %>
<%= link to: "#",
class: "text-primary-500 link",
phx_click: "delete",
phx_value_id: shot_group.id,
data: [confirm: dgettext("prompts", "Are you sure you want to delete this shot record?")] do %>
<i class="fa-fw fa-lg fas fa-trash"></i>
<% end %>
</div>
</td>
</tr>
<% end %>

View File

@ -36,7 +36,7 @@ defmodule CanneryWeb.TagLive.FormComponent do
let={f}
for={@changeset}
id="tag-form"
class="grid grid-cols-3 justify-center items-center space-y-4"
class="flex flex-col sm:grid sm:grid-cols-3 justify-center items-center space-y-4"
phx-target={@myself}
phx-change="validate"
phx-submit="save"

View File

@ -7,7 +7,8 @@
</p>
<%= if @tags |> Enum.empty?() do %>
<h2 class="title text-xl text-primary-500">
<%= gettext("No tags") %> <%= display_emoji("😔") %>
<%= gettext("No tags") %>
<%= display_emoji("😔") %>
</h2>
<%= live_patch(dgettext("actions", "Make your first tag!"),
@ -20,7 +21,7 @@
class: "btn btn-primary"
) %>
<% end %>
<div class="flex flex-row flex-wrap">
<div class="flex flex-row flex-wrap justify-center items-center">
<%= for tag <- @tags do %>
<.tag_card tag={tag}>
<%= live_patch to: Routes.tag_index_path(Endpoint, :edit, tag),

View File

@ -16,5 +16,7 @@
</div>
</header>
<%= @inner_content %>
<div class="mx-4 sm:mx-8 md:mx-16">
<%= @inner_content %>
</div>
</main>

View File

@ -17,5 +17,7 @@
</div>
</header>
<%= @inner_content %>
<div class="mx-4 sm:mx-8 md:mx-16">
<%= @inner_content %>
</div>
</main>

View File

@ -1,32 +1,33 @@
<div class="flex flex-col justify-center items-center space-y-4">
<div class="mb-8 flex flex-col justify-center items-center space-y-4">
<h1 class="title text-primary-500 text-xl">
<%= dgettext("actions", "Resend confirmation instructions") %>
</h1>
<%= form_for :user,
Routes.user_confirmation_path(@conn, :create),
[class: "flex flex-col justify-center items-center space-y-4"],
[class: "flex flex-col sm:grid sm:grid-cols-3
justify-center items-center text-center space-y-4"],
fn f -> %>
<div class="grid grid-cols-3 justify-center items-center text-center space-x-4">
<%= label(f, :email, class: "title text-lg text-primary-500") %>
<%= email_input(f, :email, required: true, class: "input input-primary col-span-2") %>
</div>
<%= label(f, :email, class: "title text-lg text-primary-500") %>
<%= email_input(f, :email, required: true, class: "input input-primary col-span-2") %>
<%= submit(dgettext("actions", "Resend confirmation instructions"), class: "btn btn-primary") %>
<%= submit(dgettext("actions", "Resend confirmation instructions"),
class: "mx-auto my-4 btn btn-primary col-span-3"
) %>
<% end %>
<hr class="hr">
<hr class="hr">
<div class="flex flex-row justify-center items-center space-x-4">
<%= if Accounts.allow_registration?() do %>
<%= link(dgettext("actions", "Register"),
to: Routes.user_registration_path(@conn, :new),
class: "btn btn-primary"
) %>
<% end %>
<%= link(dgettext("actions", "Log in"),
to: Routes.user_session_path(@conn, :new),
<div class="flex flex-row justify-center items-center space-x-4">
<%= if Accounts.allow_registration?() do %>
<%= link(dgettext("actions", "Register"),
to: Routes.user_registration_path(@conn, :new),
class: "btn btn-primary"
) %>
</div>
<% end %>
<% end %>
<%= link(dgettext("actions", "Log in"),
to: Routes.user_session_path(@conn, :new),
class: "btn btn-primary"
) %>
</div>
</div>

View File

@ -1,14 +1,15 @@
<div class="flex flex-col justify-center items-center space-y-4">
<div class="mb-8 flex flex-col justify-center items-center space-y-4">
<h1 class="title text-primary-500 text-xl">
<%= dgettext("actions", "Register") %>
</h1>
<%= form_for @changeset,
Routes.user_registration_path(@conn, :create),
[class: "flex flex-col justify-center items-center space-y-4"],
[class: "flex flex-col sm:grid sm:grid-cols-3
justify-center items-center text-center space-y-4"],
fn f -> %>
<%= if @changeset.action && not @changeset.valid? do %>
<div class="alert alert-danger">
<div class="alert alert-danger col-span-3">
<p>
<%= dgettext("errors", "Oops, something went wrong! Please check the errors below.") %>
</p>
@ -19,31 +20,27 @@
<%= hidden_input(f, :invite_token, value: @invite.token) %>
<% end %>
<div class="grid grid-cols-3 justify-center items-center text-center space-x-4">
<%= label(f, :email, class: "title text-lg text-primary-500") %>
<%= email_input(f, :email, required: true, class: "input input-primary col-span-2") %>
</div>
<%= error_tag(f, :email) %>
<%= label(f, :email, class: "title text-lg text-primary-500") %>
<%= email_input(f, :email, required: true, class: "input input-primary col-span-2") %>
<%= error_tag(f, :email, "col-span-3") %>
<div class="grid grid-cols-3 justify-center items-center text-center space-x-4">
<%= label(f, :password, class: "title text-lg text-primary-500") %>
<%= password_input(f, :password, required: true, class: "input input-primary col-span-2") %>
</div>
<%= error_tag(f, :password) %>
<%= label(f, :password, class: "title text-lg text-primary-500") %>
<%= password_input(f, :password, required: true, class: "input input-primary col-span-2") %>
<%= error_tag(f, :password, "col-span-3") %>
<%= submit(dgettext("actions", "Register"), class: "btn btn-primary") %>
<hr class="hr">
<div class="flex flex-row justify-center items-center space-x-4">
<%= link(dgettext("actions", "Log in"),
to: Routes.user_session_path(@conn, :new),
class: "btn btn-primary"
) %>
<%= link(dgettext("actions", "Forgot your password?"),
to: Routes.user_reset_password_path(@conn, :new),
class: "btn btn-primary"
) %>
</div>
<%= submit(dgettext("actions", "Register"), class: "mx-auto my-4 btn btn-primary col-span-3") %>
<% end %>
<hr class="hr">
<div class="flex flex-row justify-center items-center space-x-4">
<%= link(dgettext("actions", "Log in"),
to: Routes.user_session_path(@conn, :new),
class: "btn btn-primary"
) %>
<%= link(dgettext("actions", "Forgot your password?"),
to: Routes.user_reset_password_path(@conn, :new),
class: "btn btn-primary"
) %>
</div>
</div>

View File

@ -1,47 +1,44 @@
<div class="flex flex-col justify-center items-center space-y-4">
<div class="mb-8 flex flex-col justify-center items-center space-y-4">
<h1 class="title text-primary-500 text-xl">
<%= dgettext("actions", "Reset password") %>
</h1>
<%= form_for @changeset,
Routes.user_reset_password_path(@conn, :update, @token),
[class: "flex flex-col justify-center items-center space-y-4"],
[class: "flex flex-col sm:grid sm:grid-cols-3
justify-center items-center text-center space-y-4"],
fn f -> %>
<%= if @changeset.action && not @changeset.valid? do %>
<div class="alert alert-danger">
<div class="alert alert-danger col-span-3">
<p>
<%= dgettext("errors", "Oops, something went wrong! Please check the errors below.") %>
</p>
</div>
<% end %>
<div class="grid grid-cols-3 justify-center items-center text-center space-x-4">
<%= label(f, :password, "New password", class: "title text-lg text-primary-500") %>
<%= password_input(f, :password, required: true, class: "input input-primary col-span-2") %>
</div>
<%= error_tag(f, :password) %>
<%= label(f, :password, "New password", class: "title text-lg text-primary-500") %>
<%= password_input(f, :password, required: true, class: "input input-primary col-span-2") %>
<%= error_tag(f, :password, "col-span-3") %>
<div class="grid grid-cols-3 justify-center items-center text-center space-x-4">
<%= label(f, :password_confirmation, "Confirm new password", class: "title text-lg text-primary-500") %>
<%= password_input(f, :password_confirmation, required: true, class: "input input-primary col-span-2") %>
</div>
<%= error_tag(f, :password_confirmation) %>
<%= label(f, :password_confirmation, "Confirm new password", class: "title text-lg text-primary-500") %>
<%= password_input(f, :password_confirmation, required: true, class: "input input-primary col-span-2") %>
<%= error_tag(f, :password_confirmation, "col-span-3") %>
<%= submit(dgettext("actions", "Reset password"), class: "btn btn-primary") %>
<%= submit(dgettext("actions", "Reset password"), class: "mx-auto my-4 btn btn-primary col-span-3") %>
<% end %>
<hr class="hr">
<hr class="hr">
<div class="flex flex-row justify-center items-center space-x-4">
<%= if Accounts.allow_registration?() do %>
<%= link(dgettext("actions", "Register"),
to: Routes.user_registration_path(@conn, :new),
class: "btn btn-primary"
) %>
<% end %>
<%= link(dgettext("actions", "Log in"),
to: Routes.user_session_path(@conn, :new),
<div class="flex flex-row justify-center items-center space-x-4">
<%= if Accounts.allow_registration?() do %>
<%= link(dgettext("actions", "Register"),
to: Routes.user_registration_path(@conn, :new),
class: "btn btn-primary"
) %>
</div>
<% end %>
<% end %>
<%= link(dgettext("actions", "Log in"),
to: Routes.user_session_path(@conn, :new),
class: "btn btn-primary"
) %>
</div>
</div>

View File

@ -1,33 +1,34 @@
<div class="flex flex-col justify-center items-center space-y-4">
<div class="mb-8 flex flex-col justify-center items-center space-y-4">
<h1 class="title text-primary-500 text-xl">
<%= dgettext("actions", "Forgot your password?") %>
</h1>
<%= form_for :user,
Routes.user_reset_password_path(@conn, :create),
[class: "flex flex-col justify-center items-center space-y-4"],
[class: "flex flex-col sm:grid sm:grid-cols-3
justify-center items-center text-center space-y-4"],
fn f -> %>
<div class="grid grid-cols-3 justify-center items-center text-center space-x-4">
<%= label(f, :email, class: "title text-lg text-primary-500") %>
<%= email_input(f, :email, required: true, class: "input input-primary col-span-2") %>
</div>
<%= label(f, :email, class: "title text-lg text-primary-500") %>
<%= email_input(f, :email, required: true, class: "input input-primary col-span-2") %>
<%= submit(dgettext("actions", "Send instructions to reset password"), class: "btn btn-primary") %>
<%= submit(dgettext("actions", "Send instructions to reset password"),
class: "mx-auto my-4 btn btn-primary col-span-3"
) %>
<% end %>
<hr class="hr">
<hr class="hr">
<div class="flex flex-row justify-center items-center space-x-4">
<%= if Accounts.allow_registration?() do %>
<%= link(dgettext("actions", "Register"),
to: Routes.user_registration_path(@conn, :new),
class: "btn btn-primary"
) %>
<% end %>
<%= link(dgettext("actions", "Log in"),
to: Routes.user_session_path(@conn, :new),
<div class="flex flex-row justify-center items-center space-x-4">
<%= if Accounts.allow_registration?() do %>
<%= link(dgettext("actions", "Register"),
to: Routes.user_registration_path(@conn, :new),
class: "btn btn-primary"
) %>
</div>
<% end %>
<% end %>
<%= link(dgettext("actions", "Log in"),
to: Routes.user_session_path(@conn, :new),
class: "btn btn-primary"
) %>
</div>
</div>

View File

@ -1,52 +1,47 @@
<div class="flex flex-col justify-center items-center space-y-4">
<div class="mb-8 flex flex-col justify-center items-center space-y-4">
<h1 class="title text-primary-500 text-xl">
<%= dgettext("actions", "Log in") %>
</h1>
<%= form_for @conn,
Routes.user_session_path(@conn, :create),
[as: :user, class: "flex flex-col justify-center items-center space-y-4"],
[as: :user, class: "flex flex-col sm:grid sm:grid-cols-3
justify-center items-center text-center space-y-4"],
fn f -> %>
<%= if @error_message do %>
<div class="alert alert-danger">
<div class="alert alert-danger col-span-3">
<p>
<%= @error_message %>
</p>
</div>
<% end %>
<div class="grid grid-cols-3 justify-center items-center text-center space-x-4">
<%= label(f, :email, class: "title text-lg text-primary-500") %>
<%= email_input(f, :email, required: true, class: "input input-primary col-span-2") %>
</div>
<%= label(f, :email, class: "title text-lg text-primary-500") %>
<%= email_input(f, :email, required: true, class: "input input-primary col-span-2") %>
<div class="grid grid-cols-3 justify-center items-center text-center space-x-4">
<%= label(f, :password, class: "title text-lg text-primary-500") %>
<%= password_input(f, :password, required: true, class: "input input-primary col-span-2") %>
</div>
<%= label(f, :password, class: "title text-lg text-primary-500") %>
<%= password_input(f, :password, required: true, class: "input input-primary col-span-2") %>
<div class="flex flex-row justify-center items-center text-center space-x-4">
<%= label(f, :remember_me, gettext("Keep me logged in for 60 days"),
class: "title text-lg text-primary-500"
) %>
<%= checkbox(f, :remember_me, class: "checkbox") %>
</div>
<%= label(f, :remember_me, gettext("Keep me logged in for 60 days"),
class: "title text-lg text-primary-500"
) %>
<%= checkbox(f, :remember_me, class: "checkbox col-span-2") %>
<%= submit(dgettext("actions", "Log in"), class: "btn btn-primary") %>
<%= submit(dgettext("actions", "Log in"), class: "mx-auto my-4 btn btn-primary col-span-3") %>
<% end %>
<hr class="hr">
<hr class="hr">
<div class="flex flex-row justify-center items-center space-x-4">
<%= if Accounts.allow_registration?() do %>
<%= link(dgettext("actions", "Register"),
to: Routes.user_registration_path(@conn, :new),
class: "btn btn-primary"
) %>
<% end %>
<%= link(dgettext("actions", "Forgot your password?"),
to: Routes.user_reset_password_path(@conn, :new),
<div class="flex flex-row justify-center items-center space-x-4">
<%= if Accounts.allow_registration?() do %>
<%= link(dgettext("actions", "Register"),
to: Routes.user_registration_path(@conn, :new),
class: "btn btn-primary"
) %>
</div>
<% end %>
<% end %>
<%= link(dgettext("actions", "Forgot your password?"),
to: Routes.user_reset_password_path(@conn, :new),
class: "btn btn-primary"
) %>
</div>
</div>

View File

@ -1,18 +1,21 @@
<div class="mb-8 flex flex-col justify-center items-center space-y-8">
<h1 class="title text-primary-500 text-xl">
<div class="mb-8 flex flex-col justify-center items-center space-y-4">
<h1 class="pb-4 title text-primary-500 text-xl">
<%= gettext("Settings") %>
</h1>
<h3 class="title text-primary-500 text-lg">
<%= dgettext("actions", "Change email") %>
</h3>
<hr class="hr">
<%= form_for @email_changeset,
Routes.user_settings_path(@conn, :update),
[class: "flex flex-col justify-center items-center space-y-4"],
[class: "pb-4 flex flex-col sm:grid sm:grid-cols-3
justify-center items-center text-center space-y-4"],
fn f -> %>
<%= if @email_changeset.action do %>
<div class="alert alert-danger">
<h3 class="title text-primary-500 text-lg col-span-3">
<%= dgettext("actions", "Change email") %>
</h3>
<%= if @email_changeset.action && not @email_changeset.valid? do %>
<div class="alert alert-danger col-span-3">
<p>
<%= dgettext("errors", "Oops, something went wrong! Please check the errors below.") %>
</p>
@ -21,39 +24,40 @@
<%= hidden_input(f, :action, name: "action", value: "update_email") %>
<div class="grid grid-cols-3 justify-center items-center text-center space-x-4">
<%= label(f, :email, class: "title text-lg text-primary-500") %>
<%= email_input(f, :email, required: true, class: "input input-primary col-span-2") %>
</div>
<%= error_tag(f, :email) %>
<%= label(f, :email, class: "title text-lg text-primary-500") %>
<%= email_input(f, :email, required: true, class: "mx-2 my-1 input input-primary col-span-2") %>
<%= error_tag(f, :email, "col-span-3") %>
<div class="grid grid-cols-3 justify-center items-center text-center space-x-4">
<%= label(f, :current_password,
for: "current_password_for_email",
class: "title text-lg text-primary-500"
) %>
<%= password_input(f, :current_password,
required: true,
name: "current_password",
id: "current_password_for_email",
class: "input input-primary col-span-2"
) %>
</div>
<%= error_tag(f, :current_password) %>
<%= label(f, :current_password, gettext("Current password"),
for: "current_password_for_email",
class: "mx-2 my-1 title text-lg text-primary-500"
) %>
<%= password_input(f, :current_password,
required: true,
name: "current_password",
id: "current_password_for_email",
class: "mx-2 my-1 input input-primary col-span-2"
) %>
<%= error_tag(f, :current_password, "col-span-3") %>
<%= submit(dgettext("actions", "Change email"), class: "btn btn-primary") %>
<%= submit(dgettext("actions", "Change email"), class: "mx-auto my-4 btn btn-primary col-span-3") %>
<% end %>
<h3 class="title text-primary-500 text-lg">
<%= dgettext("actions", "Change password") %>
</h3>
<hr class="hr">
<%= form_for @password_changeset,
Routes.user_settings_path(@conn, :update),
[class: "flex flex-col justify-center items-center space-y-4"],
[
class:
"pb-4 flex flex-col sm:grid sm:grid-cols-3 justify-center items-center text-center space-y-4"
],
fn f -> %>
<%= if @password_changeset.action do %>
<div class="alert alert-danger">
<h3 class="title text-primary-500 text-lg col-span-3">
<%= dgettext("actions", "Change password") %>
</h3>
<%= if @password_changeset.action && not @password_changeset.valid? do %>
<div class="alert alert-danger col-span-3">
<p>
<%= dgettext("errors", "Oops, something went wrong! Please check the errors below.") %>
</p>
@ -62,41 +66,39 @@
<%= hidden_input(f, :action, name: "action", value: "update_password") %>
<div class="grid grid-cols-3 justify-center items-center text-center space-x-4">
<%= label(f, :password, "New password", class: "title text-lg text-primary-500") %>
<%= password_input(f, :password,
required: true,
class: "input input-primary col-span-2"
) %>
</div>
<%= error_tag(f, :password) %>
<%= label(f, :password, gettext("New password"), class: "title text-lg text-primary-500") %>
<%= password_input(f, :password,
required: true,
class: "mx-2 my-1 input input-primary col-span-2"
) %>
<%= error_tag(f, :password, "col-span-3") %>
<div class="grid grid-cols-3 justify-center items-center text-center space-x-4">
<%= label(f, :password_confirmation, "Confirm new password", class: "title text-lg text-primary-500") %>
<%= password_input(f, :password_confirmation,
required: true,
class: "input input-primary col-span-2"
) %>
</div>
<%= error_tag(f, :password_confirmation) %>
<%= label(f, :password_confirmation, gettext("Confirm new password"),
class: "title text-lg text-primary-500"
) %>
<%= password_input(f, :password_confirmation,
required: true,
class: "mx-2 my-1 input input-primary col-span-2"
) %>
<%= error_tag(f, :password_confirmation, "col-span-3") %>
<div class="grid grid-cols-3 justify-center items-center text-center space-x-4">
<%= label(f, :current_password,
for: "current_password_for_password",
class: "title text-lg text-primary-500"
) %>
<%= password_input(f, :current_password,
required: true,
name: "current_password",
id: "current_password_for_password",
class: "input input-primary col-span-2"
) %>
</div>
<%= error_tag(f, :current_password) %>
<%= label(f, :current_password, gettext("Current password"),
for: "current_password_for_password",
class: "title text-lg text-primary-500"
) %>
<%= password_input(f, :current_password,
required: true,
name: "current_password",
id: "current_password_for_password",
class: "mx-2 my-1 input input-primary col-span-2"
) %>
<%= error_tag(f, :current_password, "col-span-3") %>
<%= submit(dgettext("actions", "Change password"), class: "btn btn-primary") %>
<%= submit(dgettext("actions", "Change password"), class: "mx-auto my-4 btn btn-primary col-span-3") %>
<% end %>
<hr class="hr">
<%= link(dgettext("actions", "Delete User"),
to: Routes.user_settings_path(@conn, :delete, @current_user),
method: :delete,

View File

@ -13,6 +13,7 @@ defmodule CanneryWeb.ViewHelpers do
"""
@spec display_datetime(NaiveDateTime.t() | nil) :: Phoenix.LiveView.Rendered.t()
def display_datetime(nil), do: ""
def display_datetime(datetime) do
assigns = %{
datetime: datetime |> DateTime.from_naive!("Etc/UTC") |> DateTime.to_iso8601(:extended)
@ -39,8 +40,9 @@ defmodule CanneryWeb.ViewHelpers do
"""
@spec display_date(Date.t() | nil) :: Phoenix.LiveView.Rendered.t()
def display_date(nil), do: ""
def display_date(date) do
assigns = %{date: date |> Date.to_iso8601(:extended)}
assigns = %{date: date |> Date.to_iso8601(:extended)}
~H"""
<time
@ -60,6 +62,9 @@ defmodule CanneryWeb.ViewHelpers do
Displays emoji as text emoji if SHIBAO_MODE is set to true :)
"""
@spec display_emoji(String.t()) :: String.t()
def display_emoji("😔"), do: if Application.get_env(:cannery, CanneryWeb.ViewHelpers)[:shibao_mode], do: "q_q", else: "😔"
def display_emoji("😔"),
do:
if(Application.get_env(:cannery, CanneryWeb.ViewHelpers)[:shibao_mode], do: "q_q", else: "😔")
def display_emoji(other_emoji), do: other_emoji
end

View File

@ -16,110 +16,110 @@ msgid "Add Ammo"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/ammo_group_live/index.html.heex:11
#: lib/cannery_web/live/ammo_group_live/index.html.heex:12
msgid "Add your first box!"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/container_live/index.html.heex:11
#: lib/cannery_web/live/container_live/index.html.heex:12
msgid "Add your first container!"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/ammo_type_live/index.html.heex:11
#: lib/cannery_web/live/ammo_type_live/index.html.heex:12
msgid "Add your first type!"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/templates/user_settings/edit.html.heex:7
#: lib/cannery_web/templates/user_settings/edit.html.heex:44
#: lib/cannery_web/templates/user_settings/edit.html.heex:14
#: lib/cannery_web/templates/user_settings/edit.html.heex:43
msgid "Change email"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/templates/user_settings/edit.html.heex:48
#: lib/cannery_web/templates/user_settings/edit.html.heex:56
#: lib/cannery_web/templates/user_settings/edit.html.heex:97
msgid "Change password"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/invite_live/index.html.heex:16
#: lib/cannery_web/live/invite_live/index.html.heex:17
msgid "Create Invite"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/templates/user_settings/edit.html.heex:100
#: lib/cannery_web/templates/user_settings/edit.html.heex:102
msgid "Delete User"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/templates/user_registration/new.html.heex:43
#: lib/cannery_web/templates/user_registration/new.html.heex:41
#: lib/cannery_web/templates/user_reset_password/new.html.heex:3
#: lib/cannery_web/templates/user_session/new.html.heex:46
#: lib/cannery_web/templates/user_session/new.html.heex:42
msgid "Forgot your password?"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/invite_live/index.html.heex:11
#: lib/cannery_web/live/invite_live/index.html.heex:12
msgid "Invite someone new!"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/components/topbar.ex:102
#: lib/cannery_web/templates/user_confirmation/new.html.heex:26
#: lib/cannery_web/templates/user_registration/new.html.heex:39
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:41
#: lib/cannery_web/templates/user_reset_password/new.html.heex:27
#: lib/cannery_web/components/topbar.ex:106
#: lib/cannery_web/templates/user_confirmation/new.html.heex:28
#: lib/cannery_web/templates/user_registration/new.html.heex:37
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:39
#: lib/cannery_web/templates/user_reset_password/new.html.heex:29
#: lib/cannery_web/templates/user_session/new.html.heex:3
#: lib/cannery_web/templates/user_session/new.html.heex:35
#: lib/cannery_web/templates/user_session/new.html.heex:30
msgid "Log in"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/tag_live/index.html.heex:13
#: lib/cannery_web/live/tag_live/index.html.heex:14
msgid "Make your first tag!"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/ammo_group_live/index.html.heex:16
#: lib/cannery_web/live/ammo_group_live/index.html.heex:17
msgid "New Ammo group"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/ammo_type_live/index.html.heex:16
#: lib/cannery_web/live/ammo_type_live/index.html.heex:17
msgid "New Ammo type"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/container_live/index.html.heex:16
#: lib/cannery_web/live/container_live/index.html.heex:17
msgid "New Container"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/tag_live/index.html.heex:18
#: lib/cannery_web/live/tag_live/index.html.heex:19
msgid "New Tag"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/components/topbar.ex:95
#: lib/cannery_web/templates/user_confirmation/new.html.heex:21
#: lib/cannery_web/components/topbar.ex:99
#: lib/cannery_web/templates/user_confirmation/new.html.heex:23
#: lib/cannery_web/templates/user_registration/new.html.heex:3
#: lib/cannery_web/templates/user_registration/new.html.heex:34
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:36
#: lib/cannery_web/templates/user_reset_password/new.html.heex:22
#: lib/cannery_web/templates/user_session/new.html.heex:41
#: lib/cannery_web/templates/user_registration/new.html.heex:31
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:34
#: lib/cannery_web/templates/user_reset_password/new.html.heex:24
#: lib/cannery_web/templates/user_session/new.html.heex:37
msgid "Register"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/templates/user_confirmation/new.html.heex:3
#: lib/cannery_web/templates/user_confirmation/new.html.heex:15
#: lib/cannery_web/templates/user_confirmation/new.html.heex:14
msgid "Resend confirmation instructions"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:3
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:30
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:27
msgid "Reset password"
msgstr ""
@ -135,12 +135,12 @@ msgid "Save"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/templates/user_reset_password/new.html.heex:16
#: lib/cannery_web/templates/user_reset_password/new.html.heex:15
msgid "Send instructions to reset password"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/container_live/show.html.heex:50
#: lib/cannery_web/live/container_live/show.html.heex:51
msgid "Why not add one?"
msgstr ""
@ -150,17 +150,17 @@ msgid "Add"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/range_live/index.html.heex:16
#: lib/cannery_web/live/range_live/index.html.heex:17
msgid "Stage ammo"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/range_live/index.html.heex:11
#: lib/cannery_web/live/range_live/index.html.heex:12
msgid "Why not get some ready to shoot?"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/range_live/index.html.heex:33
#: lib/cannery_web/live/range_live/index.html.heex:34
msgid "Record shots"
msgstr ""
@ -170,7 +170,7 @@ msgid "Ammo Details"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/components/move_ammo_group_component.html.heex:11
#: lib/cannery_web/components/move_ammo_group_component.html.heex:12
msgid "Add another container!"
msgstr ""
@ -180,11 +180,11 @@ msgid "Move to different container"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/components/move_ammo_group_component.html.heex:59
#: lib/cannery_web/components/move_ammo_group_component.html.heex:60
msgid "Select"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/invite_live/index.html.heex:33
#: lib/cannery_web/live/invite_live/index.html.heex:34
msgid "Copy to clipboard"
msgstr ""

View File

@ -21,7 +21,7 @@ msgid "Access from any internet-capable device"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/invite_live/index.html.heex:84
#: lib/cannery_web/live/invite_live/index.html.heex:85
msgid "Admins"
msgstr ""
@ -31,15 +31,15 @@ msgid "Admins:"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/components/topbar.ex:47
#: lib/cannery_web/components/topbar.ex:51
#: lib/cannery_web/live/ammo_group_live/index.html.heex:3
#: lib/cannery_web/live/range_live/index.html.heex:57
#: lib/cannery_web/live/range_live/index.html.heex:59
msgid "Ammo"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:21
#: lib/cannery_web/live/ammo_group_live/index.html.heex:26
#: lib/cannery_web/live/ammo_group_live/index.html.heex:27
msgid "Ammo type"
msgstr ""
@ -101,14 +101,14 @@ msgid "Case material"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/components/move_ammo_group_component.html.heex:21
#: lib/cannery_web/components/move_ammo_group_component.html.heex:22
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:48
#: lib/cannery_web/live/ammo_group_live/index.html.heex:41
#: lib/cannery_web/live/ammo_group_live/index.html.heex:42
msgid "Container"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/components/topbar.ex:41
#: lib/cannery_web/components/topbar.ex:45
#: lib/cannery_web/live/container_live/index.html.heex:3
msgid "Containers"
msgstr ""
@ -121,12 +121,12 @@ msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:27
#: lib/cannery_web/live/ammo_group_live/index.html.heex:29
#: lib/cannery_web/live/ammo_group_live/index.html.heex:30
msgid "Count"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/components/ammo_group_card.ex:28
#: lib/cannery_web/components/ammo_group_card.ex:29
#: lib/cannery_web/live/ammo_group_live/show.html.heex:8
msgid "Count:"
msgstr ""
@ -138,13 +138,13 @@ msgid "Description"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/components/container_card.ex:26
#: lib/cannery_web/components/container_card.ex:27
#: lib/cannery_web/live/container_live/show.html.heex:8
msgid "Description:"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/invite_live/index.html.heex:57
#: lib/cannery_web/live/invite_live/index.html.heex:58
msgid "Disable"
msgstr ""
@ -182,7 +182,7 @@ msgid "Edit Tag"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/invite_live/index.html.heex:61
#: lib/cannery_web/live/invite_live/index.html.heex:62
msgid "Enable"
msgstr ""
@ -215,7 +215,7 @@ msgid "Instance Information"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/components/invite_card.ex:24
#: lib/cannery_web/components/invite_card.ex:25
msgid "Invite Disabled"
msgstr ""
@ -225,13 +225,13 @@ msgid "Invite Only"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/components/topbar.ex:66
#: lib/cannery_web/components/topbar.ex:70
#: lib/cannery_web/live/invite_live/index.html.heex:3
msgid "Invites"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/templates/user_session/new.html.heex:29
#: lib/cannery_web/templates/user_session/new.html.heex:25
msgid "Keep me logged in for 60 days"
msgstr ""
@ -256,13 +256,13 @@ msgid "Listing Tags"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/components/move_ammo_group_component.html.heex:29
#: lib/cannery_web/components/move_ammo_group_component.html.heex:30
#: lib/cannery_web/live/container_live/form_component.html.heex:42
msgid "Location"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/components/container_card.ex:38
#: lib/cannery_web/components/container_card.ex:39
#: lib/cannery_web/live/container_live/show.html.heex:20
msgid "Location:"
msgstr ""
@ -273,7 +273,7 @@ msgid "Magazine, Clip, Ammo Box, etc"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/components/topbar.ex:53
#: lib/cannery_web/components/topbar.ex:57
msgid "Manage"
msgstr ""
@ -338,7 +338,7 @@ msgid "No ammo for this type"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/container_live/show.html.heex:85
#: lib/cannery_web/live/container_live/show.html.heex:86
msgid "No ammo groups in this container"
msgstr ""
@ -360,14 +360,14 @@ msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/components/add_shot_group_component.html.heex:30
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:41
#: lib/cannery_web/live/ammo_group_live/index.html.heex:35
#: lib/cannery_web/live/ammo_group_live/index.html.heex:36
#: lib/cannery_web/live/range_live/form_component.html.heex:29
#: lib/cannery_web/live/range_live/index.html.heex:63
#: lib/cannery_web/live/range_live/index.html.heex:65
msgid "Notes"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/components/ammo_group_card.ex:34
#: lib/cannery_web/components/ammo_group_card.ex:35
#: lib/cannery_web/live/ammo_group_live/show.html.heex:14
msgid "Notes:"
msgstr ""
@ -386,12 +386,12 @@ msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:34
#: lib/cannery_web/live/ammo_group_live/index.html.heex:32
#: lib/cannery_web/live/ammo_group_live/index.html.heex:33
msgid "Price paid"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/components/ammo_group_card.ex:41
#: lib/cannery_web/components/ammo_group_card.ex:42
#: lib/cannery_web/live/ammo_group_live/show.html.heex:21
msgid "Price paid:"
msgstr ""
@ -425,7 +425,7 @@ msgid "Self-host your own instance, or use an instance from someone you trust."
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/invite_live/index.html.heex:73
#: lib/cannery_web/live/invite_live/index.html.heex:74
msgid "Set Unlimited"
msgstr ""
@ -465,8 +465,8 @@ msgid "Stored in"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/components/topbar.ex:35
#: lib/cannery_web/live/container_live/show.html.heex:57
#: lib/cannery_web/components/topbar.ex:39
#: lib/cannery_web/live/container_live/show.html.heex:58
#: lib/cannery_web/live/tag_live/index.html.heex:3
msgid "Tags"
msgstr ""
@ -498,24 +498,24 @@ msgid "Tracer"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/components/move_ammo_group_component.html.heex:25
#: lib/cannery_web/components/move_ammo_group_component.html.heex:26
#: lib/cannery_web/live/container_live/form_component.html.heex:35
msgid "Type"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/components/container_card.ex:32
#: lib/cannery_web/components/container_card.ex:33
#: lib/cannery_web/live/container_live/show.html.heex:14
msgid "Type:"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/invite_live/index.html.heex:113
#: lib/cannery_web/live/invite_live/index.html.heex:114
msgid "Users"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/components/invite_card.ex:19
#: lib/cannery_web/components/invite_card.ex:20
msgid "Uses Left:"
msgstr ""
@ -545,7 +545,7 @@ msgid "No tags for this container"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/components/topbar.ex:59
#: lib/cannery_web/components/topbar.ex:63
msgid "Range"
msgstr ""
@ -555,7 +555,7 @@ msgid "Range day"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/range_live/index.html.heex:66
#: lib/cannery_web/live/range_live/index.html.heex:68
msgid "Date"
msgstr ""
@ -570,24 +570,17 @@ msgid "No ammo staged"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/ammo_group_live/index.html.heex:78
#: lib/cannery_web/live/ammo_group_live/show.html.heex:46
#: lib/cannery_web/live/range_live/index.html.heex:30
#: lib/cannery_web/live/range_live/index.html.heex:31
msgid "Stage for range"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/ammo_group_live/index.html.heex:78
#: lib/cannery_web/live/ammo_group_live/show.html.heex:46
#: lib/cannery_web/live/range_live/index.html.heex:30
#: lib/cannery_web/live/range_live/index.html.heex:31
msgid "Unstage from range"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/ammo_group_live/index.html.heex:38
msgid "Staging"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/ammo_group_live/show.ex:52
msgid "Add Shot group"
@ -626,7 +619,7 @@ msgid "New Shot Records"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/range_live/index.html.heex:45
#: lib/cannery_web/live/range_live/index.html.heex:46
msgid "No shots recorded"
msgstr ""
@ -636,7 +629,7 @@ msgid "Rounds left"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/range_live/index.html.heex:60
#: lib/cannery_web/live/range_live/index.html.heex:62
msgid "Rounds shot"
msgstr ""
@ -662,13 +655,13 @@ msgid "No other containers"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/range_live/index.html.heex:49
#: lib/cannery_web/live/range_live/index.html.heex:51
msgid "Shot log"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/components/ammo_group_card.ex:42
#: lib/cannery_web/live/ammo_group_live/index.html.heex:63
#: lib/cannery_web/components/ammo_group_card.ex:43
#: lib/cannery_web/live/ammo_group_live/index.html.heex:64
#: lib/cannery_web/live/ammo_group_live/show.html.heex:22
#: lib/cannery_web/live/ammo_type_live/show.html.heex:94
msgid "$%{amount}"
@ -712,3 +705,34 @@ msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.ex:70
msgid "UPC"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/templates/user_settings/edit.html.heex:76
msgid "Confirm new password"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/templates/user_settings/edit.html.heex:31
#: lib/cannery_web/templates/user_settings/edit.html.heex:85
msgid "Current password"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/templates/user_settings/edit.html.heex:69
msgid "New password"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/ammo_group_live/index.html.heex:79
msgid "Stage"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/ammo_group_live/index.html.heex:39
msgid "Staged for Range"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/ammo_group_live/index.html.heex:79
msgid "Unstage"
msgstr ""

View File

@ -57,10 +57,10 @@ msgid "Not found"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/templates/user_registration/new.html.heex:13
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:13
#: lib/cannery_web/templates/user_settings/edit.html.heex:17
#: lib/cannery_web/templates/user_settings/edit.html.heex:58
#: lib/cannery_web/templates/user_registration/new.html.heex:14
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:14
#: lib/cannery_web/templates/user_settings/edit.html.heex:20
#: lib/cannery_web/templates/user_settings/edit.html.heex:62
msgid "Oops, something went wrong! Please check the errors below."
msgstr ""

View File

@ -78,43 +78,43 @@ msgid "Ammo group updated successfully"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/invite_live/index.html.heex:96
#: lib/cannery_web/live/invite_live/index.html.heex:125
#: lib/cannery_web/live/invite_live/index.html.heex:97
#: lib/cannery_web/live/invite_live/index.html.heex:126
msgid "Are you sure you want to delete %{email}? This action is permanent!"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/ammo_type_live/show.html.heex:26
#: lib/cannery_web/live/container_live/index.html.heex:36
#: lib/cannery_web/live/container_live/index.html.heex:37
#: lib/cannery_web/live/container_live/show.html.heex:36
#: lib/cannery_web/live/tag_live/index.html.heex:36
#: lib/cannery_web/live/tag_live/index.html.heex:37
msgid "Are you sure you want to delete %{name}?"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/invite_live/index.html.heex:48
#: lib/cannery_web/live/invite_live/index.html.heex:49
msgid "Are you sure you want to delete the invite for %{name}?"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/ammo_group_live/index.html.heex:107
#: lib/cannery_web/live/ammo_group_live/index.html.heex:108
#: lib/cannery_web/live/ammo_group_live/show.html.heex:41
#: lib/cannery_web/live/ammo_type_live/index.html.heex:64
#: lib/cannery_web/live/ammo_type_live/index.html.heex:65
msgid "Are you sure you want to delete this ammo?"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/templates/user_settings/edit.html.heex:104
#: lib/cannery_web/templates/user_settings/edit.html.heex:106
msgid "Are you sure you want to delete your account?"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/components/topbar.ex:81
#: lib/cannery_web/components/topbar.ex:85
msgid "Are you sure you want to log out?"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/invite_live/index.html.heex:71
#: lib/cannery_web/live/invite_live/index.html.heex:72
msgid "Are you sure you want to make %{name} unlimited?"
msgstr ""
@ -175,7 +175,7 @@ msgid "Your account has been deleted"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/container_live/show.html.heex:68
#: lib/cannery_web/live/container_live/show.html.heex:69
msgid "Are you sure you want to remove the %{tag_name} tag from %{container_name}?"
msgstr ""
@ -200,7 +200,7 @@ msgid "Shots recorded successfully"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/range_live/index.html.heex:28
#: lib/cannery_web/live/range_live/index.html.heex:29
msgid "Are you sure you want to unstage this ammo?"
msgstr ""
@ -210,7 +210,7 @@ msgid "Ammo group unstaged succesfully"
msgstr ""
#, elixir-format, ex-autogen
#: lib/cannery_web/live/range_live/index.html.heex:101
#: lib/cannery_web/live/range_live/index.html.heex:104
msgid "Are you sure you want to delete this shot record?"
msgstr ""