mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-09-07 21:44:36 +08:00
* Basic filesystem navigation * Add file picker modal * Implement autosave when dirty and show the status * Add hompage link in the session view * Improve file picker and use in both places * Move session list to homepage * Some refactoring * Show import messages if any * Fix and extend tests * Show a message when there are no sessions running * Rename import to fork and make that clear in notebook name * Fix old route * Show info when no file is connected to the given session * Show runtime type next to filename * Show button for joining session when a running path is selected * Move modal components to SessionLive namespace * Add FileGuard to lock files used for notebook persistence * Use radio for specifying persistence type * Don't lock nil path * Simplify FileGuard implementation * Test notebook persistence * Fix typo * Further simplify FileGuard * Improve file listing * Don't show parent dir when there's a basename being typed * Add path component tests
26 lines
656 B
Elixir
26 lines
656 B
Elixir
defmodule LiveBookWeb.Router do
|
|
use LiveBookWeb, :router
|
|
|
|
pipeline :browser do
|
|
plug :accepts, ["html"]
|
|
plug :fetch_session
|
|
plug :fetch_live_flash
|
|
plug :put_root_layout, {LiveBookWeb.LayoutView, :root}
|
|
plug :protect_from_forgery
|
|
plug :put_secure_browser_headers
|
|
end
|
|
|
|
pipeline :api do
|
|
plug :accepts, ["json"]
|
|
end
|
|
|
|
scope "/", LiveBookWeb do
|
|
pipe_through :browser
|
|
|
|
live "/", HomeLive, :page
|
|
live "/sessions/:id", SessionLive, :page
|
|
live "/sessions/:id/file", SessionLive, :file
|
|
live "/sessions/:id/runtime", SessionLive, :runtime
|
|
live "/sessions/:id/shortcuts", SessionLive, :shortcuts
|
|
end
|
|
end
|