Administration

<.link :if={@map_subscriptions_enabled?} phx-click="authorize"> <.icon name="hero-key-solid" class="w-6 h-6 text-gray-500 hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-100" />
Maps Management <.link class="btn mt-2 w-full btn-neutral rounded-none" navigate={~p"/admin/maps"}> <.icon name="hero-map-solid" class="w-6 h-6" />

Manage All Maps

Characters <.link class="btn mt-2 w-full btn-neutral rounded-none" navigate={~p"/admin/characters"} > <.icon name="hero-users-solid" class="w-6 h-6" />

View All Characters

<.button class="mt-2" type="button" phx-click="create-map"> Create Map
Wanderer Balance

{@total_balance |> Number.to_human(units: ["", "K", "M", "B", "T", "P"])} ISK

Update User Balance <.form :let={f} for={@form} phx-change="check-amount" phx-submit="update-balance"> <.live_select field={f[:character_id]} dropdown_extra_class="max-h-64 overflow-y-auto flex flex-row" available_option_class="w-full" debounce={250} update_min_len={3} options={@character_search_options} placeholder="Search a character" > <:option :let={option}> <.search_member_item option={option} /> <.live_select field={f[:amount]} update_min_len={0} options={@amounts} placeholder="Amount" />
Unlink Character <.form :let={f} for={@unlink_character_form} phx-submit="unlink-character"> <.live_select field={f[:unlink_character_id]} dropdown_extra_class="max-h-64 overflow-y-auto flex flex-row" available_option_class="w-full" debounce={250} update_min_len={3} options={@character_search_options} placeholder="Search a character" > <:option :let={option}> <.search_member_item option={option} />
EVE DB Data <.button class="mt-2" type="button" phx-click="update-eve-db-data" phx-disable-with="Updating EVE DB Data..." > Update EVE DB Data
Invites

<.link class="btn mt-2 w-full btn-neutral rounded-none" patch={~p"/admin/invite"}> <.icon name="hero-plus-solid" class="w-6 h-6" />

New Invite

<.table id="invites" rows={@invites} class="!max-h-[40vh] !overflow-y-auto"> <:col :let={invite} label="Link">
{get_invite_link(@uri, invite.token)}
<.button phx-hook="CopyToClipboard" id="copy-to-clipboard" class="copy-link btn btn-neutral rounded-none" data-url={get_invite_link(@uri, invite.token)} > Copy
<:col :let={invite} label="Type"> {invite.type} <:col :let={invite} label="Valid Until">

<.local_time id={invite.id} at={invite.valid_until} />

<:action :let={invite}> <.button phx-click="delete-invite" phx-value-id={invite.id} data={[confirm: "Please confirm to delete invite!"]} class="hover:text-white" > <.icon name="hero-trash-solid" class="w-4 h-4" />
Tracking Pools <.table id="tracking_pools" rows={@tracker_stats} class="!max-h-[40vh] !overflow-y-auto" > <:col :let={stat} label="Pool">
{stat.title}
<:col :let={stat} label="Active">
true
<:col :let={stat} label="Count"> {stat.value}
<.modal :if={@live_action in [:add_invite_link]} title="New Invite" class="!w-[500px]" id="add_invite_link_modal" show on_cancel={JS.patch(~p"/admin")} > <.form :let={f} for={@form} phx-change="validate" phx-submit={@live_action}> <.input type="select" field={f[:type]} class="select h-8 min-h-[10px] !pt-1 !pb-1 text-sm bg-neutral-900" wrapper_class="mt-2" label="Type" options={ Enum.map(@invite_types, fn invite_type -> {invite_type.label, invite_type.id} end) } /> <.input type="select" field={f[:valid_until]} class="select h-8 min-h-[10px] !pt-1 !pb-1 text-sm bg-neutral-900" wrapper_class="mt-2" label="Valid" options={Enum.map(@valid_types, fn valid_type -> {valid_type.label, valid_type.id} end)} />