update deps
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
<div class="flex flex-col justify-center items-center text-center space-y-8">
|
||||
<h2 class="title text-xl text-primary-600">
|
||||
<%= @title %>
|
||||
{@title}
|
||||
</h2>
|
||||
|
||||
<div class="flex flex-wrap justify-center items-center">
|
||||
@ -21,13 +21,13 @@
|
||||
)
|
||||
}
|
||||
>
|
||||
<%= tag.name %>
|
||||
{tag.name}
|
||||
<i class="fa-fw fa-sm fas fa-trash"></i>
|
||||
</.link>
|
||||
|
||||
<h2 :if={@container.tags |> Enum.empty?()} class="title text-xl text-primary-600">
|
||||
<%= gettext("No tags") %>
|
||||
<%= display_emoji("😔") %>
|
||||
{gettext("No tags")}
|
||||
{display_emoji("😔")}
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
@ -43,17 +43,17 @@
|
||||
phx-target={@myself}
|
||||
phx-submit="save"
|
||||
>
|
||||
<%= select(f, :tag_id, tag_options(@tags, @container),
|
||||
{select(f, :tag_id, tag_options(@tags, @container),
|
||||
class: "text-center col-span-2 input input-primary",
|
||||
id: "#{@id}-tag-select",
|
||||
phx_hook: "SlimSelect"
|
||||
) %>
|
||||
<%= error_tag(f, :tag_id, "col-span-3 text-center") %>
|
||||
)}
|
||||
{error_tag(f, :tag_id, "col-span-3 text-center")}
|
||||
|
||||
<%= submit(dgettext("actions", "Add"),
|
||||
{submit(dgettext("actions", "Add"),
|
||||
class: "mx-auto btn btn-primary",
|
||||
phx_disable_with: dgettext("prompts", "Adding...")
|
||||
) %>
|
||||
)}
|
||||
</.form>
|
||||
<% end %>
|
||||
</div>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<div>
|
||||
<h2 class="mb-8 text-center title text-xl text-primary-600">
|
||||
<%= @title %>
|
||||
{@title}
|
||||
</h2>
|
||||
<.form
|
||||
:let={f}
|
||||
@ -15,50 +15,50 @@
|
||||
:if={@changeset.action && not @changeset.valid?}
|
||||
class="invalid-feedback col-span-3 text-center"
|
||||
>
|
||||
<%= changeset_errors(@changeset) %>
|
||||
{changeset_errors(@changeset)}
|
||||
</div>
|
||||
|
||||
<%= label(f, :name, gettext("Name"), class: "title text-lg text-primary-600") %>
|
||||
<%= text_input(f, :name,
|
||||
{label(f, :name, gettext("Name"), class: "title text-lg text-primary-600")}
|
||||
{text_input(f, :name,
|
||||
class: "input input-primary col-span-2",
|
||||
maxlength: 255,
|
||||
phx_debounce: 300,
|
||||
placeholder: gettext("My cool ammo can")
|
||||
) %>
|
||||
<%= error_tag(f, :name, "col-span-3 text-center") %>
|
||||
)}
|
||||
{error_tag(f, :name, "col-span-3 text-center")}
|
||||
|
||||
<%= label(f, :desc, gettext("Description"), class: "title text-lg text-primary-600") %>
|
||||
<%= textarea(f, :desc,
|
||||
{label(f, :desc, gettext("Description"), class: "title text-lg text-primary-600")}
|
||||
{textarea(f, :desc,
|
||||
class: "input input-primary col-span-2",
|
||||
id: "container-form-desc",
|
||||
phx_debounce: 300,
|
||||
phx_update: "ignore",
|
||||
placeholder: gettext("Metal ammo can with the anime girl sticker")
|
||||
) %>
|
||||
<%= error_tag(f, :desc, "col-span-3 text-center") %>
|
||||
)}
|
||||
{error_tag(f, :desc, "col-span-3 text-center")}
|
||||
|
||||
<%= label(f, :type, gettext("Type"), class: "title text-lg text-primary-600") %>
|
||||
<%= text_input(f, :type,
|
||||
{label(f, :type, gettext("Type"), class: "title text-lg text-primary-600")}
|
||||
{text_input(f, :type,
|
||||
class: "input input-primary col-span-2",
|
||||
maxlength: 255,
|
||||
phx_debounce: 300,
|
||||
placeholder: gettext("Magazine, Clip, Ammo Box, etc")
|
||||
) %>
|
||||
<%= error_tag(f, :type, "col-span-3 text-center") %>
|
||||
)}
|
||||
{error_tag(f, :type, "col-span-3 text-center")}
|
||||
|
||||
<%= label(f, :location, gettext("Location"), class: "title text-lg text-primary-600") %>
|
||||
<%= textarea(f, :location,
|
||||
{label(f, :location, gettext("Location"), class: "title text-lg text-primary-600")}
|
||||
{textarea(f, :location,
|
||||
class: "input input-primary col-span-2",
|
||||
id: "container-form-location",
|
||||
phx_debounce: 300,
|
||||
phx_update: "ignore",
|
||||
placeholder: gettext("On the bookshelf")
|
||||
) %>
|
||||
<%= error_tag(f, :location, "col-span-3 text-center") %>
|
||||
)}
|
||||
{error_tag(f, :location, "col-span-3 text-center")}
|
||||
|
||||
<%= submit(dgettext("actions", "Save"),
|
||||
{submit(dgettext("actions", "Save"),
|
||||
class: "mx-auto btn btn-primary col-span-3",
|
||||
phx_disable_with: dgettext("prompts", "Saving...")
|
||||
) %>
|
||||
)}
|
||||
</.form>
|
||||
</div>
|
||||
|
@ -1,23 +1,23 @@
|
||||
<div class="flex flex-col justify-center items-center space-y-8">
|
||||
<h1 class="text-2xl title title-primary-500">
|
||||
<%= gettext("Containers") %>
|
||||
{gettext("Containers")}
|
||||
</h1>
|
||||
|
||||
<%= if @containers |> Enum.empty?() and @search |> is_nil() do %>
|
||||
<h2 class="text-xl title text-primary-600">
|
||||
<%= gettext("No containers") %>
|
||||
<%= display_emoji("😔") %>
|
||||
{gettext("No containers")}
|
||||
{display_emoji("😔")}
|
||||
</h2>
|
||||
|
||||
<.link patch={~p"/containers/new"} class="btn btn-primary">
|
||||
<%= dgettext("actions", "Add your first container!") %>
|
||||
{dgettext("actions", "Add your first container!")}
|
||||
</.link>
|
||||
<% else %>
|
||||
<.link patch={~p"/containers/new"} class="btn btn-primary">
|
||||
<%= dgettext("actions", "New Container") %>
|
||||
{dgettext("actions", "New Container")}
|
||||
</.link>
|
||||
|
||||
<div class="flex flex-col justify-center items-center space-y-4 w-full max-w-2xl sm:flex-row sm:space-y-0 sm:space-x-4">
|
||||
<div class="flex flex-col flex-wrap justify-center items-center space-y-4 w-full sm:flex-row sm:space-y-0 sm:space-x-4">
|
||||
<.form
|
||||
:let={f}
|
||||
for={%{}}
|
||||
@ -26,26 +26,26 @@
|
||||
phx-submit="search"
|
||||
class="flex items-center grow"
|
||||
>
|
||||
<%= text_input(f, :search_term,
|
||||
{text_input(f, :search_term,
|
||||
class: "grow input input-primary",
|
||||
phx_debounce: 300,
|
||||
placeholder: gettext("Search containers"),
|
||||
role: "search",
|
||||
value: @search
|
||||
) %>
|
||||
)}
|
||||
</.form>
|
||||
|
||||
<.toggle_button action="toggle_table" value={@view_table}>
|
||||
<span class="text-lg title text-primary-600">
|
||||
<%= gettext("View as table") %>
|
||||
{gettext("View as table")}
|
||||
</span>
|
||||
</.toggle_button>
|
||||
</div>
|
||||
|
||||
<%= if @containers |> Enum.empty?() do %>
|
||||
<h2 class="text-xl title text-primary-600">
|
||||
<%= gettext("No containers") %>
|
||||
<%= display_emoji("😔") %>
|
||||
{gettext("No containers")}
|
||||
{display_emoji("😔")}
|
||||
</h2>
|
||||
<% else %>
|
||||
<%= if @view_table do %>
|
||||
@ -57,16 +57,16 @@
|
||||
current_user={@current_user}
|
||||
>
|
||||
<:range :let={container}>
|
||||
<div class="flex justify-center items-center px-4 py-2 h-full min-w-20 flex-wrap">
|
||||
<div class="flex flex-wrap justify-center items-center px-4 py-2 h-full min-w-20">
|
||||
<button
|
||||
type="button"
|
||||
class="mx-2 my-1 text-sm btn btn-primary"
|
||||
phx-click="toggle_staged"
|
||||
phx-value-container_id={container.id}
|
||||
>
|
||||
<%= if container.staged,
|
||||
{if container.staged,
|
||||
do: dgettext("actions", "Unstage"),
|
||||
else: dgettext("actions", "Stage") %>
|
||||
else: dgettext("actions", "Stage")}
|
||||
</button>
|
||||
</div>
|
||||
</:range>
|
||||
|
@ -1,31 +1,31 @@
|
||||
<div class="flex flex-col justify-center items-center space-y-4">
|
||||
<h1 class="text-2xl title title-primary-500">
|
||||
<%= @container.name %>
|
||||
{@container.name}
|
||||
</h1>
|
||||
|
||||
<span :if={@container.desc} class="text-lg rounded-lg title">
|
||||
<%= gettext("Description:") %>
|
||||
<%= @container.desc %>
|
||||
{gettext("Description:")}
|
||||
{@container.desc}
|
||||
</span>
|
||||
|
||||
<span class="text-lg rounded-lg title">
|
||||
<%= gettext("Type:") %>
|
||||
<%= @container.type %>
|
||||
{gettext("Type:")}
|
||||
{@container.type}
|
||||
</span>
|
||||
|
||||
<span :if={@container.location} class="text-lg rounded-lg title">
|
||||
<%= gettext("Location:") %>
|
||||
<%= @container.location %>
|
||||
{gettext("Location:")}
|
||||
{@container.location}
|
||||
</span>
|
||||
|
||||
<span class="text-lg rounded-lg title">
|
||||
<%= gettext("Packs:") %>
|
||||
<%= @packs_count %>
|
||||
{gettext("Packs:")}
|
||||
{@packs_count}
|
||||
</span>
|
||||
|
||||
<span class="text-lg rounded-lg title">
|
||||
<%= gettext("Rounds:") %>
|
||||
<%= @round_count %>
|
||||
{gettext("Rounds:")}
|
||||
{@round_count}
|
||||
</span>
|
||||
|
||||
<div class="flex justify-center items-center space-x-4 text-primary-600">
|
||||
@ -54,9 +54,9 @@
|
||||
|
||||
<div class="flex flex-wrap justify-center items-center text-primary-600">
|
||||
<button type="button" class="mx-4 my-2 btn btn-primary" phx-click="toggle_staged">
|
||||
<%= if @container.staged,
|
||||
{if @container.staged,
|
||||
do: dgettext("actions", "Unstage from range"),
|
||||
else: dgettext("actions", "Stage for range") %>
|
||||
else: dgettext("actions", "Stage for range")}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@ -65,12 +65,12 @@
|
||||
<%= if @container.tags |> Enum.empty?() do %>
|
||||
<div class="flex flex-row justify-center items-center space-x-4">
|
||||
<h2 class="text-lg title text-primary-600">
|
||||
<%= gettext("No tags for this container") %>
|
||||
<%= display_emoji("😔") %>
|
||||
{gettext("No tags for this container")}
|
||||
{display_emoji("😔")}
|
||||
</h2>
|
||||
|
||||
<.link patch={~p"/container/edit_tags/#{@container}"} class="btn btn-primary">
|
||||
<%= dgettext("actions", "Why not add one?") %>
|
||||
{dgettext("actions", "Why not add one?")}
|
||||
</.link>
|
||||
</div>
|
||||
<% else %>
|
||||
@ -96,9 +96,9 @@
|
||||
phx-submit="change_class"
|
||||
class="flex items-center"
|
||||
>
|
||||
<%= label(f, :class, gettext("Class"), class: "title text-primary-600 text-lg text-center") %>
|
||||
{label(f, :class, gettext("Class"), class: "title text-primary-600 text-lg text-center")}
|
||||
|
||||
<%= select(
|
||||
{select(
|
||||
f,
|
||||
:class,
|
||||
[
|
||||
@ -107,14 +107,14 @@
|
||||
{gettext("Shotgun"), :shotgun},
|
||||
{gettext("Pistol"), :pistol}
|
||||
],
|
||||
class: "mx-2 my-1 min-w-md input input-primary",
|
||||
class: "mx-2 my-1 min-w-20 input input-primary",
|
||||
value: @class
|
||||
) %>
|
||||
)}
|
||||
</.form>
|
||||
|
||||
<.toggle_button action="toggle_table" value={@view_table}>
|
||||
<span class="text-lg title text-primary-600">
|
||||
<%= gettext("View as table") %>
|
||||
{gettext("View as table")}
|
||||
</span>
|
||||
</.toggle_button>
|
||||
</div>
|
||||
@ -122,7 +122,7 @@
|
||||
<div class="p-4 w-full">
|
||||
<%= if @packs |> Enum.empty?() do %>
|
||||
<h2 class="mx-4 text-lg text-center title text-primary-600">
|
||||
<%= gettext("No ammo in this container") %>
|
||||
{gettext("No ammo in this container")}
|
||||
</h2>
|
||||
<% else %>
|
||||
<%= if @view_table do %>
|
||||
@ -135,7 +135,7 @@
|
||||
>
|
||||
<:type :let={%{name: type_name} = type}>
|
||||
<.link navigate={~p"/type/#{type}"} class="link">
|
||||
<%= type_name %>
|
||||
{type_name}
|
||||
</.link>
|
||||
</:type>
|
||||
<:actions :let={%{count: pack_count} = pack}>
|
||||
|
Reference in New Issue
Block a user