diff --git a/lib/livebook_web/controllers/auth_controller.ex b/lib/livebook_web/controllers/auth_controller.ex index 13521daaa..38c9bc9b4 100644 --- a/lib/livebook_web/controllers/auth_controller.ex +++ b/lib/livebook_web/controllers/auth_controller.ex @@ -14,9 +14,7 @@ defmodule LivebookWeb.AuthController do end def index(conn, _params) do - conn - |> put_view(LivebookWeb.ErrorView) - |> render("401.html") + render(conn, "index.html") end def authenticate(conn, %{"password" => password}) do diff --git a/lib/livebook_web/templates/auth/index.html.eex b/lib/livebook_web/templates/auth/index.html.eex new file mode 100644 index 000000000..aa60d9e03 --- /dev/null +++ b/lib/livebook_web/templates/auth/index.html.eex @@ -0,0 +1,23 @@ +
+
+ + livebook + +
+ Authentication required +
+ +
+ Type password to access the Livebook. +
+
+
+ + + +
+
+
+
diff --git a/lib/livebook_web/templates/error/401.html.eex b/lib/livebook_web/templates/error/401.html.eex index 1ad0b3a60..ab66d90c9 100644 --- a/lib/livebook_web/templates/error/401.html.eex +++ b/lib/livebook_web/templates/error/401.html.eex @@ -4,8 +4,8 @@ - <%= live_title_tag "Livebook" %> - "/> + <%= @status %> - Livebook + "/>
@@ -17,36 +17,19 @@ Authentication required
- <%= case Application.fetch_env!(:livebook, :authentication_mode) do %> - <% :token -> %> -
- Please check out the console for authentication URL - or type the token directly here. -
+
+ Please check out the console for authentication URL + or type the token directly here. +
-
-
- - -
-
- - <% :password -> %> -
- Type password to access the Livebook. -
-
-
- - - -
-
- <% end %> +
+
+ + +
+
diff --git a/lib/livebook_web/templates/error/404.html.eex b/lib/livebook_web/templates/error/404.html.eex index 114a8e116..c42743caa 100644 --- a/lib/livebook_web/templates/error/404.html.eex +++ b/lib/livebook_web/templates/error/404.html.eex @@ -4,8 +4,8 @@ - <%= live_title_tag "Livebook" %> - "/> + <%= @status %> - Livebook + "/>
diff --git a/lib/livebook_web/templates/error/500.html.eex b/lib/livebook_web/templates/error/500.html.eex index 70825812b..125c453dd 100644 --- a/lib/livebook_web/templates/error/500.html.eex +++ b/lib/livebook_web/templates/error/500.html.eex @@ -4,8 +4,8 @@ - <%= live_title_tag "Livebook" %> - "/> + <%= @status %> - Livebook + "/>
diff --git a/lib/livebook_web/templates/layout/app.html.eex b/lib/livebook_web/templates/layout/app.html.eex deleted file mode 100644 index 05433985b..000000000 --- a/lib/livebook_web/templates/layout/app.html.eex +++ /dev/null @@ -1 +0,0 @@ -<%= @inner_content %> diff --git a/lib/livebook_web/templates/layout/app.html.leex b/lib/livebook_web/templates/layout/app.html.leex new file mode 100644 index 000000000..f3985a1e8 --- /dev/null +++ b/lib/livebook_web/templates/layout/app.html.leex @@ -0,0 +1 @@ +<%= @inner_content %> \ No newline at end of file diff --git a/lib/livebook_web/views/auth_view.ex b/lib/livebook_web/views/auth_view.ex new file mode 100644 index 000000000..aecfacf01 --- /dev/null +++ b/lib/livebook_web/views/auth_view.ex @@ -0,0 +1,3 @@ +defmodule LivebookWeb.AuthView do + use LivebookWeb, :view +end