mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-10-09 21:16:26 +08:00
Typing env and secret name automatically upcases (#1736)
This commit is contained in:
parent
45f9e90451
commit
1f496c8605
3 changed files with 4 additions and 1 deletions
|
@ -14,6 +14,7 @@ defmodule LivebookWeb.FormComponents do
|
|||
attr :value, :any
|
||||
attr :errors, :list, default: []
|
||||
attr :field, Phoenix.HTML.FormField, doc: "a form field struct retrieved from the form"
|
||||
attr :class, :string, default: nil
|
||||
|
||||
attr :rest, :global, include: ~w(autocomplete readonly disabled)
|
||||
|
||||
|
@ -27,7 +28,7 @@ defmodule LivebookWeb.FormComponents do
|
|||
name={@name}
|
||||
id={@id || @name}
|
||||
value={Phoenix.HTML.Form.normalize_value("text", @value)}
|
||||
class="input"
|
||||
class={["input", @class]}
|
||||
{@rest}
|
||||
/>
|
||||
</.field_wrapper>
|
||||
|
|
|
@ -45,6 +45,7 @@ defmodule LivebookWeb.EnvVarComponent do
|
|||
field={f[:name]}
|
||||
label="Name (alphanumeric and underscore)"
|
||||
autofocus={@operation == :new}
|
||||
class="uppercase"
|
||||
/>
|
||||
<.text_field field={f[:value]} label="Value" autofocus={@operation == :edit} />
|
||||
<.hidden_field field={f[:operation]} value={@operation} />
|
||||
|
|
|
@ -98,6 +98,7 @@ defmodule LivebookWeb.SessionLive.SecretsComponent do
|
|||
spellcheck="false"
|
||||
autocomplete="off"
|
||||
phx-debounce="blur"
|
||||
class="uppercase"
|
||||
/>
|
||||
<.text_field
|
||||
field={f[:value]}
|
||||
|
|
Loading…
Add table
Reference in a new issue