major deps update: phoenix liveview, fixing some minor issues
This commit is contained in:
parent
bc36586212
commit
db9f127e7b
9 changed files with 12 additions and 9 deletions
lib
shift73k_web.ex
shift73k_web
|
@ -46,7 +46,7 @@ defmodule Shift73kWeb do
|
|||
def live_view do
|
||||
quote do
|
||||
use Phoenix.LiveView,
|
||||
layout: {Shift73kWeb.LayoutView, "live.html"}
|
||||
layout: {Shift73kWeb.LayoutView, :live}
|
||||
|
||||
unquote(view_helpers())
|
||||
import Shift73kWeb.LiveHelpers
|
||||
|
@ -100,7 +100,7 @@ defmodule Shift73kWeb do
|
|||
use Phoenix.HTML
|
||||
|
||||
# Import LiveView helpers (live_render, live_component, live_patch, etc)
|
||||
import Phoenix.LiveView.Helpers
|
||||
import Phoenix.Component
|
||||
|
||||
# Import basic rendering functionality (render, render_layout, etc)
|
||||
import Phoenix.View
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
defmodule Shift73kWeb.LiveHelpers do
|
||||
import Phoenix.LiveView
|
||||
import Phoenix.Component
|
||||
|
||||
alias Shift73k.Accounts
|
||||
alias Shift73k.Accounts.User
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div>
|
||||
|
||||
<.form let={f} for={@changeset} phx-change="validate" phx-submit="save" phx-target={@myself} id="shift_template-form">
|
||||
<.form :let={f} for={@changeset} phx-change="validate" phx-submit="save" phx-target={@myself} id="shift_template-form">
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
</h2>
|
||||
<p class="lead">Create an account to manage your work shifts with us.</p>
|
||||
|
||||
<.form let={f} for={@changeset} phx-change="validate" phx-submit="save" novalidate id="reg_form">
|
||||
<.form :let={f} for={@changeset} phx-change="validate" phx-submit="save" novalidate id="reg_form">
|
||||
|
||||
<%= label f, :email, class: "form-label" %>
|
||||
<div class="inner-addon left-addon mb-3" phx-feedback-for={input_id(f, :email)}>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
</h2>
|
||||
<p class="lead">Hi <%= @user.email %> — tell us your new password, please.</p>
|
||||
|
||||
<.form let={f} for={@changeset} phx-change="validate" phx-submit="save" novalidate id="pw_reset_form">
|
||||
<.form :let={f} for={@changeset} phx-change="validate" phx-submit="save" novalidate id="pw_reset_form">
|
||||
|
||||
<%= label f, :password, "New password", class: "form-label" %>
|
||||
<div class="inner-addon left-addon mb-3" phx-feedback-for={input_id(f, :password)}>
|
||||
|
|
|
@ -243,7 +243,7 @@
|
|||
<%# page buttons %>
|
||||
<%= for page_num <- generate_page_list(@page.page_number, @page.total_pages) do %>
|
||||
<%= cond do %>
|
||||
<%= page_num < 1 -> %>
|
||||
<% page_num < 1 -> %>
|
||||
<li class="page-item disabled">
|
||||
<span class="page-link" aria-hidden="true">…</span>
|
||||
<span class="visually-hidden" role="img" aria-label="ellipses">…</span>
|
||||
|
|
|
@ -5,7 +5,9 @@
|
|||
<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] || "", suffix: assigns[:page_title] && " · Shift73k" || "Shift73k" %>
|
||||
<Phoenix.Component.live_title suffix=" · Shift73k">
|
||||
<%= assigns[:page_title] || "Hi!" %>
|
||||
</Phoenix.Component.live_title>
|
||||
<%= render "_preamble.html", assigns %>
|
||||
<link rel="apple-touch-icon" sizes="180x180" href={Routes.static_path(@conn, "/apple-touch-icon.png")}>
|
||||
<link rel="icon" type="image/png" sizes="32x32" href={Routes.static_path(@conn, "/favicon-32x32.png")}>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue