add selectable ammo types
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -74,17 +74,41 @@
|
||||
<%= dgettext("errors", "Your browser does not support the canvas element.") %>
|
||||
</canvas>
|
||||
|
||||
<div class="w-full flex flex-col sm:flex-row justify-center items-center space-y-4 sm:space-y-0 sm:space-x-4 max-w-xl">
|
||||
<div class="w-full flex flex-col sm:flex-row justify-center items-center space-y-4 sm:space-y-0 sm:space-x-4 max-w-2xl">
|
||||
<.form
|
||||
:let={f}
|
||||
for={%{}}
|
||||
as={:ammo_type}
|
||||
phx-change="change_type"
|
||||
phx-submit="change_type"
|
||||
class="flex items-center"
|
||||
>
|
||||
<%= label(f, :type, gettext("Type"), class: "title text-primary-600 text-lg text-center") %>
|
||||
|
||||
<%= select(
|
||||
f,
|
||||
:type,
|
||||
[
|
||||
{gettext("All"), :all},
|
||||
{gettext("Rifle"), :rifle},
|
||||
{gettext("Shotgun"), :shotgun},
|
||||
{gettext("Pistol"), :pistol}
|
||||
],
|
||||
class: "mx-2 my-1 min-w-md input input-primary",
|
||||
value: @type
|
||||
) %>
|
||||
</.form>
|
||||
|
||||
<.form
|
||||
:let={f}
|
||||
for={%{}}
|
||||
as={:search}
|
||||
phx-change="search"
|
||||
phx-submit="search"
|
||||
class="grow self-stretch flex flex-col items-stretch"
|
||||
class="grow flex items-center"
|
||||
>
|
||||
<%= text_input(f, :search_term,
|
||||
class: "input input-primary",
|
||||
class: "grow input input-primary",
|
||||
value: @search,
|
||||
role: "search",
|
||||
phx_debounce: 300,
|
||||
|
Reference in New Issue
Block a user