defmodule LivebookWeb.SettingsLive do
use LivebookWeb, :live_view
import LivebookWeb.UserHelpers
alias LivebookWeb.{SidebarHelpers, PageHelpers}
@impl true
def mount(_params, _session, socket) do
file_systems = Livebook.Settings.file_systems()
{:ok,
socket
|> SidebarHelpers.shared_home_handlers()
|> assign(
file_systems: file_systems,
autosave_path_state: %{
file: autosave_dir(),
dialog_opened?: false
},
page_title: "Livebook - Settings"
)}
end
@impl true
def render(assigns) do
~H"""
Here you can change global Livebook configuration. Keep in mind
that this configuration gets persisted and will be restored on application
launch.
About
<%= if app_name = Livebook.Config.app_service_name() do %>
<.labeled_text label="Application">
<%= if app_url = Livebook.Config.app_service_url() do %>
<%= app_name %>
<% else %>
<%= app_name %>
<% end %>
<% end %>
<.labeled_text label="Livebook">
v<%= Application.spec(:livebook, :vsn) %>
<.labeled_text label="Elixir">
v<%= System.version() %>
<%= live_redirect to: Routes.live_dashboard_path(@socket, :home),
class: "button-base button-outlined-gray" do %>
<.remix_icon icon="dashboard-2-line" class="align-middle mr-1" />
Open dashboard
<% end %>
Autosave location
A directory to temporarily keep notebooks until they are persisted.