Compare commits
28 Commits
f0589348cc
...
0.2.1
Author | SHA1 | Date | |
---|---|---|---|
08c9cddc78 | |||
e6285c282b | |||
61829fc042 | |||
e2f8fd3ee5 | |||
763c9e521e | |||
98747be7c2 | |||
91288a9ffa | |||
a19ec682e6 | |||
dba53106fb | |||
91ff0c14e4 | |||
bf27511caa | |||
4ff2f64a22 | |||
146c8e7ab3 | |||
cad2fc9c3a | |||
9e0e9ea2ae | |||
2a0f5720ee | |||
aede4f45ba | |||
889e08e42c | |||
8fae6c4661 | |||
9529343a91 | |||
676623d4c1 | |||
25bca35e0e | |||
3a17c40795 | |||
f63aa4c832 | |||
f55f113622 | |||
b86667da98 | |||
290b4b791d | |||
736cd3ab57 |
20
.drone.yml
20
.drone.yml
@ -27,19 +27,35 @@ steps:
|
||||
- npm install --prefix assets
|
||||
- mix test
|
||||
|
||||
- name: build and publish
|
||||
- name: build and publish stable
|
||||
image: plugins/docker
|
||||
settings:
|
||||
repo: shibaobun/cannery
|
||||
tags: latest
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
tags:
|
||||
- latest
|
||||
- ${DRONE_TAG}
|
||||
when:
|
||||
branch:
|
||||
- stable
|
||||
|
||||
- name: build and publish tagged version
|
||||
image: plugins/docker
|
||||
settings:
|
||||
repo: shibaobun/cannery
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
tags:
|
||||
- ${DRONE_TAG}
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: rebuild-cache
|
||||
image: drillster/drone-volume-cache
|
||||
volumes:
|
||||
|
17
CHANGELOG.md
Normal file
17
CHANGELOG.md
Normal file
@ -0,0 +1,17 @@
|
||||
# v0.2.1
|
||||
- Fix checkbox spacing for mobile view
|
||||
- Fix spacing with form elements in mobile view
|
||||
- Fix user card spacing
|
||||
|
||||
# v0.2.0
|
||||
- Add or remove tags from containers list and details page
|
||||
- Show tags on containers
|
||||
- Add "Cannery" to page titles
|
||||
- Don't show true/false column for ammo types if all values are false
|
||||
- Fix ammo type firing type display
|
||||
- Show original count, current value, and percentage remaining for ammo groups
|
||||
- Show shot history for an ammo group
|
||||
- Show ammo round totals and total shot for ammo types
|
||||
|
||||
# v0.1.0
|
||||
- Initial release!
|
@ -1,4 +1,4 @@
|
||||
FROM elixir:1.12.2-alpine AS build
|
||||
FROM elixir:1.13-alpine AS build
|
||||
|
||||
# install build dependencies
|
||||
RUN apk add --no-cache build-base npm git python3
|
||||
@ -34,7 +34,7 @@ RUN mix do phx.digest, gettext.extract
|
||||
RUN mix do compile, release
|
||||
|
||||
# prepare release image
|
||||
FROM alpine:3.9 AS app
|
||||
FROM alpine:latest AS app
|
||||
|
||||
RUN apk upgrade --no-cache && \
|
||||
apk add --no-cache bash openssl libgcc libstdc++ ncurses-libs
|
||||
|
@ -1,5 +1,7 @@
|
||||
# Cannery
|
||||
|
||||

