mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-11-10 14:11:29 +08:00
Small changes (#1764)
This commit is contained in:
parent
32e7122921
commit
5c106e81fa
5 changed files with 11 additions and 8 deletions
|
|
@ -102,6 +102,9 @@ defmodule LivebookWeb.Hub.Edit.PersonalComponent do
|
||||||
~H"""
|
~H"""
|
||||||
<div id={@id} class="flex flex-col space-y-4">
|
<div id={@id} class="flex flex-col space-y-4">
|
||||||
<div 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
|
<div
|
||||||
:for={secret <- @secrets}
|
:for={secret <- @secrets}
|
||||||
class="flex items-center justify-between border border-gray-200 rounded-lg p-4"
|
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>
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<.link patch={@new_secret_path} class="button-base button-blue" id="add-secret">
|
<.link patch={@new_secret_path} class="button-base button-blue" id="add-secret">
|
||||||
Add new secret
|
Add secret
|
||||||
</.link>
|
</.link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ defmodule LivebookWeb.Hub.SecretFormComponent do
|
||||||
autofocus={@secret_name == nil}
|
autofocus={@secret_name == nil}
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
phx-debounce="blur"
|
phx-debounce
|
||||||
class="uppercase"
|
class="uppercase"
|
||||||
/>
|
/>
|
||||||
<.text_field
|
<.text_field
|
||||||
|
|
@ -52,7 +52,7 @@ defmodule LivebookWeb.Hub.SecretFormComponent do
|
||||||
autofocus={@secret_name != nil}
|
autofocus={@secret_name != nil}
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
phx-debounce="blur"
|
phx-debounce
|
||||||
/>
|
/>
|
||||||
<.hidden_field field={f[:hub_id]} value={@hub.id} />
|
<.hidden_field field={f[:hub_id]} value={@hub.id} />
|
||||||
<div class="flex space-x-2">
|
<div class="flex space-x-2">
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ defmodule LivebookWeb.SessionLive.AppInfoComponent do
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
>
|
>
|
||||||
<div class="flex flex-col space-y-4">
|
<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">
|
<div class="flex flex-col space-y-1">
|
||||||
<.checkbox_field
|
<.checkbox_field
|
||||||
field={f[:access_type]}
|
field={f[:access_type]}
|
||||||
|
|
@ -79,7 +79,7 @@ defmodule LivebookWeb.SessionLive.AppInfoComponent do
|
||||||
unchecked_value="public"
|
unchecked_value="public"
|
||||||
/>
|
/>
|
||||||
<%= if Ecto.Changeset.get_field(@changeset, :access_type) == :protected do %>
|
<%= 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 %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<.checkbox_field field={f[:show_source]} label="Show source" />
|
<.checkbox_field field={f[:show_source]} label="Show source" />
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ defmodule LivebookWeb.SessionLive.SecretsComponent do
|
||||||
autofocus={@prefill_secret_name == nil}
|
autofocus={@prefill_secret_name == nil}
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
phx-debounce="blur"
|
phx-debounce
|
||||||
class="uppercase"
|
class="uppercase"
|
||||||
/>
|
/>
|
||||||
<.text_field
|
<.text_field
|
||||||
|
|
@ -109,7 +109,7 @@ defmodule LivebookWeb.SessionLive.SecretsComponent do
|
||||||
autofocus={@prefill_secret_name != nil}
|
autofocus={@prefill_secret_name != nil}
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
phx-debounce="blur"
|
phx-debounce
|
||||||
/>
|
/>
|
||||||
<.radio_field
|
<.radio_field
|
||||||
field={f[:hub_id]}
|
field={f[:hub_id]}
|
||||||
|
|
|
||||||
|
|
@ -283,7 +283,7 @@ defmodule LivebookWeb.Hub.EditLiveTest do
|
||||||
|> render_click(%{})
|
|> render_click(%{})
|
||||||
|
|
||||||
assert_patch(view, ~p"/hub/#{hub.id}/secrets/new")
|
assert_patch(view, ~p"/hub/#{hub.id}/secrets/new")
|
||||||
assert render(view) =~ "Add new secret"
|
assert render(view) =~ "Add secret"
|
||||||
|
|
||||||
view
|
view
|
||||||
|> element("#secrets-form")
|
|> element("#secrets-form")
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue