This commit is contained in:
Wojtek Mach 2023-06-20 13:13:05 +02:00
parent 74caae1da1
commit e79934931f
5 changed files with 20 additions and 1 deletions

View file

@ -24,7 +24,7 @@ cp $target_dir/$app_name $app_dir/Contents/MacOS/$app_name
if [ -d Resources ]; then
for i in Resources/*; do
cp $i $app_dir/Contents/Resources/
cp -r $i $app_dir/Contents/Resources/
done
fi

View file

@ -314,6 +314,10 @@ defmodule Livebook.Utils do
LivebookWeb.Endpoint.access_url()
end
def expand_desktop_url("/new") do
to_string(%{LivebookWeb.Endpoint.access_struct_url() | path: "/new"})
end
def expand_desktop_url("/settings") do
to_string(%{LivebookWeb.Endpoint.access_struct_url() | path: "/settings"})
end

View file

@ -262,6 +262,11 @@ defmodule LivebookWeb.HomeLive do
{:noreply, assign(socket, bulk_action: action)}
end
def handle_params(_params, _url, socket)
when socket.assigns.live_action == :new_session do
{:noreply, create_session(socket)}
end
def handle_params(_params, _url, socket), do: {:noreply, socket}
@impl true

View file

@ -60,6 +60,7 @@ defmodule LivebookWeb.Router do
pipe_through [:browser, :auth]
live "/", HomeLive, :page
live "/new", HomeLive, :new_session
live "/home/sessions/:session_id/close", HomeLive, :close_session
live "/home/sessions/edit_sessions/:action", HomeLive, :edit_sessions

View file

@ -8,3 +8,12 @@ export ELIXIRKIT_PROJECT_DIR=$PWD/../../..
export ELIXIRKIT_RELEASE_NAME=app
. ../../../elixirkit/elixirkit_swift/Scripts/build_macos_app.sh
/Applications/Xcode.app/Contents/Developer/usr/bin/appintentsmetadataprocessor \
--toolchain-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain \
--sdk-root `xcrun --show-sdk-path` \
--target-triple `uname -m`-apple-macos \
--output .build/Livebook.app/Contents/Resources \
--module-name Livebook \
--source-files Sources/Livebook/Livebook.swift \
--binary-file .build/Livebook.app/Contents/MacOS/Livebook