Add Styler
This commit is contained in:
@@ -17,6 +17,7 @@ defmodule TradexWeb.CoreComponents do
|
||||
use Phoenix.Component
|
||||
use Gettext, backend: TradexWeb.Gettext
|
||||
|
||||
alias Phoenix.HTML.FormField
|
||||
alias Phoenix.LiveView.JS
|
||||
|
||||
@doc """
|
||||
@@ -278,8 +279,7 @@ defmodule TradexWeb.CoreComponents do
|
||||
values: ~w(checkbox color date datetime-local email file month number password
|
||||
range search select tel text textarea time url week)
|
||||
|
||||
attr :field, Phoenix.HTML.FormField,
|
||||
doc: "a form field struct retrieved from the form, for example: @form[:email]"
|
||||
attr :field, FormField, doc: "a form field struct retrieved from the form, for example: @form[:email]"
|
||||
|
||||
attr :errors, :list, default: []
|
||||
attr :checked, :boolean, doc: "the checked flag for checkbox inputs"
|
||||
@@ -287,11 +287,10 @@ defmodule TradexWeb.CoreComponents do
|
||||
attr :options, :list, doc: "the options to pass to Phoenix.HTML.Form.options_for_select/2"
|
||||
attr :multiple, :boolean, default: false, doc: "the multiple flag for select inputs"
|
||||
|
||||
attr :rest, :global,
|
||||
include: ~w(accept autocomplete capture cols disabled form list max maxlength min minlength
|
||||
attr :rest, :global, include: ~w(accept autocomplete capture cols disabled form list max maxlength min minlength
|
||||
multiple pattern placeholder readonly required rows size step)
|
||||
|
||||
def input(%{field: %Phoenix.HTML.FormField{} = field} = assigns) do
|
||||
def input(%{field: %FormField{} = field} = assigns) do
|
||||
errors = if Phoenix.Component.used_input?(field), do: field.errors, else: []
|
||||
|
||||
assigns
|
||||
@@ -604,8 +603,7 @@ defmodule TradexWeb.CoreComponents do
|
||||
to: selector,
|
||||
time: 300,
|
||||
transition:
|
||||
{"transition-all transform ease-out duration-300",
|
||||
"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
|
||||
{"transition-all transform ease-out duration-300", "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
|
||||
"opacity-100 translate-y-0 sm:scale-100"}
|
||||
)
|
||||
end
|
||||
@@ -615,8 +613,7 @@ defmodule TradexWeb.CoreComponents do
|
||||
to: selector,
|
||||
time: 200,
|
||||
transition:
|
||||
{"transition-all transform ease-in duration-200",
|
||||
"opacity-100 translate-y-0 sm:scale-100",
|
||||
{"transition-all transform ease-in duration-200", "opacity-100 translate-y-0 sm:scale-100",
|
||||
"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"}
|
||||
)
|
||||
end
|
||||
|
@@ -1,4 +1,5 @@
|
||||
defmodule TradexWeb.UserConfirmationInstructionsLive do
|
||||
@moduledoc false
|
||||
use TradexWeb, :live_view
|
||||
|
||||
alias Tradex.Accounts
|
||||
|
@@ -1,4 +1,5 @@
|
||||
defmodule TradexWeb.UserConfirmationLive do
|
||||
@moduledoc false
|
||||
use TradexWeb, :live_view
|
||||
|
||||
alias Tradex.Accounts
|
||||
|
@@ -1,4 +1,5 @@
|
||||
defmodule TradexWeb.UserForgotPasswordLive do
|
||||
@moduledoc false
|
||||
use TradexWeb, :live_view
|
||||
|
||||
alias Tradex.Accounts
|
||||
|
@@ -1,4 +1,5 @@
|
||||
defmodule TradexWeb.UserLoginLive do
|
||||
@moduledoc false
|
||||
use TradexWeb, :live_view
|
||||
|
||||
def render(assigns) do
|
||||
|
@@ -1,4 +1,5 @@
|
||||
defmodule TradexWeb.UserRegistrationLive do
|
||||
@moduledoc false
|
||||
use TradexWeb, :live_view
|
||||
|
||||
alias Tradex.Accounts
|
||||
|
@@ -1,4 +1,5 @@
|
||||
defmodule TradexWeb.UserResetPasswordLive do
|
||||
@moduledoc false
|
||||
use TradexWeb, :live_view
|
||||
|
||||
alias Tradex.Accounts
|
||||
|
@@ -1,4 +1,5 @@
|
||||
defmodule TradexWeb.UserSettingsLive do
|
||||
@moduledoc false
|
||||
use TradexWeb, :live_view
|
||||
|
||||
alias Tradex.Accounts
|
||||
|
@@ -1,5 +1,7 @@
|
||||
defmodule TradexWeb.Telemetry do
|
||||
@moduledoc false
|
||||
use Supervisor
|
||||
|
||||
import Telemetry.Metrics
|
||||
|
||||
def start_link(arg) do
|
||||
@@ -70,8 +72,7 @@ defmodule TradexWeb.Telemetry do
|
||||
),
|
||||
summary("tradex.repo.query.idle_time",
|
||||
unit: {:native, :millisecond},
|
||||
description:
|
||||
"The time the connection spent waiting before being checked out for the query"
|
||||
description: "The time the connection spent waiting before being checked out for the query"
|
||||
),
|
||||
|
||||
# VM Metrics
|
||||
|
@@ -1,8 +1,9 @@
|
||||
defmodule TradexWeb.UserAuth do
|
||||
@moduledoc false
|
||||
use TradexWeb, :verified_routes
|
||||
|
||||
import Plug.Conn
|
||||
import Phoenix.Controller
|
||||
import Plug.Conn
|
||||
|
||||
alias Tradex.Accounts
|
||||
|
||||
|
Reference in New Issue
Block a user