defmodule LivebookWeb.SessionLive.SettingsComponent do use LivebookWeb, :live_component @impl true def render(assigns) do ~L"""

Notebook settings

<%= live_patch to: Routes.session_path(@socket, :settings, @session_id, "file"), class: "tab #{if(@tab == "file", do: "active")}" do %> <%= remix_icon("file-settings-line", class: "align-middle") %> File <% end %> <%= live_patch to: Routes.session_path(@socket, :settings, @session_id, "runtime"), class: "tab #{if(@tab == "runtime", do: "active")}" do %> <%= remix_icon("play-circle-line", class: "align-middle") %> Runtime <% end %>
<%= if @tab == "file" do %> <%= live_component @socket, LivebookWeb.SessionLive.PersistenceComponent, id: :persistence, session_id: @session_id, current_path: @data.path, path: @data.path %> <% end %> <%= if @tab == "runtime" do %> <%= live_component @socket, LivebookWeb.SessionLive.RuntimeComponent, id: :runtime, session_id: @session_id, runtime: @data.runtime %> <% end %>
""" end end