mirror of
https://github.com/livebook-dev/livebook.git
synced 2024-11-13 03:06:06 +08:00
basic
This commit is contained in:
parent
74caae1da1
commit
e79934931f
5 changed files with 20 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue