Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
a80df49fdd | |||
92d1d21d00 | |||
917f627933 | |||
4946a6b119 | |||
9f784c3190 | |||
aa08e212ee | |||
80ad939aab | |||
08c9cddc78 | |||
e6285c282b | |||
61829fc042 | |||
e2f8fd3ee5 |
18
.drone.yml
18
.drone.yml
@ -27,19 +27,33 @@ steps:
|
|||||||
- npm install --prefix assets
|
- npm install --prefix assets
|
||||||
- mix test
|
- mix test
|
||||||
|
|
||||||
- name: build and publish
|
- name: build and publish stable
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
repo: shibaobun/cannery
|
repo: shibaobun/cannery
|
||||||
tags: latest
|
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
password:
|
password:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
|
tags: latest
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- stable
|
- 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
|
- name: rebuild-cache
|
||||||
image: drillster/drone-volume-cache
|
image: drillster/drone-volume-cache
|
||||||
volumes:
|
volumes:
|
||||||
|
15
CHANGELOG.md
15
CHANGELOG.md
@ -1,7 +1,14 @@
|
|||||||
# 0.3.0
|
# v0.2.2
|
||||||
-
|
- Fix loading and reconnecting pages not being fixed
|
||||||
|
- Fix closing modal in some cases not triggering a page reload
|
||||||
|
- Fix error when display container and tag edit routes from a fresh reload
|
||||||
|
|
||||||
# 0.2.0
|
# 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
|
- Add or remove tags from containers list and details page
|
||||||
- Show tags on containers
|
- Show tags on containers
|
||||||
- Add "Cannery" to page titles
|
- Add "Cannery" to page titles
|
||||||
@ -11,5 +18,5 @@
|
|||||||
- Show shot history for an ammo group
|
- Show shot history for an ammo group
|
||||||
- Show ammo round totals and total shot for ammo types
|
- Show ammo round totals and total shot for ammo types
|
||||||
|
|
||||||
# 0.1.0
|
# v0.1.0
|
||||||
- Initial release!
|
- Initial release!
|
||||||
|
@ -17,8 +17,7 @@
|
|||||||
-o-transform: scale(1.5);
|
-o-transform: scale(1.5);
|
||||||
transform: scale(1.5);
|
transform: scale(1.5);
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
margin-left: auto;
|
margin: 1em auto;
|
||||||
margin-right: auto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
let={f}
|
let={f}
|
||||||
for={@changeset}
|
for={@changeset}
|
||||||
id="shot-group-form"
|
id="shot-group-form"
|
||||||
class="flex flex-col sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
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-target={@myself}
|
||||||
phx-change="validate"
|
phx-change="validate"
|
||||||
phx-submit="save"
|
phx-submit="save"
|
||||||
|
@ -9,7 +9,7 @@ defmodule CanneryWeb.Components.UserCard do
|
|||||||
~H"""
|
~H"""
|
||||||
<div
|
<div
|
||||||
id={"user-#{@user.id}"}
|
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
|
border border-gray-400 rounded-lg shadow-lg hover:shadow-md
|
||||||
transition-all duration-300 ease-in-out"
|
transition-all duration-300 ease-in-out"
|
||||||
>
|
>
|
||||||
@ -21,7 +21,8 @@ defmodule CanneryWeb.Components.UserCard do
|
|||||||
<%= if @user.confirmed_at |> is_nil() do %>
|
<%= if @user.confirmed_at |> is_nil() do %>
|
||||||
Email unconfirmed
|
Email unconfirmed
|
||||||
<% else %>
|
<% else %>
|
||||||
User was confirmed at<%= @user.confirmed_at |> display_datetime() %>
|
<p>User was confirmed at</p>
|
||||||
|
<%= @user.confirmed_at |> display_datetime() %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
phx-target={@myself}
|
phx-target={@myself}
|
||||||
phx-change="validate"
|
phx-change="validate"
|
||||||
phx-submit="save"
|
phx-submit="save"
|
||||||
class="flex flex-col sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
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 %>
|
<%= if @changeset.action && not @changeset.valid? do %>
|
||||||
<div class="invalid-feedback col-span-3 text-center">
|
<div class="invalid-feedback col-span-3 text-center">
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
phx-target={@myself}
|
phx-target={@myself}
|
||||||
phx-change="validate"
|
phx-change="validate"
|
||||||
phx-submit="save"
|
phx-submit="save"
|
||||||
class="flex flex-col sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
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 %>
|
<%= if @changeset.action && not @changeset.valid? do %>
|
||||||
<div class="invalid-feedback col-span-3 text-center">
|
<div class="invalid-feedback col-span-3 text-center">
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
let={f}
|
let={f}
|
||||||
for={:tag}
|
for={:tag}
|
||||||
id="add-tag-to-container-form"
|
id="add-tag-to-container-form"
|
||||||
class="flex flex-col sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
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-target={@myself}
|
||||||
phx-submit="save"
|
phx-submit="save"
|
||||||
>
|
>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
let={f}
|
let={f}
|
||||||
for={@changeset}
|
for={@changeset}
|
||||||
id="container-form"
|
id="container-form"
|
||||||
class="flex flex-col sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
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-target={@myself}
|
||||||
phx-change="validate"
|
phx-change="validate"
|
||||||
phx-submit="save"
|
phx-submit="save"
|
||||||
|
@ -16,7 +16,7 @@ defmodule CanneryWeb.ContainerLive.Index do
|
|||||||
|
|
||||||
@impl true
|
@impl true
|
||||||
def handle_params(params, _url, %{assigns: %{live_action: live_action}} = socket) do
|
def handle_params(params, _url, %{assigns: %{live_action: live_action}} = socket) do
|
||||||
{:noreply, apply_action(socket, live_action, params)}
|
{:noreply, apply_action(socket, live_action, params) |> display_containers()}
|
||||||
end
|
end
|
||||||
|
|
||||||
defp apply_action(%{assigns: %{current_user: current_user}} = socket, :edit, %{"id" => id}) do
|
defp apply_action(%{assigns: %{current_user: current_user}} = socket, :edit, %{"id" => id}) do
|
||||||
|
@ -130,7 +130,7 @@ defmodule CanneryWeb.HomeLive do
|
|||||||
<li class="flex flex-row justify-center space-x-2">
|
<li class="flex flex-row justify-center space-x-2">
|
||||||
<b>Version:</b>
|
<b>Version:</b>
|
||||||
<p>
|
<p>
|
||||||
0.2.0
|
0.2.2
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
let={f}
|
let={f}
|
||||||
for={@changeset}
|
for={@changeset}
|
||||||
id="invite-form"
|
id="invite-form"
|
||||||
class="flex flex-col sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
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-target={@myself}
|
||||||
phx-change="validate"
|
phx-change="validate"
|
||||||
phx-submit="save"
|
phx-submit="save"
|
||||||
|
@ -38,28 +38,39 @@ defmodule CanneryWeb.LiveHelpers do
|
|||||||
"""
|
"""
|
||||||
def modal(assigns) do
|
def modal(assigns) do
|
||||||
~H"""
|
~H"""
|
||||||
|
<%= live_patch to: @return_to,
|
||||||
|
id: "modal-bg",
|
||||||
|
class:
|
||||||
|
"fade-in fixed z-10 left-0 top-0
|
||||||
|
w-full h-full overflow-hidden
|
||||||
|
p-8 flex flex-col justify-center items-center cursor-auto",
|
||||||
|
style: "background-color: rgba(0,0,0,0.4);",
|
||||||
|
phx_remove: hide_modal()
|
||||||
|
do %>
|
||||||
|
<span class="hidden"></span>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
id="modal"
|
id="modal"
|
||||||
class="fade-in fixed z-10 left-0 top-0
|
class="fixed z-10 left-0 top-0 pointer-events-none
|
||||||
w-full h-full overflow-hidden
|
w-full h-full overflow-hidden
|
||||||
p-8 flex flex-col justify-center items-center"
|
p-8 flex flex-col justify-center items-center"
|
||||||
style="opacity: 1 !important; background-color: rgba(0,0,0,0.4);"
|
|
||||||
phx-remove={hide_modal()}
|
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
id="modal-content"
|
id="modal-content"
|
||||||
class="fade-in-scale w-full max-w-3xl max-h-128 relative overflow-y-auto
|
class="fade-in-scale w-full max-w-3xl max-h-128 relative pointer-events-auto overflow-y-auto
|
||||||
|
p-8 flex flex-col justify-center items-center
|
||||||
flex flex-col justify-start items-center
|
flex flex-col justify-start items-center
|
||||||
bg-white border-2 rounded-lg"
|
bg-white border-2 rounded-lg"
|
||||||
phx-click-away={hide_modal()}
|
|
||||||
phx-window-keydown={hide_modal()}
|
|
||||||
phx-key="escape"
|
|
||||||
>
|
>
|
||||||
<%= live_patch to: @return_to,
|
<%= live_patch to: @return_to,
|
||||||
id: "close",
|
id: "close",
|
||||||
class:
|
class:
|
||||||
"absolute top-8 right-10 text-gray-500 hover:text-gray-800 transition-all duration-500 ease-in-out",
|
"absolute top-8 right-10
|
||||||
phx_click: hide_modal() do %>
|
text-gray-500 hover:text-gray-800
|
||||||
|
transition-all duration-500 ease-in-out",
|
||||||
|
phx_remove: hide_modal()
|
||||||
|
do %>
|
||||||
<i class="fa-fw fa-lg fas fa-times"></i>
|
<i class="fa-fw fa-lg fas fa-times"></i>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
@ -74,6 +85,7 @@ defmodule CanneryWeb.LiveHelpers do
|
|||||||
def hide_modal(js \\ %JS{}) do
|
def hide_modal(js \\ %JS{}) do
|
||||||
js
|
js
|
||||||
|> JS.hide(to: "#modal", transition: "fade-out")
|
|> JS.hide(to: "#modal", transition: "fade-out")
|
||||||
|
|> JS.hide(to: "#modal-bg", transition: "fade-out")
|
||||||
|> JS.hide(to: "#modal-content", transition: "fade-out-scale")
|
|> JS.hide(to: "#modal-content", transition: "fade-out-scale")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
let={f}
|
let={f}
|
||||||
for={@changeset}
|
for={@changeset}
|
||||||
id="shot-group-form"
|
id="shot-group-form"
|
||||||
class="flex flex-col sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
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-target={@myself}
|
||||||
phx-change="validate"
|
phx-change="validate"
|
||||||
phx-submit="save"
|
phx-submit="save"
|
||||||
|
@ -36,7 +36,7 @@ defmodule CanneryWeb.TagLive.FormComponent do
|
|||||||
let={f}
|
let={f}
|
||||||
for={@changeset}
|
for={@changeset}
|
||||||
id="tag-form"
|
id="tag-form"
|
||||||
class="flex flex-col sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
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-target={@myself}
|
||||||
phx-change="validate"
|
phx-change="validate"
|
||||||
phx-submit="save"
|
phx-submit="save"
|
||||||
|
@ -15,7 +15,7 @@ defmodule CanneryWeb.TagLive.Index do
|
|||||||
|
|
||||||
@impl true
|
@impl true
|
||||||
def handle_params(params, _url, %{assigns: %{live_action: live_action}} = socket) do
|
def handle_params(params, _url, %{assigns: %{live_action: live_action}} = socket) do
|
||||||
{:noreply, apply_action(socket, live_action, params)}
|
{:noreply, apply_action(socket, live_action, params) |> display_tags}
|
||||||
end
|
end
|
||||||
|
|
||||||
defp apply_action(%{assigns: %{current_user: current_user}} = socket, :edit, %{"id" => id}) do
|
defp apply_action(%{assigns: %{current_user: current_user}} = socket, :edit, %{"id" => id}) do
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
<div
|
<div
|
||||||
id="loading"
|
id="loading"
|
||||||
class="absolute opacity-0 top-0 left-0 w-screen h-screen bg-white z-50
|
class="fixed opacity-0 top-0 left-0 w-screen h-screen bg-white z-50
|
||||||
flex flex-col justify-center items-center space-y-4
|
flex flex-col justify-center items-center space-y-4
|
||||||
transition-opacity ease-in-out duration-500"
|
transition-opacity ease-in-out duration-500"
|
||||||
>
|
>
|
||||||
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
<div
|
<div
|
||||||
id="disconnect"
|
id="disconnect"
|
||||||
class="absolute opacity-0 top-0 left-0 w-screen h-screen bg-white z-50
|
class="fixed opacity-0 top-0 left-0 w-screen h-screen bg-white z-50
|
||||||
flex flex-col justify-center items-center space-y-4
|
flex flex-col justify-center items-center space-y-4
|
||||||
transition-opacity ease-in-out duration-500"
|
transition-opacity ease-in-out duration-500"
|
||||||
>
|
>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
Routes.user_confirmation_path(@conn, :create),
|
Routes.user_confirmation_path(@conn, :create),
|
||||||
[
|
[
|
||||||
class:
|
class:
|
||||||
"flex flex-col sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
"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 -> %>
|
fn f -> %>
|
||||||
<%= label(f, :email, class: "title text-lg text-primary-600") %>
|
<%= label(f, :email, class: "title text-lg text-primary-600") %>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
Routes.user_registration_path(@conn, :create),
|
Routes.user_registration_path(@conn, :create),
|
||||||
[
|
[
|
||||||
class:
|
class:
|
||||||
"flex flex-col sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
"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 -> %>
|
fn f -> %>
|
||||||
<%= if @changeset.action && not @changeset.valid? do %>
|
<%= if @changeset.action && not @changeset.valid? do %>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
Routes.user_reset_password_path(@conn, :update, @token),
|
Routes.user_reset_password_path(@conn, :update, @token),
|
||||||
[
|
[
|
||||||
class:
|
class:
|
||||||
"flex flex-col sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
"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 -> %>
|
fn f -> %>
|
||||||
<%= if @changeset.action && not @changeset.valid? do %>
|
<%= if @changeset.action && not @changeset.valid? do %>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
Routes.user_reset_password_path(@conn, :create),
|
Routes.user_reset_password_path(@conn, :create),
|
||||||
[
|
[
|
||||||
class:
|
class:
|
||||||
"flex flex-col sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
"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 -> %>
|
fn f -> %>
|
||||||
<%= label(f, :email, class: "title text-lg text-primary-600") %>
|
<%= label(f, :email, class: "title text-lg text-primary-600") %>
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
[
|
[
|
||||||
as: :user,
|
as: :user,
|
||||||
class:
|
class:
|
||||||
"flex flex-col sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
"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 -> %>
|
fn f -> %>
|
||||||
<%= if @error_message do %>
|
<%= if @error_message do %>
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
Routes.user_settings_path(@conn, :update),
|
Routes.user_settings_path(@conn, :update),
|
||||||
[
|
[
|
||||||
class:
|
class:
|
||||||
"pb-4 text-center flex flex-col sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
"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 -> %>
|
fn f -> %>
|
||||||
<h3 class="title text-primary-600 text-lg col-span-3">
|
<h3 class="title text-primary-600 text-lg col-span-3">
|
||||||
@ -53,7 +53,7 @@
|
|||||||
Routes.user_settings_path(@conn, :update),
|
Routes.user_settings_path(@conn, :update),
|
||||||
[
|
[
|
||||||
class:
|
class:
|
||||||
"pb-4 text-center flex flex-col sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
"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 -> %>
|
fn f -> %>
|
||||||
<h3 class="title text-primary-600 text-lg col-span-3">
|
<h3 class="title text-primary-600 text-lg col-span-3">
|
||||||
|
2
mix.exs
2
mix.exs
@ -4,7 +4,7 @@ defmodule Cannery.MixProject do
|
|||||||
def project do
|
def project do
|
||||||
[
|
[
|
||||||
app: :cannery,
|
app: :cannery,
|
||||||
version: "0.2.0",
|
version: "0.2.2",
|
||||||
elixir: "~> 1.12",
|
elixir: "~> 1.12",
|
||||||
elixirc_paths: elixirc_paths(Mix.env()),
|
elixirc_paths: elixirc_paths(Mix.env()),
|
||||||
compilers: [:gettext] ++ Mix.compilers(),
|
compilers: [:gettext] ++ Mix.compilers(),
|
||||||
|
Reference in New Issue
Block a user