|
||||
|
||||
The self-hosted firearm tracker website.
|
||||
|
||||
* Easy to Use: Cannery lets you easily keep an eye on your ammo levels before
|
||||
|
@ -16,6 +16,24 @@ $fa-font-path: "@fortawesome/fontawesome-free/webfonts";
|
||||
scrollbar-color: rgba(161, 161, 170, var(--tw-bg-opacity)) white;
|
||||
}
|
||||
|
||||
.fa-fade {
|
||||
animation: pulse 1s ease-in-out 0s infinite alternate;
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0% { scale: 0.95; opacity: 0.5; }
|
||||
100% { scale: 1.0; opacity: 1; }
|
||||
}
|
||||
|
||||
.phx-connected > #disconnect, #loading {
|
||||
opacity: 0 !important;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.phx-loading:not(.phx-error) > #loading, .phx-error > #disconnect {
|
||||
opacity: 0.95 !important;
|
||||
}
|
||||
|
||||
/* Alerts and form errors used by phx.new */
|
||||
.alert {
|
||||
padding: 15px;
|
||||
|
@ -17,8 +17,7 @@
|
||||
-o-transform: scale(1.5);
|
||||
transform: scale(1.5);
|
||||
padding: 10px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin: 1em auto;
|
||||
}
|
||||
|
||||
.title {
|
||||
|
@ -3,6 +3,7 @@ const colors = require('tailwindcss/colors')
|
||||
module.exports = {
|
||||
purge: [
|
||||
'../lib/**/*.ex',
|
||||
'../lib/**/*.heex',
|
||||
'../lib/**/*.leex',
|
||||
'../lib/**/*.eex',
|
||||
'./js/**/*.js'
|
||||
|
@ -6,19 +6,26 @@ services:
|
||||
container_name: cannery
|
||||
restart: always
|
||||
environment:
|
||||
- HOST="your.domain.com"
|
||||
- DATABASE_URL="ecto://postgres:postgres@cannery-db/cannery"
|
||||
# HOST must be set!
|
||||
# - HOST=your.domain.com
|
||||
- DATABASE_URL=ecto://postgres:postgres@cannery-db/cannery
|
||||
# Use `docker run -it shibaobun/cannery /app/priv/random.sh` to generate a secret key base
|
||||
# - SECRET_KEY_BASE="change-me-this-is-really-important-seriously-change-it"
|
||||
# - SECRET_KEY_BASE=change-me-this-is-really-important-seriously-change-it
|
||||
# uncomment to enable public sign ups, not recommended
|
||||
# - REGISTRATION="public"
|
||||
# - SMTP_HOST="cannery.example.tld" # must be set!
|
||||
# - SMTP_PORT="587" # optional
|
||||
# - SMTP_USERNAME="username"
|
||||
# - SMTP_PASSWORD="password"
|
||||
# - SMTP_SSL="false" # optional
|
||||
# - EMAIL_FROM="no-reply@cannery.example.tld" # optional
|
||||
# - EMAIL_NAME="Cannery" # optional
|
||||
# - REGISTRATION=public
|
||||
# SMTP host must be set!
|
||||
# - SMTP_HOST=smtp.mailserver.tld
|
||||
# optional, default is 587
|
||||
# - SMTP_PORT=587
|
||||
# SMTP username/passwords must be set!
|
||||
# - SMTP_USERNAME=username
|
||||
# - SMTP_PASSWORD=password
|
||||
# optional, default is false
|
||||
# - SMTP_SSL=false
|
||||
# optional, default is format below
|
||||
# - EMAIL_FROM=no-reply@cannery.example.tld
|
||||
# optional, default is "Cannery"
|
||||
# - EMAIL_NAME=Cannery
|
||||
expose:
|
||||
- "4000"
|
||||
depends_on:
|
||||
|
@ -3,7 +3,7 @@ defmodule Cannery.EmailWorker do
|
||||
Oban worker that dispatches emails
|
||||
"""
|
||||
|
||||
use Oban.Worker, queue: :mailers
|
||||
use Oban.Worker, queue: :mailers, tags: ["email"]
|
||||
alias Cannery.{Accounts, Email, Mailer}
|
||||
|
||||
@impl Oban.Worker
|
||||
|
@ -67,6 +67,59 @@ defmodule Cannery.Ammo do
|
||||
)
|
||||
end
|
||||
|
||||
@doc """
|
||||
Gets the total number of rounds for an ammo type
|
||||
|
||||
Raises `Ecto.NoResultsError` if the Ammo type does not exist.
|
||||
|
||||
## Examples
|
||||
|
||||
iex> get_round_count_for_ammo_type(123, %User{id: 123})
|
||||
%AmmoType{}
|
||||
|
||||
iex> get_round_count_for_ammo_type(456, %User{id: 123})
|
||||
** (Ecto.NoResultsError)
|
||||
|
||||
"""
|
||||
@spec get_round_count_for_ammo_type(AmmoType.t(), User.t()) :: non_neg_integer()
|
||||
def get_round_count_for_ammo_type(
|
||||
%AmmoType{id: ammo_type_id, user_id: user_id},
|
||||
%User{id: user_id}
|
||||
) do
|
||||
Repo.one!(
|
||||
from ag in AmmoGroup,
|
||||
where: ag.ammo_type_id == ^ammo_type_id,
|
||||
select: sum(ag.count)
|
||||
)
|
||||
end
|
||||
|
||||
@doc """
|
||||
Gets the total number of rounds shot for an ammo type
|
||||
|
||||
Raises `Ecto.NoResultsError` if the Ammo type does not exist.
|
||||
|
||||
## Examples
|
||||
|
||||
iex> get_used_count_for_ammo_type(123, %User{id: 123})
|
||||
%AmmoType{}
|
||||
|
||||
iex> get_used_count_for_ammo_type(456, %User{id: 123})
|
||||
** (Ecto.NoResultsError)
|
||||
|
||||
"""
|
||||
@spec get_used_count_for_ammo_type(AmmoType.t(), User.t()) :: non_neg_integer()
|
||||
def get_used_count_for_ammo_type(
|
||||
%AmmoType{id: ammo_type_id, user_id: user_id},
|
||||
%User{id: user_id}
|
||||
) do
|
||||
Repo.one!(
|
||||
from ag in AmmoGroup,
|
||||
left_join: sg in assoc(ag, :shot_groups),
|
||||
where: ag.ammo_type_id == ^ammo_type_id,
|
||||
select: sum(sg.count)
|
||||
)
|
||||
end
|
||||
|
||||
@doc """
|
||||
Creates a ammo_type.
|
||||
|
||||
@ -162,10 +215,12 @@ defmodule Cannery.Ammo do
|
||||
@spec list_ammo_groups_for_type(AmmoType.t(), User.t()) :: [AmmoGroup.t()]
|
||||
def list_ammo_groups_for_type(%AmmoType{id: ammo_type_id, user_id: user_id}, %User{id: user_id}) do
|
||||
Repo.all(
|
||||
from am in AmmoGroup,
|
||||
where: am.ammo_type_id == ^ammo_type_id,
|
||||
where: am.user_id == ^user_id,
|
||||
order_by: am.id
|
||||
from ag in AmmoGroup,
|
||||
left_join: sg in assoc(ag, :shot_groups),
|
||||
where: ag.ammo_type_id == ^ammo_type_id,
|
||||
where: ag.user_id == ^user_id,
|
||||
preload: [shot_groups: sg],
|
||||
order_by: ag.id
|
||||
)
|
||||
end
|
||||
|
||||
@ -182,12 +237,18 @@ defmodule Cannery.Ammo do
|
||||
@spec list_ammo_groups(User.t(), include_empty :: boolean()) :: [AmmoGroup.t()]
|
||||
def list_ammo_groups(%User{id: user_id}, include_empty \\ false) do
|
||||
if include_empty do
|
||||
from am in AmmoGroup, where: am.user_id == ^user_id, order_by: am.id
|
||||
from ag in AmmoGroup,
|
||||
left_join: sg in assoc(ag, :shot_groups),
|
||||
where: ag.user_id == ^user_id,
|
||||
preload: [shot_groups: sg],
|
||||
order_by: ag.id
|
||||
else
|
||||
from am in AmmoGroup,
|
||||
where: am.user_id == ^user_id,
|
||||
where: not (am.count == 0),
|
||||
order_by: am.id
|
||||
from ag in AmmoGroup,
|
||||
left_join: sg in assoc(ag, :shot_groups),
|
||||
where: ag.user_id == ^user_id,
|
||||
where: not (ag.count == 0),
|
||||
preload: [shot_groups: sg],
|
||||
order_by: ag.id
|
||||
end
|
||||
|> Repo.all()
|
||||
end
|
||||
@ -204,10 +265,12 @@ defmodule Cannery.Ammo do
|
||||
@spec list_staged_ammo_groups(User.t()) :: [AmmoGroup.t()]
|
||||
def list_staged_ammo_groups(%User{id: user_id}) do
|
||||
Repo.all(
|
||||
from am in AmmoGroup,
|
||||
where: am.user_id == ^user_id,
|
||||
where: am.staged == true,
|
||||
order_by: am.id
|
||||
from ag in AmmoGroup,
|
||||
left_join: sg in assoc(ag, :shot_groups),
|
||||
where: ag.user_id == ^user_id,
|
||||
where: ag.staged == true,
|
||||
preload: [shot_groups: sg],
|
||||
order_by: ag.id
|
||||
)
|
||||
end
|
||||
|
||||
@ -226,8 +289,42 @@ defmodule Cannery.Ammo do
|
||||
|
||||
"""
|
||||
@spec get_ammo_group!(AmmoGroup.id(), User.t()) :: AmmoGroup.t()
|
||||
def get_ammo_group!(id, %User{id: user_id}),
|
||||
do: Repo.one!(from am in AmmoGroup, where: am.id == ^id and am.user_id == ^user_id)
|
||||
def get_ammo_group!(id, %User{id: user_id}) do
|
||||
Repo.one!(
|
||||
from ag in AmmoGroup,
|
||||
left_join: sg in assoc(ag, :shot_groups),
|
||||
where: ag.id == ^id,
|
||||
where: ag.user_id == ^user_id,
|
||||
preload: [shot_groups: sg]
|
||||
)
|
||||
end
|
||||
|
||||
@doc """
|
||||
Returns the number of shot rounds for an ammo group
|
||||
"""
|
||||
@spec get_used_count(AmmoGroup.t()) :: non_neg_integer()
|
||||
def get_used_count(%AmmoGroup{} = ammo_group) do
|
||||
ammo_group
|
||||
|> Repo.preload(:shot_groups)
|
||||
|> Map.get(:shot_groups)
|
||||
|> Enum.map(fn %{count: count} -> count end)
|
||||
|> Enum.sum()
|
||||
end
|
||||
|
||||
@doc """
|
||||
Calculates the percentage remaining of an ammo group out of 100
|
||||
"""
|
||||
@spec get_percentage_remaining(AmmoGroup.t()) :: non_neg_integer()
|
||||
def get_percentage_remaining(%AmmoGroup{count: 0}), do: 0
|
||||
|
||||
def get_percentage_remaining(%AmmoGroup{count: count} = ammo_group) do
|
||||
ammo_group = ammo_group |> Repo.preload(:shot_groups)
|
||||
|
||||
shot_group_sum =
|
||||
ammo_group.shot_groups |> Enum.map(fn %{count: count} -> count end) |> Enum.sum()
|
||||
|
||||
round(count / (count + shot_group_sum) * 100)
|
||||
end
|
||||
|
||||
@doc """
|
||||
Creates a ammo_group.
|
||||
@ -256,6 +353,12 @@ defmodule Cannery.Ammo do
|
||||
|> Repo.insert()
|
||||
end
|
||||
|
||||
def create_ammo_group(invalid_attrs, _user) do
|
||||
%AmmoGroup{}
|
||||
|> AmmoGroup.create_changeset(invalid_attrs |> Map.put("user_id", "-1"))
|
||||
|> Repo.insert()
|
||||
end
|
||||
|
||||
@doc """
|
||||
Updates a ammo_group.
|
||||
|
||||
|
@ -19,8 +19,16 @@ defmodule Cannery.Containers do
|
||||
|
||||
"""
|
||||
@spec list_containers(User.t()) :: [Container.t()]
|
||||
def list_containers(%User{id: user_id}),
|
||||
do: Repo.all(from c in Container, where: c.user_id == ^user_id, order_by: c.name)
|
||||
def list_containers(%User{id: user_id}) do
|
||||
Repo.all(
|
||||
from c in Container,
|
||||
left_join: t in assoc(c, :tags),
|
||||
left_join: ag in assoc(c, :ammo_groups),
|
||||
where: c.user_id == ^user_id,
|
||||
order_by: c.name,
|
||||
preload: [tags: t, ammo_groups: ag]
|
||||
)
|
||||
end
|
||||
|
||||
@doc """
|
||||
Gets a single container.
|
||||
@ -37,8 +45,17 @@ defmodule Cannery.Containers do
|
||||
|
||||
"""
|
||||
@spec get_container!(Container.id(), User.t()) :: Container.t()
|
||||
def get_container!(id, %User{id: user_id}),
|
||||
do: Repo.one!(from c in Container, where: c.id == ^id and c.user_id == ^user_id)
|
||||
def get_container!(id, %User{id: user_id}) do
|
||||
Repo.one!(
|
||||
from c in Container,
|
||||
left_join: t in assoc(c, :tags),
|
||||
left_join: ag in assoc(c, :ammo_groups),
|
||||
where: c.user_id == ^user_id,
|
||||
where: c.id == ^id,
|
||||
order_by: c.name,
|
||||
preload: [tags: t, ammo_groups: ag]
|
||||
)
|
||||
end
|
||||
|
||||
@doc """
|
||||
Creates a container.
|
||||
@ -189,4 +206,17 @@ defmodule Cannery.Containers do
|
||||
|
||||
if count == 0, do: raise("could not delete container tag"), else: count
|
||||
end
|
||||
|
||||
@doc """
|
||||
Returns number of rounds in container. If data is already preloaded, then
|
||||
there will be no db hit.
|
||||
"""
|
||||
@spec get_container_rounds!(Container.t()) :: non_neg_integer()
|
||||
def get_container_rounds!(%Container{} = container) do
|
||||
container
|
||||
|> Repo.preload(:ammo_groups)
|
||||
|> Map.get(:ammo_groups)
|
||||
|> Enum.map(fn %{count: count} -> count end)
|
||||
|> Enum.sum()
|
||||
end
|
||||
end
|
||||
|
@ -1,5 +1,5 @@
|
||||
<div>
|
||||
<h2 class="text-center title text-xl text-primary-600">
|
||||
<h2 class="mb-8 text-center title text-xl text-primary-600">
|
||||
<%= gettext("Record shots") %>
|
||||
</h2>
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
let={f}
|
||||
for={@changeset}
|
||||
id="shot-group-form"
|
||||
class="flex flex-col sm:grid sm:grid-cols-3 justify-center items-center space-y-4"
|
||||
class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
||||
phx-target={@myself}
|
||||
phx-change="validate"
|
||||
phx-submit="save"
|
||||
|
@ -4,17 +4,21 @@ defmodule CanneryWeb.Components.ContainerCard do
|
||||
"""
|
||||
|
||||
use CanneryWeb, :component
|
||||
import CanneryWeb.Components.TagCard
|
||||
alias Cannery.{Containers, Repo}
|
||||
alias CanneryWeb.Endpoint
|
||||
|
||||
def container_card(assigns) do
|
||||
def container_card(%{container: container} = assigns) do
|
||||
assigns = assigns |> Map.put(:container, container |> Repo.preload([:tags, :ammo_groups]))
|
||||
|
||||
~H"""
|
||||
<div
|
||||
id={"container-#{@container.id}"}
|
||||
class="mx-4 my-2 px-8 py-4 flex flex-col justify-center items-center
|
||||
class="mx-4 my-2 px-8 py-4 flex flex-col justify-center items-center space-y-4
|
||||
border border-gray-400 rounded-lg shadow-lg hover:shadow-md
|
||||
transition-all duration-300 ease-in-out"
|
||||
>
|
||||
<div class="mb-4 flex flex-col justify-center items-center">
|
||||
<div class="mb-4 flex flex-col justify-center items-center space-y-2">
|
||||
<%= live_redirect to: Routes.container_show_path(Endpoint, :show, @container),
|
||||
class: "link" do %>
|
||||
<h1 class="px-4 py-2 rounded-lg title text-xl">
|
||||
@ -40,6 +44,25 @@ defmodule CanneryWeb.Components.ContainerCard do
|
||||
<%= @container.location %>
|
||||
</span>
|
||||
<% end %>
|
||||
|
||||
<%= if @container.ammo_groups do %>
|
||||
<span class="rounded-lg title text-lg">
|
||||
<%= gettext("Rounds:") %>
|
||||
<%= @container |> Containers.get_container_rounds!() %>
|
||||
</span>
|
||||
<% end %>
|
||||
|
||||
<div class="flex flex-wrap justify-center items-center">
|
||||
<%= unless @container.tags |> Enum.empty?() do %>
|
||||
<%= for tag <- @container.tags do %>
|
||||
<.simple_tag_card tag={tag} />
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<%= if assigns |> Map.has_key?(:tag_actions) do %>
|
||||
<%= render_slot(@tag_actions) %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= if assigns |> Map.has_key?(:inner_block) do %>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<div class="w-full flex flex-col space-y-8 justify-center items-center">
|
||||
<h2 class="text-center title text-xl text-primary-600">
|
||||
<h2 class="mb-8 text-center title text-xl text-primary-600">
|
||||
<%= gettext("Move ammo") %>
|
||||
</h2>
|
||||
|
||||
|
@ -13,15 +13,20 @@ defmodule CanneryWeb.Components.TagCard 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"
|
||||
style={"color: #{@tag.text_color}; background-color: #{@tag.bg_color}"}
|
||||
>
|
||||
<%= @tag.name %>
|
||||
</h1>
|
||||
|
||||
<.simple_tag_card tag={@tag} />
|
||||
<%= render_slot(@inner_block) %>
|
||||
</div>
|
||||
"""
|
||||
end
|
||||
|
||||
def simple_tag_card(assigns) do
|
||||
~H"""
|
||||
<h1
|
||||
class="mx-2 my-1 px-4 py-2 rounded-lg title text-xl"
|
||||
style={"color: #{@tag.text_color}; background-color: #{@tag.bg_color}"}
|
||||
>
|
||||
<%= @tag.name %>
|
||||
</h1>
|
||||
"""
|
||||
end
|
||||
end
|
||||
|
@ -16,11 +16,10 @@ defmodule CanneryWeb.Components.Topbar do
|
||||
<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 %>
|
||||
<%= live_redirect("Cannery",
|
||||
to: Routes.live_path(Endpoint, HomeLive),
|
||||
class: "mx-2 my-1 leading-5 text-xl text-white hover:underline"
|
||||
) %>
|
||||
|
||||
<%= if @title_content do %>
|
||||
<span class="mx-2 my-1">
|
||||
@ -38,47 +37,47 @@ defmodule CanneryWeb.Components.Topbar do
|
||||
>
|
||||
<%= if @current_user do %>
|
||||
<li class="mx-2 my-1">
|
||||
<%= link(gettext("Tags"),
|
||||
class: "hover:underline",
|
||||
to: Routes.tag_index_path(Endpoint, :index)
|
||||
<%= live_redirect(gettext("Tags"),
|
||||
to: Routes.tag_index_path(Endpoint, :index),
|
||||
class: "text-primary-600 text-white hover:underline"
|
||||
) %>
|
||||
</li>
|
||||
<li class="mx-2 my-1">
|
||||
<%= link(gettext("Containers"),
|
||||
class: "hover:underline",
|
||||
to: Routes.container_index_path(Endpoint, :index)
|
||||
<%= live_redirect(gettext("Containers"),
|
||||
to: Routes.container_index_path(Endpoint, :index),
|
||||
class: "text-primary-600 text-white hover:underline"
|
||||
) %>
|
||||
</li>
|
||||
<li class="mx-2 my-1">
|
||||
<%= link(gettext("Ammo"),
|
||||
class: "hover:underline",
|
||||
to: Routes.ammo_type_index_path(Endpoint, :index)
|
||||
<%= live_redirect(gettext("Ammo"),
|
||||
to: Routes.ammo_type_index_path(Endpoint, :index),
|
||||
class: "text-primary-600 text-white hover:underline"
|
||||
) %>
|
||||
</li>
|
||||
<li class="mx-2 my-1">
|
||||
<%= link(gettext("Manage"),
|
||||
class: "hover:underline",
|
||||
to: Routes.ammo_group_index_path(Endpoint, :index)
|
||||
<%= live_redirect(gettext("Manage"),
|
||||
to: Routes.ammo_group_index_path(Endpoint, :index),
|
||||
class: "text-primary-600 text-white hover:underline"
|
||||
) %>
|
||||
</li>
|
||||
<li class="mx-2 my-1">
|
||||
<%= link(gettext("Range"),
|
||||
class: "hover:underline",
|
||||
to: Routes.range_index_path(Endpoint, :index)
|
||||
<%= live_redirect(gettext("Range"),
|
||||
to: Routes.range_index_path(Endpoint, :index),
|
||||
class: "text-primary-600 text-white hover:underline"
|
||||
) %>
|
||||
</li>
|
||||
<%= if @current_user.role == :admin do %>
|
||||
<li class="mx-2 my-1">
|
||||
<%= link(gettext("Invites"),
|
||||
class: "hover:underline",
|
||||
to: Routes.invite_index_path(Endpoint, :index)
|
||||
<%= live_redirect(gettext("Invites"),
|
||||
to: Routes.invite_index_path(Endpoint, :index),
|
||||
class: "text-primary-600 text-white hover:underline"
|
||||
) %>
|
||||
</li>
|
||||
<% end %>
|
||||
<li class="mx-2 my-1">
|
||||
<%= link(@current_user.email,
|
||||
class: "hover:underline truncate",
|
||||
to: Routes.user_settings_path(Endpoint, :edit)
|
||||
<%= live_redirect(@current_user.email,
|
||||
to: Routes.user_settings_path(Endpoint, :edit),
|
||||
class: "text-primary-600 text-white hover:underline truncate"
|
||||
) %>
|
||||
</li>
|
||||
<li class="mx-2 my-1">
|
||||
@ -90,7 +89,8 @@ defmodule CanneryWeb.Components.Topbar do
|
||||
</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 %>
|
||||
<%= live_redirect to: Routes.live_dashboard_path(Endpoint, :home),
|
||||
class: "text-primary-600 text-white hover:underline" do %>
|
||||
<i class="fas fa-tachometer-alt"></i>
|
||||
<% end %>
|
||||
</li>
|
||||
@ -98,16 +98,16 @@ defmodule CanneryWeb.Components.Topbar do
|
||||
<% else %>
|
||||
<%= if Accounts.allow_registration?() do %>
|
||||
<li class="mx-2 my-1">
|
||||
<%= link(dgettext("actions", "Register"),
|
||||
class: "hover:underline",
|
||||
to: Routes.user_registration_path(Endpoint, :new)
|
||||
<%= live_redirect(dgettext("actions", "Register"),
|
||||
to: Routes.user_registration_path(Endpoint, :new),
|
||||
class: "text-primary-600 text-white hover:underline truncate"
|
||||
) %>
|
||||
</li>
|
||||
<% end %>
|
||||
<li class="mx-2 my-1">
|
||||
<%= link(dgettext("actions", "Log in"),
|
||||
class: "hover:underline",
|
||||
to: Routes.user_session_path(Endpoint, :new)
|
||||
<%= live_redirect(dgettext("actions", "Log in"),
|
||||
to: Routes.user_session_path(Endpoint, :new),
|
||||
class: "text-primary-600 text-white hover:underline truncate"
|
||||
) %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
@ -9,7 +9,7 @@ defmodule CanneryWeb.Components.UserCard do
|
||||
~H"""
|
||||
<div
|
||||
id={"user-#{@user.id}"}
|
||||
class="mx-4 my-2 px-8 py-4 flex flex-col justify-center items-center
|
||||
class="mx-4 my-2 px-8 py-4 flex flex-col justify-center items-center text-center
|
||||
border border-gray-400 rounded-lg shadow-lg hover:shadow-md
|
||||
transition-all duration-300 ease-in-out"
|
||||
>
|
||||
@ -21,7 +21,8 @@ defmodule CanneryWeb.Components.UserCard do
|
||||
<%= if @user.confirmed_at |> is_nil() do %>
|
||||
Email unconfirmed
|
||||
<% else %>
|
||||
User was confirmed at<%= @user.confirmed_at |> display_datetime() %>
|
||||
<p>User was confirmed at</p>
|
||||
<%= @user.confirmed_at |> display_datetime() %>
|
||||
<% end %>
|
||||
</h3>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<div>
|
||||
<h2 class="text-center title text-xl text-primary-600">
|
||||
<h2 class="mb-8 text-center title text-xl text-primary-600">
|
||||
<%= @title %>
|
||||
</h2>
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
phx-target={@myself}
|
||||
phx-change="validate"
|
||||
phx-submit="save"
|
||||
class="flex flex-col sm:grid sm:grid-cols-3 justify-center items-center space-y-4"
|
||||
class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
||||
>
|
||||
<%= if @changeset.action && not @changeset.valid? do %>
|
||||
<div class="invalid-feedback col-span-3 text-center">
|
||||
|
@ -33,7 +33,7 @@
|
||||
<%= gettext("Price paid") %>
|
||||
</th>
|
||||
<th class="p-2">
|
||||
<%= gettext("Notes") %>
|
||||
<%= gettext("% left") %>
|
||||
</th>
|
||||
<th class="p-2">
|
||||
<%= gettext("Range") %>
|
||||
@ -68,7 +68,7 @@
|
||||
</td>
|
||||
|
||||
<td class="p-2">
|
||||
<%= ammo_group.notes %>
|
||||
<%= "#{ammo_group |> Ammo.get_percentage_remaining()}%" %>
|
||||
</td>
|
||||
|
||||
<td class="p-2">
|
||||
|
@ -9,6 +9,16 @@
|
||||
<%= @ammo_group.count %>
|
||||
</span>
|
||||
|
||||
<span class="rounded-lg title text-lg">
|
||||
<%= gettext("Original count:") %>
|
||||
<%= @ammo_group.count + Ammo.get_used_count(@ammo_group) %>
|
||||
</span>
|
||||
|
||||
<span class="rounded-lg title text-lg">
|
||||
<%= gettext("Percentage left:") %>
|
||||
<%= "#{@ammo_group |> Ammo.get_percentage_remaining()}%" %>
|
||||
</span>
|
||||
|
||||
<%= if @ammo_group.notes do %>
|
||||
<span class="rounded-lg title text-lg">
|
||||
<%= gettext("Notes:") %>
|
||||
@ -18,11 +28,20 @@
|
||||
|
||||
<%= if @ammo_group.price_paid do %>
|
||||
<span class="rounded-lg title text-lg">
|
||||
<%= gettext("Price paid:") %>
|
||||
<%= gettext("Original cost:") %>
|
||||
<%= gettext("$%{amount}",
|
||||
amount: @ammo_group.price_paid |> :erlang.float_to_binary(decimals: 2)
|
||||
) %>
|
||||
</span>
|
||||
|
||||
<span class="rounded-lg title text-lg">
|
||||
<%= gettext("Current value:") %>
|
||||
<%= gettext("$%{amount}",
|
||||
amount:
|
||||
(@ammo_group.price_paid * Ammo.get_percentage_remaining(@ammo_group) / 100)
|
||||
|> :erlang.float_to_binary(decimals: 2)
|
||||
) %>
|
||||
</span>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@ -84,6 +103,47 @@
|
||||
<%= gettext("This ammo group is not in a container") %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= unless @ammo_group.shot_groups |> Enum.empty?() do %>
|
||||
<hr class="mb-4 w-full" />
|
||||
|
||||
<h1 class="mb-4 px-4 py-2 text-center rounded-lg title text-xl">
|
||||
<%= gettext("Rounds used") %>
|
||||
</h1>
|
||||
|
||||
<div class="w-full overflow-x-auto border border-gray-600 rounded-lg shadow-lg bg-black">
|
||||
<table class="min-w-full table-auto text-center bg-white">
|
||||
<thead class="border-b border-primary-600">
|
||||
<tr>
|
||||
<th class="p-2">
|
||||
<%= gettext("Rounds shot") %>
|
||||
</th>
|
||||
<th class="p-2">
|
||||
<%= gettext("Notes") %>
|
||||
</th>
|
||||
<th class="p-2">
|
||||
<%= gettext("Date") %>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="shot_groups">
|
||||
<%= for shot_group <- @ammo_group.shot_groups do %>
|
||||
<tr id={"shot_group-#{shot_group.id}"}>
|
||||
<td class="p-2">
|
||||
<%= shot_group.count %>
|
||||
</td>
|
||||
<td class="p-2">
|
||||
<%= shot_group.notes %>
|
||||
</td>
|
||||
<td class="p-2">
|
||||
<%= shot_group.date |> display_date() %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= case @live_action do %>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<div>
|
||||
<h2 class="text-center title text-xl text-primary-600">
|
||||
<h2 class="mb-8 text-center title text-xl text-primary-600">
|
||||
<%= @title %>
|
||||
</h2>
|
||||
<.form
|
||||
@ -9,7 +9,7 @@
|
||||
phx-target={@myself}
|
||||
phx-change="validate"
|
||||
phx-submit="save"
|
||||
class="flex flex-col sm:grid sm:grid-cols-3 justify-center items-center space-y-4"
|
||||
class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
||||
>
|
||||
<%= if @changeset.action && not @changeset.valid? do %>
|
||||
<div class="invalid-feedback col-span-3 text-center">
|
||||
@ -97,10 +97,7 @@
|
||||
<%= label(f, :powder_type, gettext("Powder type"),
|
||||
class: "mr-4 title text-lg text-primary-600"
|
||||
) %>
|
||||
<%= text_input(f, :powder_type,
|
||||
class: "text-center col-span-2 input input-primary",
|
||||
placeholder: gettext("Brass")
|
||||
) %>
|
||||
<%= text_input(f, :powder_type, class: "text-center col-span-2 input input-primary") %>
|
||||
<%= error_tag(f, :powder_type, "col-span-3 text-center") %>
|
||||
|
||||
<%= label(f, :powder_grains_per_charge, gettext("Powder grains per charge"),
|
||||
|
@ -61,7 +61,7 @@ defmodule CanneryWeb.AmmoTypeLive.Index do
|
||||
{gettext("Grains"), :grains, :string},
|
||||
{gettext("Pressure"), :pressure, :string},
|
||||
{gettext("Primer type"), :primer_type, :string},
|
||||
{gettext("Rimfire"), :rimfire, :boolean},
|
||||
{gettext("Firing type"), :firing_type, :string},
|
||||
{gettext("Tracer"), :tracer, :boolean},
|
||||
{gettext("Incendiary"), :incendiary, :boolean},
|
||||
{gettext("Blank"), :blank, :boolean},
|
||||
@ -69,9 +69,12 @@ defmodule CanneryWeb.AmmoTypeLive.Index do
|
||||
{gettext("Manufacturer"), :manufacturer, :string},
|
||||
{gettext("UPC"), :upc, :string}
|
||||
]
|
||||
# filter columns to only used ones
|
||||
|> Enum.filter(fn {_label, field, _type} ->
|
||||
ammo_types |> Enum.any?(fn ammo_type -> not (ammo_type |> Map.get(field) |> is_nil()) end)
|
||||
|> Enum.filter(fn {_label, field, type} ->
|
||||
# remove columns if all values match defaults
|
||||
default_value = if type == :boolean, do: false, else: nil
|
||||
|
||||
ammo_types
|
||||
|> Enum.any?(fn ammo_type -> not (ammo_type |> Map.get(field) == default_value) end)
|
||||
end)
|
||||
|
||||
socket |> assign(ammo_types: ammo_types, columns_to_display: columns_to_display)
|
||||
|
@ -28,6 +28,9 @@
|
||||
<%= field_name %>
|
||||
</th>
|
||||
<% end %>
|
||||
<th class="p-2">
|
||||
<%= gettext("Total # of rounds") %>
|
||||
</th>
|
||||
|
||||
<th class="p-2"></th>
|
||||
</tr>
|
||||
@ -46,6 +49,10 @@
|
||||
</td>
|
||||
<% end %>
|
||||
|
||||
<td class="p-2">
|
||||
<%= ammo_type |> Ammo.get_round_count_for_ammo_type(@current_user) %>
|
||||
</td>
|
||||
|
||||
<td class="p-2">
|
||||
<div class="px-4 py-2 space-x-4 flex justify-center items-center">
|
||||
<%= live_redirect to: Routes.ammo_type_show_path(Endpoint, :show, ammo_type),
|
||||
|
@ -35,70 +35,75 @@
|
||||
|
||||
<hr class="hr" />
|
||||
|
||||
<div class="grid sm:grid-cols-2 text-center justify-center items-center">
|
||||
<%= for {field_name, field} <- [
|
||||
{gettext("Bullet type"), :bullet_type},
|
||||
{gettext("Bullet core"), :bullet_core},
|
||||
{gettext("Cartridge"), :cartridge},
|
||||
{gettext("Caliber"), :caliber},
|
||||
{gettext("Case material"), :case_material},
|
||||
{gettext("Jacket type"), :jacket_type},
|
||||
{gettext("Muzzle velocity"), :muzzle_velocity},
|
||||
{gettext("Powder type"), :powder_type},
|
||||
{gettext("Powder grains per charge"), :powder_grains_per_charge},
|
||||
{gettext("Grains"), :grains},
|
||||
{gettext("Pressure"), :pressure},
|
||||
{gettext("Primer type"), :primer_type}
|
||||
<div class="grid sm:grid-cols-2 gap-4 text-center justify-center items-center">
|
||||
<%= for {field_name, field, type} <- [
|
||||
{gettext("Bullet type"), :bullet_type, :string},
|
||||
{gettext("Bullet core"), :bullet_core, :string},
|
||||
{gettext("Cartridge"), :cartridge, :string},
|
||||
{gettext("Caliber"), :caliber, :string},
|
||||
{gettext("Case material"), :case_material, :string},
|
||||
{gettext("Jacket type"), :jacket_type, :string},
|
||||
{gettext("Muzzle velocity"), :muzzle_velocity, :string},
|
||||
{gettext("Powder type"), :powder_type, :string},
|
||||
{gettext("Powder grains per charge"), :powder_grains_per_charge, :string},
|
||||
{gettext("Grains"), :grains, :string},
|
||||
{gettext("Pressure"), :pressure, :string},
|
||||
{gettext("Primer type"), :primer_type, :string},
|
||||
{gettext("Firing type"), :firing_type, :string},
|
||||
{gettext("Tracer"), :tracer, :boolean},
|
||||
{gettext("Incendiary"), :incendiary, :boolean},
|
||||
{gettext("Blank"), :blank, :boolean},
|
||||
{gettext("Corrosive"), :corrosive, :boolean},
|
||||
{gettext("Manufacturer"), :manufacturer, :string},
|
||||
{gettext("UPC"), :upc, :string}
|
||||
] do %>
|
||||
<%= if @ammo_type |> Map.get(field) do %>
|
||||
<h3 class="mb-2 sm:mr-4 title text-lg">
|
||||
<h3 class="title text-lg">
|
||||
<%= field_name %>:
|
||||
</h3>
|
||||
|
||||
<span class="mb-4 sm:mb-2 text-primary-600">
|
||||
<%= @ammo_type |> Map.get(field) %>
|
||||
<span class="text-primary-600">
|
||||
<%= case type do %>
|
||||
<% :boolean -> %>
|
||||
<%= @ammo_type |> Map.get(field) |> humanize() %>
|
||||
<% _ -> %>
|
||||
<%= @ammo_type |> Map.get(field) %>
|
||||
<% end %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<%= for {field_name, field} <- [
|
||||
{"Rimfire", :rimfire},
|
||||
{"Tracer", :tracer},
|
||||
{"Incendiary", :incendiary},
|
||||
{"Blank", :blank},
|
||||
{"Corrosive", :corrosive}
|
||||
] do %>
|
||||
<h3 class="mb-2 sm:mr-4 title text-lg">
|
||||
<%= field_name %>:
|
||||
</h3>
|
||||
<h3 class="title text-lg">
|
||||
<%= gettext("Current # of rounds:") %>
|
||||
</h3>
|
||||
|
||||
<span class="mb-4 sm:mb-2 text-primary-600">
|
||||
<%= @ammo_type |> Map.get(field) |> humanize() %>
|
||||
</span>
|
||||
<% end %>
|
||||
<span class="text-primary-600">
|
||||
<%= @ammo_type |> Ammo.get_round_count_for_ammo_type(@current_user) %>
|
||||
</span>
|
||||
|
||||
<%= for {field_name, field} <- [{"Manufacturer", :manufacturer}, {"UPC", :upc}] do %>
|
||||
<%= if @ammo_type |> Map.get(field) do %>
|
||||
<h3 class="mb-2 sm:mr-4 title text-lg">
|
||||
<%= field_name %>:
|
||||
</h3>
|
||||
<h3 class="title text-lg">
|
||||
<%= gettext("Total rounds shot:") %>
|
||||
</h3>
|
||||
|
||||
<span class="mb-4 sm:mb-2 text-primary-600">
|
||||
<%= @ammo_type |> Map.get(field) %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<span class="text-primary-600">
|
||||
<%= @ammo_type |> Ammo.get_used_count_for_ammo_type(@current_user) %>
|
||||
</span>
|
||||
|
||||
<%= if @avg_cost_per_round do %>
|
||||
<h3 class="mb-2 sm:mr-4 title text-lg">
|
||||
<h3 class="title text-lg">
|
||||
<%= gettext("Average Price paid") %>:
|
||||
</h3>
|
||||
|
||||
<span class="mb-4 sm:mb-2 text-primary-600">
|
||||
<span class="text-primary-600">
|
||||
<%= gettext("$%{amount}",
|
||||
amount: @avg_cost_per_round |> :erlang.float_to_binary(decimals: 2)
|
||||
) %>
|
||||
</span>
|
||||
<% else %>
|
||||
<h3 class="title text-lg col-span-2">
|
||||
<%= gettext("No cost information") %>
|
||||
<%= display_emoji("😔") %>
|
||||
</h3>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@ -107,10 +112,13 @@
|
||||
<div>
|
||||
<%= if @ammo_groups |> Enum.empty?() do %>
|
||||
<%= gettext("No ammo for this type") %>
|
||||
<%= display_emoji("😔") %>
|
||||
<% else %>
|
||||
<%= for ammo_group <- @ammo_groups do %>
|
||||
<.ammo_group_card ammo_group={ammo_group} />
|
||||
<% end %>
|
||||
<div class="flex flex-wrap justify-center items-center">
|
||||
<%= for ammo_group <- @ammo_groups do %>
|
||||
<.ammo_group_card ammo_group={ammo_group} />
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,51 +0,0 @@
|
||||
defmodule CanneryWeb.ContainerLive.AddTagComponent do
|
||||
@moduledoc """
|
||||
Livecomponent that can add a tag to a Container
|
||||
"""
|
||||
|
||||
use CanneryWeb, :live_component
|
||||
alias Cannery.{Accounts.User, Containers, Containers.Container, Tags, Tags.Tag}
|
||||
alias Phoenix.LiveView.Socket
|
||||
|
||||
@impl true
|
||||
@spec update(
|
||||
%{:container => Container.t(), :current_user => User.t(), optional(any) => any},
|
||||
Socket.t()
|
||||
) :: {:ok, Socket.t()}
|
||||
def update(%{container: _container, current_user: current_user} = assigns, socket) do
|
||||
{:ok, socket |> assign(assigns) |> assign(:tags, Tags.list_tags(current_user))}
|
||||
end
|
||||
|
||||
@impl true
|
||||
def handle_event(
|
||||
"save",
|
||||
%{"tag" => %{"tag_id" => tag_id}},
|
||||
%{
|
||||
assigns: %{
|
||||
tags: tags,
|
||||
container: container,
|
||||
current_user: current_user,
|
||||
return_to: return_to
|
||||
}
|
||||
} = socket
|
||||
) do
|
||||
socket =
|
||||
case tags |> Enum.find(fn %{id: id} -> tag_id == id end) do
|
||||
nil ->
|
||||
prompt = dgettext("errors", "Tag could not be added")
|
||||
socket |> put_flash(:error, prompt)
|
||||
|
||||
%{name: tag_name} = tag ->
|
||||
_container_tag = Containers.add_tag!(container, tag, current_user)
|
||||
prompt = dgettext("prompts", "%{name} added successfully", name: tag_name)
|
||||
socket |> put_flash(:info, prompt) |> push_redirect(to: return_to)
|
||||
end
|
||||
|
||||
{:noreply, socket}
|
||||
end
|
||||
|
||||
@spec tag_options([Tag.t()]) :: [{String.t(), Tag.id()}]
|
||||
defp tag_options(tags) do
|
||||
tags |> Enum.map(fn %{id: id, name: name} -> {name, id} end)
|
||||
end
|
||||
end
|
@ -1,22 +0,0 @@
|
||||
<div>
|
||||
<h2 class="mb-4 text-center title text-xl text-primary-600">
|
||||
<%= @title %>
|
||||
</h2>
|
||||
|
||||
<.form
|
||||
let={f}
|
||||
for={:tag}
|
||||
id="add-tag-to-container-form"
|
||||
class="flex flex-col sm:grid sm:grid-cols-3 justify-center items-center space-x-2"
|
||||
phx-target={@myself}
|
||||
phx-submit="save"
|
||||
>
|
||||
<%= select(f, :tag_id, tag_options(@tags), class: "text-center col-span-2 input input-primary") %>
|
||||
<%= error_tag(f, :tag_id, "col-span-3 text-center") %>
|
||||
|
||||
<%= submit(dgettext("actions", "Add"),
|
||||
class: "mx-auto btn btn-primary",
|
||||
phx_disable_with: dgettext("prompts", "Adding...")
|
||||
) %>
|
||||
</.form>
|
||||
</div>
|
73
lib/cannery_web/live/container_live/edit_tags_component.ex
Normal file
73
lib/cannery_web/live/container_live/edit_tags_component.ex
Normal file
@ -0,0 +1,73 @@
|
||||
defmodule CanneryWeb.ContainerLive.EditTagsComponent do
|
||||
@moduledoc """
|
||||
Livecomponent that can add or remove a tag to a Container
|
||||
"""
|
||||
|
||||
use CanneryWeb, :live_component
|
||||
alias Cannery.{Accounts.User, Containers, Containers.Container, Repo, Tags, Tags.Tag}
|
||||
alias Phoenix.LiveView.Socket
|
||||
|
||||
@impl true
|
||||
@spec update(
|
||||
%{:container => Container.t(), :current_user => User.t(), optional(any) => any},
|
||||
Socket.t()
|
||||
) :: {:ok, Socket.t()}
|
||||
def update(%{container: container, current_user: current_user} = assigns, socket) do
|
||||
tags = Tags.list_tags(current_user)
|
||||
container = container |> Repo.preload(:tags)
|
||||
{:ok, socket |> assign(assigns) |> assign(tags: tags, container: container)}
|
||||
end
|
||||
|
||||
@impl true
|
||||
def handle_event(
|
||||
"save",
|
||||
%{"tag" => %{"tag_id" => tag_id}},
|
||||
%{assigns: %{tags: tags, container: container, current_user: current_user}} = socket
|
||||
) do
|
||||
socket =
|
||||
case tags |> Enum.find(fn %{id: id} -> tag_id == id end) do
|
||||
nil ->
|
||||
prompt = dgettext("errors", "Tag could not be added")
|
||||
socket |> put_flash(:error, prompt)
|
||||
|
||||
%{name: tag_name} = tag ->
|
||||
_container_tag = Containers.add_tag!(container, tag, current_user)
|
||||
container = container |> Repo.preload(:tags, force: true)
|
||||
prompt = dgettext("prompts", "%{name} added successfully", name: tag_name)
|
||||
socket |> put_flash(:info, prompt) |> assign(container: container)
|
||||
end
|
||||
|
||||
{:noreply, socket}
|
||||
end
|
||||
|
||||
@impl true
|
||||
def handle_event(
|
||||
"delete",
|
||||
%{"tag-id" => tag_id},
|
||||
%{assigns: %{tags: tags, container: container, current_user: current_user}} = socket
|
||||
) do
|
||||
socket =
|
||||
case tags |> Enum.find(fn %{id: id} -> tag_id == id end) do
|
||||
nil ->
|
||||
prompt = dgettext("errors", "Tag could not be removed")
|
||||
socket |> put_flash(:error, prompt)
|
||||
|
||||
%{name: tag_name} = tag ->
|
||||
_container_tag = Containers.remove_tag!(container, tag, current_user)
|
||||
container = container |> Repo.preload(:tags, force: true)
|
||||
prompt = dgettext("prompts", "%{name} removed successfully", name: tag_name)
|
||||
socket |> put_flash(:info, prompt) |> assign(container: container)
|
||||
end
|
||||
|
||||
{:noreply, socket}
|
||||
end
|
||||
|
||||
@spec tag_options([Tag.t()], Container.t()) :: [{String.t(), Tag.id()}]
|
||||
defp tag_options(tags, %Container{tags: container_tags}) do
|
||||
container_tags_map = container_tags |> Enum.map(fn %{id: id} -> id end) |> MapSet.new()
|
||||
|
||||
tags
|
||||
|> Enum.reject(fn %{id: id} -> container_tags_map |> MapSet.member?(id) end)
|
||||
|> Enum.map(fn %{id: id, name: name} -> {name, id} end)
|
||||
end
|
||||
end
|
@ -0,0 +1,58 @@
|
||||
<div class="flex flex-col justify-center items-center text-center space-y-8">
|
||||
<h2 class="title text-xl text-primary-600">
|
||||
<%= @title %>
|
||||
</h2>
|
||||
|
||||
<div class="flex flex-wrap justify-center items-center">
|
||||
<%= for tag <- @container.tags do %>
|
||||
<%= link to: "#",
|
||||
class: "mx-2 my-1 px-4 py-2 rounded-lg title text-xl",
|
||||
style: "color: #{tag.text_color}; background-color: #{tag.bg_color}",
|
||||
phx_click: "delete",
|
||||
phx_value_tag_id: tag.id,
|
||||
phx_target: @myself,
|
||||
data: [
|
||||
confirm:
|
||||
dgettext(
|
||||
"prompts",
|
||||
"Are you sure you want to remove the %{tag_name} tag from %{container_name}?",
|
||||
tag_name: tag.name,
|
||||
container_name: @container.name
|
||||
)
|
||||
] do %>
|
||||
<%= tag.name %>
|
||||
<i class="fa-fw fa-sm fas fa-trash"></i>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<%= if @container.tags |> Enum.empty?() do %>
|
||||
<h2 class="title text-xl text-primary-600">
|
||||
<%= gettext("No tags") %>
|
||||
<%= display_emoji("😔") %>
|
||||
</h2>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= unless tag_options(@tags, @container) |> Enum.empty?() do %>
|
||||
<hr class="hr" />
|
||||
|
||||
<.form
|
||||
let={f}
|
||||
for={:tag}
|
||||
id="add-tag-to-container-form"
|
||||
class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
||||
phx-target={@myself}
|
||||
phx-submit="save"
|
||||
>
|
||||
<%= select(f, :tag_id, tag_options(@tags, @container),
|
||||
class: "text-center col-span-2 input input-primary"
|
||||
) %>
|
||||
<%= error_tag(f, :tag_id, "col-span-3 text-center") %>
|
||||
|
||||
<%= submit(dgettext("actions", "Add"),
|
||||
class: "mx-auto btn btn-primary",
|
||||
phx_disable_with: dgettext("prompts", "Adding...")
|
||||
) %>
|
||||
</.form>
|
||||
<% end %>
|
||||
</div>
|
@ -1,12 +1,12 @@
|
||||
<div>
|
||||
<h2 class="text-center title text-xl text-primary-600">
|
||||
<h2 class="mb-8 text-center title text-xl text-primary-600">
|
||||
<%= @title %>
|
||||
</h2>
|
||||
<.form
|
||||
let={f}
|
||||
for={@changeset}
|
||||
id="container-form"
|
||||
class="flex flex-col sm:grid sm:grid-cols-3 justify-center items-center space-y-4"
|
||||
class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
||||
phx-target={@myself}
|
||||
phx-change="validate"
|
||||
phx-submit="save"
|
||||
|
@ -5,13 +5,13 @@ defmodule CanneryWeb.ContainerLive.Index do
|
||||
|
||||
use CanneryWeb, :live_view
|
||||
import CanneryWeb.Components.ContainerCard
|
||||
alias Cannery.{Containers, Containers.Container}
|
||||
alias Cannery.{Containers, Containers.Container, Repo}
|
||||
alias CanneryWeb.Endpoint
|
||||
alias Ecto.Changeset
|
||||
|
||||
@impl true
|
||||
def mount(_params, session, socket) do
|
||||
{:ok, socket |> assign_defaults(session) |> display_containers()}
|
||||
{:ok, socket |> assign_defaults(session)}
|
||||
end
|
||||
|
||||
@impl true
|
||||
@ -20,9 +20,13 @@ defmodule CanneryWeb.ContainerLive.Index do
|
||||
end
|
||||
|
||||
defp apply_action(%{assigns: %{current_user: current_user}} = socket, :edit, %{"id" => id}) do
|
||||
%{name: container_name} =
|
||||
container =
|
||||
Containers.get_container!(id, current_user)
|
||||
|> Repo.preload([:tags, :ammo_groups], force: true)
|
||||
|
||||
socket
|
||||
|> assign(:page_title, gettext("Edit Container"))
|
||||
|> assign(:container, Containers.get_container!(id, current_user))
|
||||
|> assign(page_title: gettext("Edit %{name}", name: container_name), container: container)
|
||||
end
|
||||
|
||||
defp apply_action(socket, :new, _params) do
|
||||
@ -30,7 +34,19 @@ defmodule CanneryWeb.ContainerLive.Index do
|
||||
end
|
||||
|
||||
defp apply_action(socket, :index, _params) do
|
||||
socket |> assign(:page_title, gettext("Listing Containers")) |> assign(:container, nil)
|
||||
socket
|
||||
|> assign(:page_title, gettext("Listing Containers"))
|
||||
|> assign(:container, nil)
|
||||
|> display_containers()
|
||||
end
|
||||
|
||||
defp apply_action(%{assigns: %{current_user: current_user}} = socket, :edit_tags, %{"id" => id}) do
|
||||
%{name: container_name} =
|
||||
container =
|
||||
Containers.get_container!(id, current_user) |> Repo.preload([:tags, :ammo_groups])
|
||||
|
||||
page_title = gettext("Edit %{name} tags", name: container_name)
|
||||
socket |> assign(page_title: page_title, container: container)
|
||||
end
|
||||
|
||||
@impl true
|
||||
@ -70,6 +86,9 @@ defmodule CanneryWeb.ContainerLive.Index do
|
||||
end
|
||||
|
||||
defp display_containers(%{assigns: %{current_user: current_user}} = socket) do
|
||||
socket |> assign(containers: Containers.list_containers(current_user))
|
||||
containers =
|
||||
Containers.list_containers(current_user) |> Repo.preload([:tags, :ammo_groups], force: true)
|
||||
|
||||
socket |> assign(containers: containers)
|
||||
end
|
||||
end
|
||||
|
@ -23,6 +23,14 @@
|
||||
<div class="flex flex-row flex-wrap justify-center items-center">
|
||||
<%= for container <- @containers do %>
|
||||
<.container_card container={container}>
|
||||
<:tag_actions>
|
||||
<div class="mx-4 my-2">
|
||||
<%= live_patch to: Routes.container_index_path(Endpoint, :edit_tags, container),
|
||||
class: "text-primary-600 link" do %>
|
||||
<i class="fa-fw fa-lg fas fa-tags"></i>
|
||||
<% end %>
|
||||
</div>
|
||||
</:tag_actions>
|
||||
<%= live_patch to: Routes.container_index_path(Endpoint, :edit, container),
|
||||
class: "text-primary-600 link",
|
||||
data: [qa: "edit-#{container.id}"] do %>
|
||||
@ -58,3 +66,16 @@
|
||||
/>
|
||||
</.modal>
|
||||
<% end %>
|
||||
|
||||
<%= if @live_action == :edit_tags do %>
|
||||
<.modal return_to={Routes.container_index_path(Endpoint, :index)}>
|
||||
<.live_component
|
||||
module={CanneryWeb.ContainerLive.EditTagsComponent}
|
||||
id={@container.id}
|
||||
title={@page_title}
|
||||
action={@live_action}
|
||||
container={@container}
|
||||
current_user={@current_user}
|
||||
/>
|
||||
</.modal>
|
||||
<% end %>
|
||||
|
@ -19,10 +19,9 @@ defmodule CanneryWeb.ContainerLive.Show do
|
||||
def handle_params(
|
||||
%{"id" => id},
|
||||
_,
|
||||
%{assigns: %{current_user: current_user, live_action: live_action}} = socket
|
||||
%{assigns: %{current_user: current_user}} = socket
|
||||
) do
|
||||
{:noreply,
|
||||
socket |> assign(page_title: page_title(live_action)) |> render_container(id, current_user)}
|
||||
{:noreply, socket |> render_container(id, current_user)}
|
||||
end
|
||||
|
||||
@impl true
|
||||
@ -85,16 +84,20 @@ defmodule CanneryWeb.ContainerLive.Show do
|
||||
{:noreply, socket}
|
||||
end
|
||||
|
||||
defp page_title(:show), do: gettext("Show Container")
|
||||
defp page_title(:edit), do: gettext("Edit Container")
|
||||
defp page_title(:add_tag), do: gettext("Add Tag to Container")
|
||||
|
||||
@spec render_container(Socket.t(), Container.id(), User.t()) :: Socket.t()
|
||||
defp render_container(socket, id, current_user) do
|
||||
container =
|
||||
defp render_container(%{assigns: %{live_action: live_action}} = socket, id, current_user) do
|
||||
%{name: container_name} =
|
||||
container =
|
||||
Containers.get_container!(id, current_user)
|
||||
|> Repo.preload([:ammo_groups, :tags], force: true)
|
||||
|
||||
socket |> assign(container: container)
|
||||
page_title =
|
||||
case live_action do
|
||||
:show -> gettext("Show %{name}", name: container_name)
|
||||
:edit -> gettext("Edit %{name}", name: container_name)
|
||||
:edit_tags -> gettext("Edit %{name} tags", name: container_name)
|
||||
end
|
||||
|
||||
socket |> assign(container: container, page_title: page_title)
|
||||
end
|
||||
end
|
||||
|
@ -51,34 +51,23 @@
|
||||
</h2>
|
||||
|
||||
<%= live_patch(dgettext("actions", "Why not add one?"),
|
||||
to: Routes.container_show_path(Endpoint, :add_tag, @container),
|
||||
to: Routes.container_show_path(Endpoint, :edit_tags, @container),
|
||||
class: "btn btn-primary"
|
||||
) %>
|
||||
</div>
|
||||
<% else %>
|
||||
<h2 class="mb-4 title text-xl text-primary-600">
|
||||
<%= gettext("Tags") %>
|
||||
</h2>
|
||||
<div class="flex flex-wrap justify-center items-center">
|
||||
<%= for tag <- @container.tags do %>
|
||||
<.simple_tag_card tag={tag} />
|
||||
<% end %>
|
||||
|
||||
<%= for tag <- @container.tags do %>
|
||||
<.tag_card tag={tag}>
|
||||
<%= link to: "#",
|
||||
class: "text-primary-600 link",
|
||||
phx_click: "delete_tag",
|
||||
phx_value_tag_id: tag.id,
|
||||
data: [
|
||||
confirm:
|
||||
dgettext(
|
||||
"prompts",
|
||||
"Are you sure you want to remove the %{tag_name} tag from %{container_name}?",
|
||||
tag_name: tag.name,
|
||||
container_name: @container.name
|
||||
)
|
||||
] do %>
|
||||
<i class="fa-fw fa-lg fas fa-trash"></i>
|
||||
<div class="mx-4 my-2">
|
||||
<%= live_patch to: Routes.container_show_path(Endpoint, :edit_tags, @container),
|
||||
class: "text-primary-600 link" do %>
|
||||
<i class="fa-fw fa-lg fas fa-tags"></i>
|
||||
<% end %>
|
||||
</.tag_card>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<hr class="mb-4 hr" />
|
||||
@ -87,9 +76,11 @@
|
||||
<%= if @container.ammo_groups |> Enum.empty?() do %>
|
||||
<%= gettext("No ammo groups in this container") %>
|
||||
<% else %>
|
||||
<%= for ammo_group <- @container.ammo_groups do %>
|
||||
<.ammo_group_card ammo_group={ammo_group} />
|
||||
<% end %>
|
||||
<div class="flex flex-wrap justify-center items-center">
|
||||
<%= for ammo_group <- @container.ammo_groups do %>
|
||||
<.ammo_group_card ammo_group={ammo_group} />
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
@ -108,10 +99,10 @@
|
||||
</.modal>
|
||||
<% end %>
|
||||
|
||||
<%= if @live_action == :add_tag do %>
|
||||
<%= if @live_action == :edit_tags do %>
|
||||
<.modal return_to={Routes.container_show_path(Endpoint, :show, @container)}>
|
||||
<.live_component
|
||||
module={CanneryWeb.ContainerLive.AddTagComponent}
|
||||
module={CanneryWeb.ContainerLive.EditTagsComponent}
|
||||
id={@container.id}
|
||||
title={@page_title}
|
||||
action={@live_action}
|
||||
|
@ -9,7 +9,13 @@ defmodule CanneryWeb.HomeLive do
|
||||
@impl true
|
||||
def mount(_params, session, socket) do
|
||||
admins = Accounts.list_users_by_role(:admin)
|
||||
{:ok, socket |> assign_defaults(session) |> assign(query: "", results: %{}, admins: admins)}
|
||||
|
||||
socket =
|
||||
socket
|
||||
|> assign_defaults(session)
|
||||
|> assign(page_title: "Home", query: "", results: %{}, admins: admins)
|
||||
|
||||
{:ok, socket}
|
||||
end
|
||||
|
||||
@impl true
|
||||
@ -124,7 +130,7 @@ defmodule CanneryWeb.HomeLive do
|
||||
<li class="flex flex-row justify-center space-x-2">
|
||||
<b>Version:</b>
|
||||
<p>
|
||||
0.1.0
|
||||
0.2.1
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -1,12 +1,12 @@
|
||||
<div>
|
||||
<h2 class="text-center title text-xl text-primary-600">
|
||||
<h2 class="mb-8 text-center title text-xl text-primary-600">
|
||||
<%= @title %>
|
||||
</h2>
|
||||
<.form
|
||||
let={f}
|
||||
for={@changeset}
|
||||
id="invite-form"
|
||||
class="flex flex-col sm:grid sm:grid-cols-3 justify-center items-center space-y-4"
|
||||
class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
||||
phx-target={@myself}
|
||||
phx-change="validate"
|
||||
phx-submit="save"
|
||||
|
@ -24,12 +24,11 @@
|
||||
<%= for invite <- @invites do %>
|
||||
<.invite_card invite={invite}>
|
||||
<:code_actions>
|
||||
<form phx-submit={JS.dispatch("cannery:clipcopy", to: "#code-#{invite.id}")}>
|
||||
<form phx-submit="copy_to_clipboard">
|
||||
<button
|
||||
type="submit"
|
||||
class="mx-2 my-1 btn btn-primary"
|
||||
phx-click="copy_to_clipboard"
|
||||
phx-value-invite_id={"#code-#{invite.id}"}
|
||||
phx-click={JS.dispatch("cannery:clipcopy", to: "#code-#{invite.id}")}
|
||||
>
|
||||
<%= dgettext("actions", "Copy to clipboard") %>
|
||||
</button>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<div>
|
||||
<h2 class="text-center title text-xl text-primary-600">
|
||||
<h2 class="mb-8 text-center title text-xl text-primary-600">
|
||||
<%= @title %>
|
||||
</h2>
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
let={f}
|
||||
for={@changeset}
|
||||
id="shot-group-form"
|
||||
class="flex flex-col sm:grid sm:grid-cols-3 justify-center items-center space-y-4"
|
||||
class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
||||
phx-target={@myself}
|
||||
phx-change="validate"
|
||||
phx-submit="save"
|
||||
|
@ -29,14 +29,14 @@ defmodule CanneryWeb.TagLive.FormComponent do
|
||||
def render(assigns) do
|
||||
~H"""
|
||||
<div>
|
||||
<h2 class="text-center title text-xl text-primary-600">
|
||||
<h2 class="mb-8 text-center title text-xl text-primary-600">
|
||||
<%= @title %>
|
||||
</h2>
|
||||
<.form
|
||||
let={f}
|
||||
for={@changeset}
|
||||
id="tag-form"
|
||||
class="flex flex-col sm:grid sm:grid-cols-3 justify-center items-center space-y-4"
|
||||
class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
||||
phx-target={@myself}
|
||||
phx-change="validate"
|
||||
phx-submit="save"
|
||||
|
@ -64,10 +64,11 @@ defmodule CanneryWeb.Router do
|
||||
live "/containers", ContainerLive.Index, :index
|
||||
live "/containers/new", ContainerLive.Index, :new
|
||||
live "/containers/:id/edit", ContainerLive.Index, :edit
|
||||
live "/containers/:id/edit_tags", ContainerLive.Index, :edit_tags
|
||||
|
||||
live "/containers/:id", ContainerLive.Show, :show
|
||||
live "/containers/:id/show/edit", ContainerLive.Show, :edit
|
||||
live "/containers/:id/show/add_tag", ContainerLive.Show, :add_tag
|
||||
live "/containers/:id/show/edit_tags", ContainerLive.Show, :edit_tags
|
||||
|
||||
live "/ammo_groups", AmmoGroupLive.Index, :index
|
||||
live "/ammo_groups/new", AmmoGroupLive.Index, :new
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
<br/>
|
||||
|
||||
<a style="margin: 1em; color: rgb(31, 31, 31);" href="{@url}"><%= @url %></a>
|
||||
<a style="margin: 1em; color: rgb(31, 31, 31);" href="<%= @url %>"><%= @url %></a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
<br/>
|
||||
|
||||
<a style="margin: 1em; color: rgb(31, 31, 31);" href="{@url}"><%= @url %></a>
|
||||
<a style="margin: 1em; color: rgb(31, 31, 31);" href="<%= @url %>"><%= @url %></a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
<br/>
|
||||
|
||||
<a style="margin: 1em; color: rgb(31, 31, 31);" href="{@url}"><%= @url %></a>
|
||||
<a style="margin: 1em; color: rgb(31, 31, 31);" href="<%= @url %>"><%= @url %></a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<main role="main" class="container min-h-full min-w-full">
|
||||
<main role="main" class="min-h-full min-w-full">
|
||||
<header>
|
||||
<.topbar current_user={assigns[:current_user]}></.topbar>
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<main class="mb-8 container min-w-full">
|
||||
<main class="mb-8 min-w-full">
|
||||
<header>
|
||||
<.topbar current_user={assigns[:current_user]}></.topbar>
|
||||
|
||||
@ -26,3 +26,29 @@
|
||||
<%= @inner_content %>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<div
|
||||
id="loading"
|
||||
class="absolute opacity-0 top-0 left-0 w-screen h-screen bg-white z-50
|
||||
flex flex-col justify-center items-center space-y-4
|
||||
transition-opacity ease-in-out duration-500"
|
||||
>
|
||||
<h1 class="title text-2xl title-primary-500">
|
||||
<%= gettext("Loading...") %>
|
||||
</h1>
|
||||
|
||||
<i class="fas fa-3x fa-spin fa-cog"></i>
|
||||
</div>
|
||||
|
||||
<div
|
||||
id="disconnect"
|
||||
class="absolute opacity-0 top-0 left-0 w-screen h-screen bg-white z-50
|
||||
flex flex-col justify-center items-center space-y-4
|
||||
transition-opacity ease-in-out duration-500"
|
||||
>
|
||||
<h1 class="title text-2xl title-primary-500">
|
||||
<%= gettext("Reconnecting...") %>
|
||||
</h1>
|
||||
|
||||
<i class="fas fa-3x fa-fade fa-satellite-dish"></i>
|
||||
</div>
|
||||
|
@ -5,7 +5,11 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<%= csrf_meta_tag() %>
|
||||
<%= live_title_tag(assigns[:page_title] || "Cannery", suffix: "") %>
|
||||
<%= if(assigns |> Map.has_key?(:page_title),
|
||||
do: "#{assigns.page_title} | Cannery",
|
||||
else: "Cannery"
|
||||
)
|
||||
|> live_title_tag(suffix: "") %>
|
||||
<link phx-track-static rel="stylesheet" href={Routes.static_path(@conn, "/css/app.css")} />
|
||||
<script
|
||||
defer
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="mb-8 flex flex-col justify-center items-center space-y-4">
|
||||
<div class="mx-auto mb-8 max-w-2xl flex flex-col justify-center items-center space-y-4">
|
||||
<h1 class="title text-primary-600 text-xl">
|
||||
<%= dgettext("actions", "Resend confirmation instructions") %>
|
||||
</h1>
|
||||
@ -7,15 +7,14 @@
|
||||
Routes.user_confirmation_path(@conn, :create),
|
||||
[
|
||||
class:
|
||||
"flex flex-col sm:grid sm:grid-cols-3" <>
|
||||
"justify-center items-center text-center space-y-4"
|
||||
"flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
||||
],
|
||||
fn f -> %>
|
||||
<%= label(f, :email, class: "title text-lg text-primary-600") %>
|
||||
<%= email_input(f, :email, required: true, class: "input input-primary col-span-2") %>
|
||||
|
||||
<%= submit(dgettext("actions", "Resend confirmation instructions"),
|
||||
class: "mx-auto my-4 btn btn-primary col-span-3"
|
||||
class: "mx-auto btn btn-primary col-span-3"
|
||||
) %>
|
||||
<% end %>
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="mb-8 flex flex-col justify-center items-center space-y-4">
|
||||
<div class="mx-auto mb-8 max-w-2xl flex flex-col justify-center items-center space-y-4">
|
||||
<h1 class="title text-primary-600 text-xl">
|
||||
<%= dgettext("actions", "Register") %>
|
||||
</h1>
|
||||
@ -7,8 +7,7 @@
|
||||
Routes.user_registration_path(@conn, :create),
|
||||
[
|
||||
class:
|
||||
"flex flex-col sm:grid sm:grid-cols-3" <>
|
||||
"justify-center items-center text-center space-y-4"
|
||||
"flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
||||
],
|
||||
fn f -> %>
|
||||
<%= if @changeset.action && not @changeset.valid? do %>
|
||||
@ -31,7 +30,7 @@
|
||||
<%= 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: "mx-auto my-4 btn btn-primary col-span-3") %>
|
||||
<%= submit(dgettext("actions", "Register"), class: "mx-auto btn btn-primary col-span-3") %>
|
||||
<% end %>
|
||||
|
||||
<hr class="hr" />
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="mb-8 flex flex-col justify-center items-center space-y-4">
|
||||
<div class="mx-auto mb-8 max-w-2xl flex flex-col justify-center items-center space-y-4">
|
||||
<h1 class="title text-primary-600 text-xl">
|
||||
<%= dgettext("actions", "Reset password") %>
|
||||
</h1>
|
||||
@ -7,8 +7,7 @@
|
||||
Routes.user_reset_password_path(@conn, :update, @token),
|
||||
[
|
||||
class:
|
||||
"flex flex-col sm:grid sm:grid-cols-3" <>
|
||||
"justify-center items-center text-center space-y-4"
|
||||
"flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
||||
],
|
||||
fn f -> %>
|
||||
<%= if @changeset.action && not @changeset.valid? do %>
|
||||
@ -33,7 +32,7 @@
|
||||
<%= error_tag(f, :password_confirmation, "col-span-3") %>
|
||||
|
||||
<%= submit(dgettext("actions", "Reset password"),
|
||||
class: "mx-auto my-4 btn btn-primary col-span-3"
|
||||
class: "mx-auto btn btn-primary col-span-3"
|
||||
) %>
|
||||
<% end %>
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="mb-8 flex flex-col justify-center items-center space-y-4">
|
||||
<div class="mx-auto mb-8 max-w-2xl flex flex-col justify-center items-center space-y-4">
|
||||
<h1 class="title text-primary-600 text-xl">
|
||||
<%= dgettext("actions", "Forgot your password?") %>
|
||||
</h1>
|
||||
@ -7,15 +7,14 @@
|
||||
Routes.user_reset_password_path(@conn, :create),
|
||||
[
|
||||
class:
|
||||
"flex flex-col sm:grid sm:grid-cols-3" <>
|
||||
"justify-center items-center text-center space-y-4"
|
||||
"flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
||||
],
|
||||
fn f -> %>
|
||||
<%= label(f, :email, class: "title text-lg text-primary-600") %>
|
||||
<%= email_input(f, :email, required: true, class: "input input-primary col-span-2") %>
|
||||
|
||||
<%= submit(dgettext("actions", "Send instructions to reset password"),
|
||||
class: "mx-auto my-4 btn btn-primary col-span-3"
|
||||
class: "mx-auto btn btn-primary col-span-3"
|
||||
) %>
|
||||
<% end %>
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="mb-8 flex flex-col justify-center items-center space-y-4">
|
||||
<div class="mx-auto mb-8 max-w-2xl flex flex-col justify-center items-center space-y-4">
|
||||
<h1 class="title text-primary-600 text-xl">
|
||||
<%= dgettext("actions", "Log in") %>
|
||||
</h1>
|
||||
@ -8,8 +8,7 @@
|
||||
[
|
||||
as: :user,
|
||||
class:
|
||||
"flex flex-col sm:grid sm:grid-cols-3" <>
|
||||
"justify-center items-center text-center space-y-4"
|
||||
"flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
||||
],
|
||||
fn f -> %>
|
||||
<%= if @error_message do %>
|
||||
@ -31,7 +30,7 @@
|
||||
) %>
|
||||
<%= checkbox(f, :remember_me, class: "checkbox col-span-2") %>
|
||||
|
||||
<%= submit(dgettext("actions", "Log in"), class: "mx-auto my-4 btn btn-primary col-span-3") %>
|
||||
<%= submit(dgettext("actions", "Log in"), class: "mx-auto btn btn-primary col-span-3") %>
|
||||
<% end %>
|
||||
|
||||
<hr class="hr" />
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="mb-8 flex flex-col justify-center items-center space-y-4">
|
||||
<div class="mx-auto mb-8 max-w-2xl flex flex-col justify-center items-center space-y-4">
|
||||
<h1 class="pb-4 title text-primary-600 text-xl">
|
||||
<%= gettext("Settings") %>
|
||||
</h1>
|
||||
@ -9,8 +9,7 @@
|
||||
Routes.user_settings_path(@conn, :update),
|
||||
[
|
||||
class:
|
||||
"pb-4 flex flex-col sm:grid sm:grid-cols-3" <>
|
||||
"justify-center items-center text-center space-y-4"
|
||||
"flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
||||
],
|
||||
fn f -> %>
|
||||
<h3 class="title text-primary-600 text-lg col-span-3">
|
||||
@ -44,7 +43,7 @@
|
||||
<%= error_tag(f, :current_password, "col-span-3") %>
|
||||
|
||||
<%= submit(dgettext("actions", "Change email"),
|
||||
class: "mx-auto my-4 btn btn-primary col-span-3"
|
||||
class: "mx-auto btn btn-primary col-span-3"
|
||||
) %>
|
||||
<% end %>
|
||||
|
||||
@ -54,7 +53,7 @@
|
||||
Routes.user_settings_path(@conn, :update),
|
||||
[
|
||||
class:
|
||||
"pb-4 flex flex-col sm:grid sm:grid-cols-3 justify-center items-center text-center space-y-4"
|
||||
"flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
||||
],
|
||||
fn f -> %>
|
||||
<h3 class="title text-primary-600 text-lg col-span-3">
|
||||
@ -100,7 +99,7 @@
|
||||
<%= error_tag(f, :current_password, "col-span-3") %>
|
||||
|
||||
<%= submit(dgettext("actions", "Change password"),
|
||||
class: "mx-auto my-4 btn btn-primary col-span-3"
|
||||
class: "mx-auto btn btn-primary col-span-3"
|
||||
) %>
|
||||
<% end %>
|
||||
|
||||
|
2
mix.exs
2
mix.exs
@ -4,7 +4,7 @@ defmodule Cannery.MixProject do
|
||||
def project do
|
||||
[
|
||||
app: :cannery,
|
||||
version: "0.1.0",
|
||||
version: "0.2.1",
|
||||
elixir: "~> 1.12",
|
||||
elixirc_paths: elixirc_paths(Mix.env()),
|
||||
compilers: [:gettext] ++ Mix.compilers(),
|
||||
|
@ -31,14 +31,14 @@ msgid "Add your first type!"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:17
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:46
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:16
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:45
|
||||
msgid "Change email"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:61
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:102
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:60
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:101
|
||||
msgid "Change password"
|
||||
msgstr ""
|
||||
|
||||
@ -48,14 +48,14 @@ msgid "Create Invite"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:109
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:108
|
||||
msgid "Delete User"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/templates/user_registration/new.html.heex:44
|
||||
#: lib/cannery_web/templates/user_registration/new.html.heex:43
|
||||
#: 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:45
|
||||
msgid "Forgot your password?"
|
||||
msgstr ""
|
||||
|
||||
@ -66,12 +66,12 @@ msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/components/topbar.ex:108
|
||||
#: lib/cannery_web/templates/user_confirmation/new.html.heex:31
|
||||
#: lib/cannery_web/templates/user_registration/new.html.heex:40
|
||||
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:49
|
||||
#: lib/cannery_web/templates/user_reset_password/new.html.heex:31
|
||||
#: lib/cannery_web/templates/user_confirmation/new.html.heex:30
|
||||
#: lib/cannery_web/templates/user_registration/new.html.heex:39
|
||||
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:48
|
||||
#: lib/cannery_web/templates/user_reset_password/new.html.heex:30
|
||||
#: lib/cannery_web/templates/user_session/new.html.heex:3
|
||||
#: lib/cannery_web/templates/user_session/new.html.heex:34
|
||||
#: lib/cannery_web/templates/user_session/new.html.heex:33
|
||||
msgid "Log in"
|
||||
msgstr ""
|
||||
|
||||
@ -102,31 +102,31 @@ msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/components/topbar.ex:101
|
||||
#: lib/cannery_web/templates/user_confirmation/new.html.heex:26
|
||||
#: lib/cannery_web/templates/user_confirmation/new.html.heex:25
|
||||
#: 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:44
|
||||
#: lib/cannery_web/templates/user_reset_password/new.html.heex:26
|
||||
#: lib/cannery_web/templates/user_session/new.html.heex:41
|
||||
#: lib/cannery_web/templates/user_registration/new.html.heex:33
|
||||
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:43
|
||||
#: lib/cannery_web/templates/user_reset_password/new.html.heex:25
|
||||
#: lib/cannery_web/templates/user_session/new.html.heex:40
|
||||
msgid "Register"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/templates/user_confirmation/new.html.heex:3
|
||||
#: lib/cannery_web/templates/user_confirmation/new.html.heex:17
|
||||
#: lib/cannery_web/templates/user_confirmation/new.html.heex:16
|
||||
msgid "Resend confirmation instructions"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:3
|
||||
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:35
|
||||
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:34
|
||||
msgid "Reset password"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:42
|
||||
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:54
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:175
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:172
|
||||
#: lib/cannery_web/live/container_live/form_component.html.heex:50
|
||||
#: lib/cannery_web/live/invite_live/form_component.html.heex:28
|
||||
#: lib/cannery_web/live/range_live/form_component.html.heex:40
|
||||
@ -135,7 +135,7 @@ msgid "Save"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/templates/user_reset_password/new.html.heex:17
|
||||
#: lib/cannery_web/templates/user_reset_password/new.html.heex:16
|
||||
msgid "Send instructions to reset password"
|
||||
msgstr ""
|
||||
|
||||
@ -145,7 +145,7 @@ msgid "Why not add one?"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/add_tag_component.html.heex:17
|
||||
#: lib/cannery_web/live/container_live/edit_tags_component.html.heex:52
|
||||
msgid "Add"
|
||||
msgstr ""
|
||||
|
||||
@ -161,13 +161,13 @@ msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:85
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:67
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:86
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:36
|
||||
msgid "Record shots"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:31
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:50
|
||||
msgid "Ammo Details"
|
||||
msgstr ""
|
||||
|
||||
@ -177,7 +177,7 @@ msgid "Add another container!"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:61
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:80
|
||||
msgid "Move containers"
|
||||
msgstr ""
|
||||
|
||||
@ -187,6 +187,6 @@ msgid "Select"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:34
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:33
|
||||
msgid "Copy to clipboard"
|
||||
msgstr ""
|
||||
|
@ -11,27 +11,27 @@ msgid ""
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/home_live.ex:57
|
||||
#: lib/cannery_web/live/home_live.ex:63
|
||||
msgid "%{name} lets you easily keep an eye on your ammo levels before and after range day"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/home_live.ex:79
|
||||
#: lib/cannery_web/live/home_live.ex:85
|
||||
msgid "Access from any internet-capable device"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:91
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:90
|
||||
msgid "Admins"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/home_live.ex:93
|
||||
#: lib/cannery_web/live/home_live.ex:99
|
||||
msgid "Admins:"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/components/topbar.ex:53
|
||||
#: lib/cannery_web/components/topbar.ex:52
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:3
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:61
|
||||
msgid "Ammo"
|
||||
@ -54,14 +54,14 @@ msgid "Background color"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:157
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:154
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:67
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:55
|
||||
msgid "Blank"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:74
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:102
|
||||
msgid "Brass"
|
||||
msgstr ""
|
||||
|
||||
@ -108,14 +108,15 @@ msgid "Container"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/components/topbar.ex:47
|
||||
#: lib/cannery_web/components/topbar.ex:46
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:3
|
||||
msgid "Containers"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:161
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:158
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:68
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:56
|
||||
msgid "Corrosive"
|
||||
msgstr ""
|
||||
|
||||
@ -138,18 +139,18 @@ msgid "Description"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/components/container_card.ex:27
|
||||
#: lib/cannery_web/components/container_card.ex:31
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:8
|
||||
msgid "Description:"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:60
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:59
|
||||
msgid "Disable"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/home_live.ex:54
|
||||
#: lib/cannery_web/live/home_live.ex:60
|
||||
msgid "Easy to Use:"
|
||||
msgstr ""
|
||||
|
||||
@ -165,12 +166,6 @@ msgstr ""
|
||||
msgid "Edit Ammo type"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/index.ex:24
|
||||
#: lib/cannery_web/live/container_live/show.ex:89
|
||||
msgid "Edit Container"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/invite_live/index.ex:35
|
||||
msgid "Edit Invite"
|
||||
@ -182,7 +177,7 @@ msgid "Edit Tag"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:64
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:63
|
||||
msgid "Enable"
|
||||
msgstr ""
|
||||
|
||||
@ -197,20 +192,21 @@ msgid "FMJ"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:116
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:113
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:61
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:49
|
||||
msgid "Grains"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:153
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:150
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:66
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:54
|
||||
msgid "Incendiary"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/home_live.ex:88
|
||||
#: lib/cannery_web/live/home_live.ex:94
|
||||
msgid "Instance Information"
|
||||
msgstr ""
|
||||
|
||||
@ -220,18 +216,18 @@ msgid "Invite Disabled"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/home_live.ex:119
|
||||
#: lib/cannery_web/live/home_live.ex:125
|
||||
msgid "Invite Only"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/components/topbar.ex:72
|
||||
#: lib/cannery_web/components/topbar.ex:71
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:3
|
||||
msgid "Invites"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/templates/user_session/new.html.heex:29
|
||||
#: lib/cannery_web/templates/user_session/new.html.heex:28
|
||||
msgid "Keep me logged in for 60 days"
|
||||
msgstr ""
|
||||
|
||||
@ -241,7 +237,7 @@ msgid "Listing Ammo types"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/index.ex:33
|
||||
#: lib/cannery_web/live/container_live/index.ex:38
|
||||
msgid "Listing Containers"
|
||||
msgstr ""
|
||||
|
||||
@ -262,7 +258,7 @@ msgid "Location"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/components/container_card.ex:39
|
||||
#: lib/cannery_web/components/container_card.ex:43
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:20
|
||||
msgid "Location:"
|
||||
msgstr ""
|
||||
@ -273,13 +269,14 @@ msgid "Magazine, Clip, Ammo Box, etc"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/components/topbar.ex:59
|
||||
#: lib/cannery_web/components/topbar.ex:58
|
||||
msgid "Manage"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:165
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:162
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:69
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:57
|
||||
msgid "Manufacturer"
|
||||
msgstr ""
|
||||
|
||||
@ -308,7 +305,7 @@ msgid "New Ammo type"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/index.ex:29
|
||||
#: lib/cannery_web/live/container_live/index.ex:33
|
||||
msgid "New Container"
|
||||
msgstr ""
|
||||
|
||||
@ -333,12 +330,12 @@ msgid "No Ammo Types"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:109
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:114
|
||||
msgid "No ammo for this type"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:88
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:77
|
||||
msgid "No ammo groups in this container"
|
||||
msgstr ""
|
||||
|
||||
@ -353,6 +350,7 @@ msgid "No invites"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/edit_tags_component.html.heex:30
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:10
|
||||
msgid "No tags"
|
||||
msgstr ""
|
||||
@ -360,7 +358,7 @@ msgstr ""
|
||||
#, elixir-autogen, elixir-format
|
||||
#: 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:36
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:122
|
||||
#: lib/cannery_web/live/range_live/form_component.html.heex:29
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:67
|
||||
msgid "Notes"
|
||||
@ -368,7 +366,7 @@ msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/components/ammo_group_card.ex:35
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:14
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:24
|
||||
msgid "Notes:"
|
||||
msgstr ""
|
||||
|
||||
@ -378,7 +376,7 @@ msgid "On the bookshelf"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:124
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:121
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:62
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:50
|
||||
msgid "Pressure"
|
||||
@ -392,39 +390,33 @@ msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/components/ammo_group_card.ex:42
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:21
|
||||
msgid "Price paid:"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:131
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:128
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:63
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:51
|
||||
msgid "Primer type"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/home_live.ex:118
|
||||
#: lib/cannery_web/live/home_live.ex:124
|
||||
msgid "Public Signups"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:64
|
||||
msgid "Rimfire"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/home_live.ex:66
|
||||
#: lib/cannery_web/live/home_live.ex:72
|
||||
msgid "Secure:"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/home_live.ex:69
|
||||
#: lib/cannery_web/live/home_live.ex:75
|
||||
msgid "Self-host your own instance, or use an instance from someone you trust."
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:80
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:79
|
||||
msgid "Set Unlimited"
|
||||
msgstr ""
|
||||
|
||||
@ -444,12 +436,7 @@ msgid "Show Ammo type"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/show.ex:88
|
||||
msgid "Show Container"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/home_live.ex:76
|
||||
#: lib/cannery_web/live/home_live.ex:82
|
||||
msgid "Simple:"
|
||||
msgstr ""
|
||||
|
||||
@ -459,13 +446,12 @@ msgid "Steel"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:79
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:98
|
||||
msgid "Stored in"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/components/topbar.ex:41
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:60
|
||||
#: lib/cannery_web/components/topbar.ex:40
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:3
|
||||
msgid "Tags"
|
||||
msgstr ""
|
||||
@ -481,18 +467,19 @@ msgid "Text color"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/home_live.ex:45
|
||||
#: lib/cannery_web/live/home_live.ex:51
|
||||
msgid "The self-hosted firearm tracker website"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:84
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:103
|
||||
msgid "This ammo group is not in a container"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:149
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:146
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:65
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:53
|
||||
msgid "Tracer"
|
||||
msgstr ""
|
||||
|
||||
@ -503,13 +490,13 @@ msgid "Type"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/components/container_card.ex:33
|
||||
#: lib/cannery_web/components/container_card.ex:37
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:14
|
||||
msgid "Type:"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:120
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:119
|
||||
msgid "Users"
|
||||
msgstr ""
|
||||
|
||||
@ -524,27 +511,22 @@ msgid "Uses left"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/home_live.ex:41
|
||||
#: lib/cannery_web/live/home_live.ex:47
|
||||
msgid "Welcome to %{name}"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/home_live.ex:70
|
||||
#: lib/cannery_web/live/home_live.ex:76
|
||||
msgid "Your data stays with you, period"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/show.ex:90
|
||||
msgid "Add Tag to Container"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:49
|
||||
msgid "No tags for this container"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/components/topbar.ex:65
|
||||
#: lib/cannery_web/components/topbar.ex:64
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:39
|
||||
msgid "Range"
|
||||
msgstr ""
|
||||
@ -555,6 +537,7 @@ msgid "Range day"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:125
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:70
|
||||
msgid "Date"
|
||||
msgstr ""
|
||||
@ -570,13 +553,13 @@ msgid "No ammo staged"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:58
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:77
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:33
|
||||
msgid "Stage for range"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:57
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:76
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:32
|
||||
msgid "Unstage from range"
|
||||
msgstr ""
|
||||
@ -630,6 +613,7 @@ msgid "Rounds left"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:119
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:64
|
||||
msgid "Rounds shot"
|
||||
msgstr ""
|
||||
@ -663,7 +647,8 @@ msgstr ""
|
||||
#, elixir-autogen, elixir-format
|
||||
#: 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_group_live/show.html.heex:32
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:39
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:98
|
||||
msgid "$%{amount}"
|
||||
msgstr ""
|
||||
@ -688,7 +673,7 @@ msgid "Muzzle velocity"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:106
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:103
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:60
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:48
|
||||
msgid "Powder grains per charge"
|
||||
@ -702,24 +687,25 @@ msgid "Powder type"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:171
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:168
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:70
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:58
|
||||
msgid "UPC"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:81
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:80
|
||||
msgid "Confirm new password"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:34
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:90
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:33
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:89
|
||||
msgid "Current password"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:74
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:73
|
||||
msgid "New password"
|
||||
msgstr ""
|
||||
|
||||
@ -734,6 +720,90 @@ msgid "Unstage"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:140
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:137
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:64
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:52
|
||||
msgid "Firing type"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/templates/layout/live.html.heex:50
|
||||
msgid "Reconnecting..."
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/templates/layout/live.html.heex:37
|
||||
msgid "Loading..."
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/index.ex:29
|
||||
#: lib/cannery_web/live/container_live/show.ex:97
|
||||
msgid "Edit %{name}"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/index.ex:48
|
||||
#: lib/cannery_web/live/container_live/show.ex:98
|
||||
msgid "Edit %{name} tags"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/components/container_card.ex:50
|
||||
msgid "Rounds:"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/show.ex:96
|
||||
msgid "Show %{name}"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:104
|
||||
msgid "No cost information"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:36
|
||||
msgid "% left"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:38
|
||||
msgid "Current value:"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:31
|
||||
msgid "Original cost:"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:13
|
||||
msgid "Original count:"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:18
|
||||
msgid "Percentage left:"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:111
|
||||
msgid "Rounds used"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:77
|
||||
msgid "Current # of rounds:"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:32
|
||||
msgid "Total # of rounds"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:85
|
||||
msgid "Total rounds shot:"
|
||||
msgstr ""
|
||||
|
@ -32,14 +32,14 @@ msgid "Add your first type!"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:17
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:46
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:16
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:45
|
||||
msgid "Change email"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:61
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:102
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:60
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:101
|
||||
msgid "Change password"
|
||||
msgstr ""
|
||||
|
||||
@ -49,14 +49,14 @@ msgid "Create Invite"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:109
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:108
|
||||
msgid "Delete User"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/templates/user_registration/new.html.heex:44
|
||||
#: lib/cannery_web/templates/user_registration/new.html.heex:43
|
||||
#: 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:45
|
||||
msgid "Forgot your password?"
|
||||
msgstr ""
|
||||
|
||||
@ -67,12 +67,12 @@ msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/components/topbar.ex:108
|
||||
#: lib/cannery_web/templates/user_confirmation/new.html.heex:31
|
||||
#: lib/cannery_web/templates/user_registration/new.html.heex:40
|
||||
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:49
|
||||
#: lib/cannery_web/templates/user_reset_password/new.html.heex:31
|
||||
#: lib/cannery_web/templates/user_confirmation/new.html.heex:30
|
||||
#: lib/cannery_web/templates/user_registration/new.html.heex:39
|
||||
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:48
|
||||
#: lib/cannery_web/templates/user_reset_password/new.html.heex:30
|
||||
#: lib/cannery_web/templates/user_session/new.html.heex:3
|
||||
#: lib/cannery_web/templates/user_session/new.html.heex:34
|
||||
#: lib/cannery_web/templates/user_session/new.html.heex:33
|
||||
msgid "Log in"
|
||||
msgstr ""
|
||||
|
||||
@ -103,31 +103,31 @@ msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/components/topbar.ex:101
|
||||
#: lib/cannery_web/templates/user_confirmation/new.html.heex:26
|
||||
#: lib/cannery_web/templates/user_confirmation/new.html.heex:25
|
||||
#: 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:44
|
||||
#: lib/cannery_web/templates/user_reset_password/new.html.heex:26
|
||||
#: lib/cannery_web/templates/user_session/new.html.heex:41
|
||||
#: lib/cannery_web/templates/user_registration/new.html.heex:33
|
||||
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:43
|
||||
#: lib/cannery_web/templates/user_reset_password/new.html.heex:25
|
||||
#: lib/cannery_web/templates/user_session/new.html.heex:40
|
||||
msgid "Register"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/templates/user_confirmation/new.html.heex:3
|
||||
#: lib/cannery_web/templates/user_confirmation/new.html.heex:17
|
||||
#: lib/cannery_web/templates/user_confirmation/new.html.heex:16
|
||||
msgid "Resend confirmation instructions"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:3
|
||||
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:35
|
||||
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:34
|
||||
msgid "Reset password"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:42
|
||||
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:54
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:175
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:172
|
||||
#: lib/cannery_web/live/container_live/form_component.html.heex:50
|
||||
#: lib/cannery_web/live/invite_live/form_component.html.heex:28
|
||||
#: lib/cannery_web/live/range_live/form_component.html.heex:40
|
||||
@ -136,7 +136,7 @@ msgid "Save"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/templates/user_reset_password/new.html.heex:17
|
||||
#: lib/cannery_web/templates/user_reset_password/new.html.heex:16
|
||||
msgid "Send instructions to reset password"
|
||||
msgstr ""
|
||||
|
||||
@ -146,7 +146,7 @@ msgid "Why not add one?"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/add_tag_component.html.heex:17
|
||||
#: lib/cannery_web/live/container_live/edit_tags_component.html.heex:52
|
||||
msgid "Add"
|
||||
msgstr ""
|
||||
|
||||
@ -162,13 +162,13 @@ msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:85
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:67
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:86
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:36
|
||||
msgid "Record shots"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:31
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:50
|
||||
msgid "Ammo Details"
|
||||
msgstr ""
|
||||
|
||||
@ -178,7 +178,7 @@ msgid "Add another container!"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:61
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:80
|
||||
msgid "Move containers"
|
||||
msgstr ""
|
||||
|
||||
@ -188,6 +188,6 @@ msgid "Select"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:34
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:33
|
||||
msgid "Copy to clipboard"
|
||||
msgstr ""
|
||||
|
@ -12,27 +12,27 @@ msgstr ""
|
||||
"Plural-Forms: nplurals=2\n"
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/home_live.ex:57
|
||||
#: lib/cannery_web/live/home_live.ex:63
|
||||
msgid "%{name} lets you easily keep an eye on your ammo levels before and after range day"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/home_live.ex:79
|
||||
#: lib/cannery_web/live/home_live.ex:85
|
||||
msgid "Access from any internet-capable device"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:91
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:90
|
||||
msgid "Admins"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/home_live.ex:93
|
||||
#: lib/cannery_web/live/home_live.ex:99
|
||||
msgid "Admins:"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/components/topbar.ex:53
|
||||
#: lib/cannery_web/components/topbar.ex:52
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:3
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:61
|
||||
msgid "Ammo"
|
||||
@ -55,14 +55,14 @@ msgid "Background color"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:157
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:154
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:67
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:55
|
||||
msgid "Blank"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:74
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:102
|
||||
msgid "Brass"
|
||||
msgstr ""
|
||||
|
||||
@ -109,14 +109,15 @@ msgid "Container"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/components/topbar.ex:47
|
||||
#: lib/cannery_web/components/topbar.ex:46
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:3
|
||||
msgid "Containers"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:161
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:158
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:68
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:56
|
||||
msgid "Corrosive"
|
||||
msgstr ""
|
||||
|
||||
@ -139,18 +140,18 @@ msgid "Description"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/components/container_card.ex:27
|
||||
#: lib/cannery_web/components/container_card.ex:31
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:8
|
||||
msgid "Description:"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:60
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:59
|
||||
msgid "Disable"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/home_live.ex:54
|
||||
#: lib/cannery_web/live/home_live.ex:60
|
||||
msgid "Easy to Use:"
|
||||
msgstr ""
|
||||
|
||||
@ -166,12 +167,6 @@ msgstr ""
|
||||
msgid "Edit Ammo type"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/index.ex:24
|
||||
#: lib/cannery_web/live/container_live/show.ex:89
|
||||
msgid "Edit Container"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/invite_live/index.ex:35
|
||||
msgid "Edit Invite"
|
||||
@ -183,7 +178,7 @@ msgid "Edit Tag"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:64
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:63
|
||||
msgid "Enable"
|
||||
msgstr ""
|
||||
|
||||
@ -198,20 +193,21 @@ msgid "FMJ"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:116
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:113
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:61
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:49
|
||||
msgid "Grains"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:153
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:150
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:66
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:54
|
||||
msgid "Incendiary"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/home_live.ex:88
|
||||
#: lib/cannery_web/live/home_live.ex:94
|
||||
msgid "Instance Information"
|
||||
msgstr ""
|
||||
|
||||
@ -221,18 +217,18 @@ msgid "Invite Disabled"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/home_live.ex:119
|
||||
#: lib/cannery_web/live/home_live.ex:125
|
||||
msgid "Invite Only"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/components/topbar.ex:72
|
||||
#: lib/cannery_web/components/topbar.ex:71
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:3
|
||||
msgid "Invites"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/templates/user_session/new.html.heex:29
|
||||
#: lib/cannery_web/templates/user_session/new.html.heex:28
|
||||
msgid "Keep me logged in for 60 days"
|
||||
msgstr ""
|
||||
|
||||
@ -242,7 +238,7 @@ msgid "Listing Ammo types"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/index.ex:33
|
||||
#: lib/cannery_web/live/container_live/index.ex:38
|
||||
msgid "Listing Containers"
|
||||
msgstr ""
|
||||
|
||||
@ -263,7 +259,7 @@ msgid "Location"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/components/container_card.ex:39
|
||||
#: lib/cannery_web/components/container_card.ex:43
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:20
|
||||
msgid "Location:"
|
||||
msgstr ""
|
||||
@ -274,13 +270,14 @@ msgid "Magazine, Clip, Ammo Box, etc"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/components/topbar.ex:59
|
||||
#: lib/cannery_web/components/topbar.ex:58
|
||||
msgid "Manage"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:165
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:162
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:69
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:57
|
||||
msgid "Manufacturer"
|
||||
msgstr ""
|
||||
|
||||
@ -309,7 +306,7 @@ msgid "New Ammo type"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/index.ex:29
|
||||
#: lib/cannery_web/live/container_live/index.ex:33
|
||||
msgid "New Container"
|
||||
msgstr ""
|
||||
|
||||
@ -334,12 +331,12 @@ msgid "No Ammo Types"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:109
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:114
|
||||
msgid "No ammo for this type"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:88
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:77
|
||||
msgid "No ammo groups in this container"
|
||||
msgstr ""
|
||||
|
||||
@ -354,6 +351,7 @@ msgid "No invites"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/edit_tags_component.html.heex:30
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:10
|
||||
msgid "No tags"
|
||||
msgstr ""
|
||||
@ -361,7 +359,7 @@ msgstr ""
|
||||
#, elixir-autogen, elixir-format
|
||||
#: 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:36
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:122
|
||||
#: lib/cannery_web/live/range_live/form_component.html.heex:29
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:67
|
||||
msgid "Notes"
|
||||
@ -369,7 +367,7 @@ msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/components/ammo_group_card.ex:35
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:14
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:24
|
||||
msgid "Notes:"
|
||||
msgstr ""
|
||||
|
||||
@ -379,7 +377,7 @@ msgid "On the bookshelf"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:124
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:121
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:62
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:50
|
||||
msgid "Pressure"
|
||||
@ -393,39 +391,33 @@ msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/components/ammo_group_card.ex:42
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:21
|
||||
msgid "Price paid:"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:131
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:128
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:63
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:51
|
||||
msgid "Primer type"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/home_live.ex:118
|
||||
#: lib/cannery_web/live/home_live.ex:124
|
||||
msgid "Public Signups"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:64
|
||||
msgid "Rimfire"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/home_live.ex:66
|
||||
#: lib/cannery_web/live/home_live.ex:72
|
||||
msgid "Secure:"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/home_live.ex:69
|
||||
#: lib/cannery_web/live/home_live.ex:75
|
||||
msgid "Self-host your own instance, or use an instance from someone you trust."
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:80
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:79
|
||||
msgid "Set Unlimited"
|
||||
msgstr ""
|
||||
|
||||
@ -445,12 +437,7 @@ msgid "Show Ammo type"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/show.ex:88
|
||||
msgid "Show Container"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/home_live.ex:76
|
||||
#: lib/cannery_web/live/home_live.ex:82
|
||||
msgid "Simple:"
|
||||
msgstr ""
|
||||
|
||||
@ -460,13 +447,12 @@ msgid "Steel"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:79
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:98
|
||||
msgid "Stored in"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/components/topbar.ex:41
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:60
|
||||
#: lib/cannery_web/components/topbar.ex:40
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:3
|
||||
msgid "Tags"
|
||||
msgstr ""
|
||||
@ -482,18 +468,19 @@ msgid "Text color"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/home_live.ex:45
|
||||
#: lib/cannery_web/live/home_live.ex:51
|
||||
msgid "The self-hosted firearm tracker website"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:84
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:103
|
||||
msgid "This ammo group is not in a container"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:149
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:146
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:65
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:53
|
||||
msgid "Tracer"
|
||||
msgstr ""
|
||||
|
||||
@ -504,13 +491,13 @@ msgid "Type"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/components/container_card.ex:33
|
||||
#: lib/cannery_web/components/container_card.ex:37
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:14
|
||||
msgid "Type:"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:120
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:119
|
||||
msgid "Users"
|
||||
msgstr ""
|
||||
|
||||
@ -525,27 +512,22 @@ msgid "Uses left"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/home_live.ex:41
|
||||
#: lib/cannery_web/live/home_live.ex:47
|
||||
msgid "Welcome to %{name}"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/home_live.ex:70
|
||||
#: lib/cannery_web/live/home_live.ex:76
|
||||
msgid "Your data stays with you, period"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/show.ex:90
|
||||
msgid "Add Tag to Container"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:49
|
||||
msgid "No tags for this container"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/components/topbar.ex:65
|
||||
#: lib/cannery_web/components/topbar.ex:64
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:39
|
||||
msgid "Range"
|
||||
msgstr ""
|
||||
@ -556,6 +538,7 @@ msgid "Range day"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:125
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:70
|
||||
msgid "Date"
|
||||
msgstr ""
|
||||
@ -571,13 +554,13 @@ msgid "No ammo staged"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:58
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:77
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:33
|
||||
msgid "Stage for range"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:57
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:76
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:32
|
||||
msgid "Unstage from range"
|
||||
msgstr ""
|
||||
@ -631,6 +614,7 @@ msgid "Rounds left"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:119
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:64
|
||||
msgid "Rounds shot"
|
||||
msgstr ""
|
||||
@ -664,7 +648,8 @@ msgstr ""
|
||||
#, elixir-autogen, elixir-format
|
||||
#: 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_group_live/show.html.heex:32
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:39
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:98
|
||||
msgid "$%{amount}"
|
||||
msgstr ""
|
||||
@ -689,7 +674,7 @@ msgid "Muzzle velocity"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:106
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:103
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:60
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:48
|
||||
msgid "Powder grains per charge"
|
||||
@ -703,24 +688,25 @@ msgid "Powder type"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:171
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:168
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:70
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:58
|
||||
msgid "UPC"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:81
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:80
|
||||
msgid "Confirm new password"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:34
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:90
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:33
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:89
|
||||
msgid "Current password"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:74
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:73
|
||||
msgid "New password"
|
||||
msgstr ""
|
||||
|
||||
@ -735,6 +721,90 @@ msgid "Unstage"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:140
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:137
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:64
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:52
|
||||
msgid "Firing type"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/templates/layout/live.html.heex:50
|
||||
msgid "Reconnecting..."
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/templates/layout/live.html.heex:37
|
||||
msgid "Loading..."
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/index.ex:29
|
||||
#: lib/cannery_web/live/container_live/show.ex:97
|
||||
msgid "Edit %{name}"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/index.ex:48
|
||||
#: lib/cannery_web/live/container_live/show.ex:98
|
||||
msgid "Edit %{name} tags"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
#: lib/cannery_web/components/container_card.ex:50
|
||||
msgid "Rounds:"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/show.ex:96
|
||||
msgid "Show %{name}"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:104
|
||||
msgid "No cost information"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:36
|
||||
msgid "% left"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:38
|
||||
msgid "Current value:"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:31
|
||||
msgid "Original cost:"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:13
|
||||
msgid "Original count:"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:18
|
||||
msgid "Percentage left:"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:111
|
||||
msgid "Rounds used"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:77
|
||||
msgid "Current # of rounds:"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:32
|
||||
msgid "Total # of rounds"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:85
|
||||
msgid "Total rounds shot:"
|
||||
msgstr ""
|
||||
|
@ -11,18 +11,18 @@ msgstr ""
|
||||
"Language: en\n"
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery/containers.ex:105
|
||||
#: lib/cannery/containers.ex:122
|
||||
msgid "Container must be empty before deleting"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/index.ex:55
|
||||
#: lib/cannery_web/live/container_live/show.ex:74
|
||||
#: lib/cannery_web/live/container_live/index.ex:71
|
||||
#: lib/cannery_web/live/container_live/show.ex:73
|
||||
msgid "Could not delete %{name}: %{error}"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/index.ex:43
|
||||
#: lib/cannery_web/live/container_live/index.ex:59
|
||||
msgid "Could not find that container"
|
||||
msgstr ""
|
||||
|
||||
@ -57,10 +57,10 @@ msgid "Not found"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/templates/user_registration/new.html.heex:17
|
||||
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:17
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:23
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:67
|
||||
#: lib/cannery_web/templates/user_registration/new.html.heex:16
|
||||
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:16
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:22
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:66
|
||||
msgid "Oops, something went wrong! Please check the errors below."
|
||||
msgstr ""
|
||||
|
||||
@ -133,7 +133,7 @@ msgid "Tag not found"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/add_tag_component.ex:35
|
||||
#: lib/cannery_web/live/container_live/edit_tags_component.ex:30
|
||||
msgid "Tag could not be added"
|
||||
msgstr ""
|
||||
|
||||
@ -153,3 +153,8 @@ msgstr ""
|
||||
#: lib/cannery_web/controllers/user_auth.ex:161
|
||||
msgid "You must confirm your account and log in to access this page."
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
#: lib/cannery_web/live/container_live/edit_tags_component.ex:52
|
||||
msgid "Tag could not be removed"
|
||||
msgstr ""
|
||||
|
@ -39,8 +39,8 @@ msgid "%{name} enabled succesfully"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/index.ex:48
|
||||
#: lib/cannery_web/live/container_live/show.ex:64
|
||||
#: lib/cannery_web/live/container_live/index.ex:64
|
||||
#: lib/cannery_web/live/container_live/show.ex:63
|
||||
msgid "%{name} has been deleted"
|
||||
msgstr ""
|
||||
|
||||
@ -79,43 +79,43 @@ msgid "Ammo group updated successfully"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:103
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:132
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:102
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:131
|
||||
msgid "Are you sure you want to delete %{email}? This action is permanent!"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:29
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:38
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:46
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:37
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:38
|
||||
msgid "Are you sure you want to delete %{name}?"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:50
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:49
|
||||
msgid "Are you sure you want to delete the invite for %{name}?"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:120
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:47
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:68
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:66
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:75
|
||||
msgid "Are you sure you want to delete this ammo?"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:113
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:112
|
||||
msgid "Are you sure you want to delete your account?"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/components/topbar.ex:87
|
||||
#: lib/cannery_web/components/topbar.ex:86
|
||||
msgid "Are you sure you want to log out?"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:75
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:74
|
||||
msgid "Are you sure you want to make %{name} unlimited?"
|
||||
msgstr ""
|
||||
|
||||
@ -155,14 +155,14 @@ msgid "Please check your email to verify your account"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/home_live.ex:97
|
||||
#: lib/cannery_web/live/home_live.ex:103
|
||||
msgid "Register to setup %{name}"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:44
|
||||
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:55
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:176
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:173
|
||||
#: lib/cannery_web/live/container_live/form_component.html.heex:52
|
||||
#: lib/cannery_web/live/invite_live/form_component.html.heex:30
|
||||
#: lib/cannery_web/live/range_live/form_component.html.heex:42
|
||||
@ -176,22 +176,22 @@ msgid "Your account has been deleted"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:71
|
||||
#: lib/cannery_web/live/container_live/edit_tags_component.html.heex:16
|
||||
msgid "Are you sure you want to remove the %{tag_name} tag from %{container_name}?"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/add_tag_component.ex:40
|
||||
#: lib/cannery_web/live/container_live/edit_tags_component.ex:36
|
||||
msgid "%{name} added successfully"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/show.ex:40
|
||||
#: lib/cannery_web/live/container_live/show.ex:39
|
||||
msgid "%{tag_name} has been removed from %{container_name}"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/add_tag_component.html.heex:19
|
||||
#: lib/cannery_web/live/container_live/edit_tags_component.html.heex:54
|
||||
msgid "Adding..."
|
||||
msgstr ""
|
||||
|
||||
@ -239,3 +239,8 @@ msgstr ""
|
||||
#: lib/cannery_web/live/invite_live/index.ex:123
|
||||
msgid "Copied to clipboard"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
#: lib/cannery_web/live/container_live/edit_tags_component.ex:58
|
||||
msgid "%{name} removed successfully"
|
||||
msgstr ""
|
||||
|
@ -11,18 +11,18 @@ msgid ""
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery/containers.ex:105
|
||||
#: lib/cannery/containers.ex:122
|
||||
msgid "Container must be empty before deleting"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/index.ex:55
|
||||
#: lib/cannery_web/live/container_live/show.ex:74
|
||||
#: lib/cannery_web/live/container_live/index.ex:71
|
||||
#: lib/cannery_web/live/container_live/show.ex:73
|
||||
msgid "Could not delete %{name}: %{error}"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/index.ex:43
|
||||
#: lib/cannery_web/live/container_live/index.ex:59
|
||||
msgid "Could not find that container"
|
||||
msgstr ""
|
||||
|
||||
@ -57,10 +57,10 @@ msgid "Not found"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/templates/user_registration/new.html.heex:17
|
||||
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:17
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:23
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:67
|
||||
#: lib/cannery_web/templates/user_registration/new.html.heex:16
|
||||
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:16
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:22
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:66
|
||||
msgid "Oops, something went wrong! Please check the errors below."
|
||||
msgstr ""
|
||||
|
||||
@ -132,7 +132,7 @@ msgid "Tag not found"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/add_tag_component.ex:35
|
||||
#: lib/cannery_web/live/container_live/edit_tags_component.ex:30
|
||||
msgid "Tag could not be added"
|
||||
msgstr ""
|
||||
|
||||
@ -152,3 +152,8 @@ msgstr ""
|
||||
#: lib/cannery_web/controllers/user_auth.ex:161
|
||||
msgid "You must confirm your account and log in to access this page."
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/edit_tags_component.ex:52
|
||||
msgid "Tag could not be removed"
|
||||
msgstr ""
|
||||
|
@ -38,8 +38,8 @@ msgid "%{name} enabled succesfully"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/index.ex:48
|
||||
#: lib/cannery_web/live/container_live/show.ex:64
|
||||
#: lib/cannery_web/live/container_live/index.ex:64
|
||||
#: lib/cannery_web/live/container_live/show.ex:63
|
||||
msgid "%{name} has been deleted"
|
||||
msgstr ""
|
||||
|
||||
@ -78,43 +78,43 @@ msgid "Ammo group updated successfully"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:103
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:132
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:102
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:131
|
||||
msgid "Are you sure you want to delete %{email}? This action is permanent!"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:29
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:38
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:46
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:37
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:38
|
||||
msgid "Are you sure you want to delete %{name}?"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:50
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:49
|
||||
msgid "Are you sure you want to delete the invite for %{name}?"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:120
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:47
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:68
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:66
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:75
|
||||
msgid "Are you sure you want to delete this ammo?"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:113
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:112
|
||||
msgid "Are you sure you want to delete your account?"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/components/topbar.ex:87
|
||||
#: lib/cannery_web/components/topbar.ex:86
|
||||
msgid "Are you sure you want to log out?"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:75
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:74
|
||||
msgid "Are you sure you want to make %{name} unlimited?"
|
||||
msgstr ""
|
||||
|
||||
@ -154,14 +154,14 @@ msgid "Please check your email to verify your account"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/home_live.ex:97
|
||||
#: lib/cannery_web/live/home_live.ex:103
|
||||
msgid "Register to setup %{name}"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:44
|
||||
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:55
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:176
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:173
|
||||
#: lib/cannery_web/live/container_live/form_component.html.heex:52
|
||||
#: lib/cannery_web/live/invite_live/form_component.html.heex:30
|
||||
#: lib/cannery_web/live/range_live/form_component.html.heex:42
|
||||
@ -175,22 +175,22 @@ msgid "Your account has been deleted"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:71
|
||||
#: lib/cannery_web/live/container_live/edit_tags_component.html.heex:16
|
||||
msgid "Are you sure you want to remove the %{tag_name} tag from %{container_name}?"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/add_tag_component.ex:40
|
||||
#: lib/cannery_web/live/container_live/edit_tags_component.ex:36
|
||||
msgid "%{name} added successfully"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/show.ex:40
|
||||
#: lib/cannery_web/live/container_live/show.ex:39
|
||||
msgid "%{tag_name} has been removed from %{container_name}"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/add_tag_component.html.heex:19
|
||||
#: lib/cannery_web/live/container_live/edit_tags_component.html.heex:54
|
||||
msgid "Adding..."
|
||||
msgstr ""
|
||||
|
||||
@ -238,3 +238,8 @@ msgstr ""
|
||||
#: lib/cannery_web/live/invite_live/index.ex:123
|
||||
msgid "Copied to clipboard"
|
||||
msgstr ""
|
||||
|
||||
#, elixir-autogen, elixir-format
|
||||
#: lib/cannery_web/live/container_live/edit_tags_component.ex:58
|
||||
msgid "%{name} removed successfully"
|
||||
msgstr ""
|
||||
|
@ -120,12 +120,13 @@ defmodule Cannery.AmmoTest do
|
||||
|
||||
test "list_ammo_groups/0 returns all ammo_groups",
|
||||
%{ammo_group: ammo_group, current_user: current_user} do
|
||||
assert Ammo.list_ammo_groups(current_user) == [ammo_group]
|
||||
assert Ammo.list_ammo_groups(current_user) == [ammo_group] |> Repo.preload(:shot_groups)
|
||||
end
|
||||
|
||||
test "get_ammo_group!/1 returns the ammo_group with given id",
|
||||
%{ammo_group: ammo_group, current_user: current_user} do
|
||||
assert Ammo.get_ammo_group!(ammo_group.id, current_user) == ammo_group
|
||||
assert Ammo.get_ammo_group!(ammo_group.id, current_user) ==
|
||||
ammo_group |> Repo.preload(:shot_groups)
|
||||
end
|
||||
|
||||
test "create_ammo_group/1 with valid data creates a ammo_group",
|
||||
@ -167,7 +168,8 @@ defmodule Cannery.AmmoTest do
|
||||
assert {:error, %Changeset{}} =
|
||||
Ammo.update_ammo_group(ammo_group, @invalid_attrs, current_user)
|
||||
|
||||
assert ammo_group == Ammo.get_ammo_group!(ammo_group.id, current_user)
|
||||
assert ammo_group |> Repo.preload(:shot_groups) ==
|
||||
Ammo.get_ammo_group!(ammo_group.id, current_user)
|
||||
end
|
||||
|
||||
test "delete_ammo_group/1 deletes the ammo_group",
|
||||
|
@ -33,12 +33,14 @@ defmodule Cannery.ContainersTest do
|
||||
|
||||
test "list_containers/1 returns all containers",
|
||||
%{current_user: current_user, container: container} do
|
||||
assert Containers.list_containers(current_user) == [container]
|
||||
assert Containers.list_containers(current_user) ==
|
||||
[container |> Repo.preload([:ammo_groups, :tags])]
|
||||
end
|
||||
|
||||
test "get_container!/1 returns the container with given id",
|
||||
%{current_user: current_user, container: container} do
|
||||
assert Containers.get_container!(container.id, current_user) == container
|
||||
assert Containers.get_container!(container.id, current_user) ==
|
||||
container |> Repo.preload([:ammo_groups, :tags])
|
||||
end
|
||||
|
||||
test "create_container/1 with valid data creates a container", %{current_user: current_user} do
|
||||
@ -73,7 +75,8 @@ defmodule Cannery.ContainersTest do
|
||||
assert {:error, %Changeset{}} =
|
||||
Containers.update_container(container, current_user, @invalid_attrs)
|
||||
|
||||
assert container == Containers.get_container!(container.id, current_user)
|
||||
assert container |> Repo.preload([:ammo_groups, :tags]) ==
|
||||
Containers.get_container!(container.id, current_user)
|
||||
end
|
||||
|
||||
test "delete_container/1 deletes the container",
|
||||
|
@ -50,7 +50,7 @@ defmodule CanneryWeb.AmmoGroupLiveTest do
|
||||
|> follow_redirect(conn, Routes.ammo_group_index_path(conn, :index))
|
||||
|
||||
assert html =~ dgettext("prompts", "Ammo group created successfully")
|
||||
assert html =~ "some notes"
|
||||
assert html =~ "42"
|
||||
end
|
||||
|
||||
test "saves new shot_group", %{conn: conn, ammo_group: ammo_group} do
|
||||
@ -95,7 +95,7 @@ defmodule CanneryWeb.AmmoGroupLiveTest do
|
||||
|> follow_redirect(conn, Routes.ammo_group_index_path(conn, :index))
|
||||
|
||||
assert html =~ dgettext("prompts", "Ammo group updated successfully")
|
||||
assert html =~ "some updated notes"
|
||||
assert html =~ "43"
|
||||
end
|
||||
|
||||
test "deletes ammo_group in listing", %{conn: conn, ammo_group: ammo_group} do
|
||||
|
@ -70,7 +70,7 @@ defmodule CanneryWeb.ContainerLiveTest do
|
||||
{:ok, index_live, _html} = live(conn, Routes.container_index_path(conn, :index))
|
||||
|
||||
assert index_live |> element("[data-qa=\"edit-#{container.id}\"]") |> render_click() =~
|
||||
gettext("Edit Container")
|
||||
gettext("Edit %{name}", name: container.name)
|
||||
|
||||
assert_patch(index_live, Routes.container_index_path(conn, :edit, container))
|
||||
|
||||
@ -103,7 +103,7 @@ defmodule CanneryWeb.ContainerLiveTest do
|
||||
test "displays container", %{conn: conn, container: container} do
|
||||
{:ok, _show_live, html} = live(conn, Routes.container_show_path(conn, :show, container))
|
||||
|
||||
assert html =~ gettext("Show Container")
|
||||
assert html =~ gettext("Show %{name}", name: container.name)
|
||||
assert html =~ container.location
|
||||
end
|
||||
|
||||
@ -115,7 +115,7 @@ defmodule CanneryWeb.ContainerLiveTest do
|
||||
{:ok, show_live, _html} = live(conn, Routes.container_show_path(conn, :show, container))
|
||||
|
||||
assert show_live |> element("[data-qa=\"edit\"]") |> render_click() =~
|
||||
gettext("Edit Container")
|
||||
gettext("Edit %{name}", name: container.name)
|
||||
|
||||
assert_patch(show_live, Routes.container_show_path(conn, :edit, container))
|
||||
|
||||
|
@ -56,8 +56,8 @@ defmodule Cannery.Fixtures do
|
||||
|> Atom.to_string()
|
||||
|> Email.generate_email(Accounts.get_user!(user_id), attrs)
|
||||
|
||||
[_, html_token, _] = email.html_body |> String.split("[TOKEN]")
|
||||
[_, text_token, _] = email.text_body |> String.split("[TOKEN]")
|
||||
[_, html_token | _] = email.html_body |> String.split("[TOKEN]")
|
||||
[_, text_token | _] = email.text_body |> String.split("[TOKEN]")
|
||||
^text_token = html_token
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user