Small changes (#1764)

This commit is contained in:
José Valim 2023-03-09 17:41:40 +01:00 committed by GitHub
parent 32e7122921
commit 5c106e81fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 8 deletions

View file

@ -102,6 +102,9 @@ defmodule LivebookWeb.Hub.Edit.PersonalComponent do
~H"""
<div id={@id} class="flex flex-col space-y-4">
<div class="flex flex-col space-y-4">
<.no_entries :if={@secrets == []}>
No secrets in this Hub yet.
</.no_entries>
<div
:for={secret <- @secrets}
class="flex items-center justify-between border border-gray-200 rounded-lg p-4"
@ -111,7 +114,7 @@ defmodule LivebookWeb.Hub.Edit.PersonalComponent do
</div>
<div class="flex">
<.link patch={@new_secret_path} class="button-base button-blue" id="add-secret">
Add new secret
Add secret
</.link>
</div>
</div>

View file

@ -43,7 +43,7 @@ defmodule LivebookWeb.Hub.SecretFormComponent do
autofocus={@secret_name == nil}
spellcheck="false"
autocomplete="off"
phx-debounce="blur"
phx-debounce
class="uppercase"
/>
<.text_field
@ -52,7 +52,7 @@ defmodule LivebookWeb.Hub.SecretFormComponent do
autofocus={@secret_name != nil}
spellcheck="false"
autocomplete="off"
phx-debounce="blur"
phx-debounce
/>
<.hidden_field field={f[:hub_id]} value={@hub.id} />
<div class="flex space-x-2">

View file

@ -70,7 +70,7 @@ defmodule LivebookWeb.SessionLive.AppInfoComponent do
autocomplete="off"
>
<div class="flex flex-col space-y-4">
<.text_field field={f[:slug]} label="Slug" spellcheck="false" phx-debounce="blur" />
<.text_field field={f[:slug]} label="Slug" spellcheck="false" phx-debounce />
<div class="flex flex-col space-y-1">
<.checkbox_field
field={f[:access_type]}
@ -79,7 +79,7 @@ defmodule LivebookWeb.SessionLive.AppInfoComponent do
unchecked_value="public"
/>
<%= if Ecto.Changeset.get_field(@changeset, :access_type) == :protected do %>
<.password_field field={f[:password]} spellcheck="false" phx-debounce="blur" />
<.password_field field={f[:password]} spellcheck="false" phx-debounce />
<% end %>
</div>
<.checkbox_field field={f[:show_source]} label="Show source" />

View file

@ -100,7 +100,7 @@ defmodule LivebookWeb.SessionLive.SecretsComponent do
autofocus={@prefill_secret_name == nil}
spellcheck="false"
autocomplete="off"
phx-debounce="blur"
phx-debounce
class="uppercase"
/>
<.text_field
@ -109,7 +109,7 @@ defmodule LivebookWeb.SessionLive.SecretsComponent do
autofocus={@prefill_secret_name != nil}
spellcheck="false"
autocomplete="off"
phx-debounce="blur"
phx-debounce
/>
<.radio_field
field={f[:hub_id]}

View file

@ -283,7 +283,7 @@ defmodule LivebookWeb.Hub.EditLiveTest do
|> render_click(%{})
assert_patch(view, ~p"/hub/#{hub.id}/secrets/new")
assert render(view) =~ "Add new secret"
assert render(view) =~ "Add secret"
view
|> element("#secrets-form")