mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-09-04 12:04:20 +08:00
Allow custom error titles
This commit is contained in:
parent
3f1b0b1934
commit
7ca85bd985
1 changed files with 6 additions and 3 deletions
|
@ -15,7 +15,11 @@ defmodule LivebookWeb.ErrorHTML do
|
|||
|
||||
def render("error.html", assigns) do
|
||||
~H"""
|
||||
<.error_page status={@status} title="Something went wrong." details={@details} />
|
||||
<.error_page
|
||||
status={@status}
|
||||
title={assigns[:title] || "Something went wrong."}
|
||||
details={@details}
|
||||
/>
|
||||
"""
|
||||
end
|
||||
|
||||
|
@ -29,14 +33,13 @@ defmodule LivebookWeb.ErrorHTML do
|
|||
~H"""
|
||||
<.error_page
|
||||
status={@status}
|
||||
title="Something went wrong."
|
||||
details="Check out the console for logs for more information."
|
||||
/>
|
||||
"""
|
||||
end
|
||||
|
||||
attr :status, :integer, required: true
|
||||
attr :title, :string, required: true
|
||||
attr :title, :string, default: "Something went wrong."
|
||||
attr :details, :string, default: nil
|
||||
|
||||
def error_page(assigns) do
|
||||
|
|
Loading…
Add table
Reference in a new issue