defmodule LivebookWeb.SessionLive.SecretsComponent do use LivebookWeb, :live_component @impl true def update(assigns, socket) do socket = assign(socket, assigns) socket = if socket.assigns[:data] do socket else assign(socket, data: %{"label" => assigns.prefill_secret_label, "value" => ""}) end {:ok, socket} end @impl true def render(assigns) do ~H"""
Enter the secret name and its value.
<.form let={f} for={:data} phx-submit="save" phx-change="validate" autocomplete="off" phx-target={@myself} >