Render errors in HTML, not with JS.
This commit is contained in:
parent
e27c61218d
commit
b0080fa730
@ -78,7 +78,7 @@ defmodule Pleroma.Web.StaticFE.StaticFEController do
|
|||||||
_ ->
|
_ ->
|
||||||
conn
|
conn
|
||||||
|> put_status(404)
|
|> put_status(404)
|
||||||
|> render_error(:not_found, "Notice not found")
|
|> render("error.html", %{message: "Post not found.", meta: ""})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -108,7 +108,7 @@ defmodule Pleroma.Web.StaticFE.StaticFEController do
|
|||||||
_ ->
|
_ ->
|
||||||
conn
|
conn
|
||||||
|> put_status(404)
|
|> put_status(404)
|
||||||
|> render_error(:not_found, "User not found")
|
|> render("error.html", %{message: "User not found.", meta: ""})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1,minimal-ui" />
|
<meta name="viewport" content="width=device-width,initial-scale=1,minimal-ui" />
|
||||||
<title><%= Pleroma.Config.get([:instance, :name]) %></title>
|
<title><%= Pleroma.Config.get([:instance, :name]) %></title>
|
||||||
<%= Phoenix.HTML.raw(@meta || "") %>
|
<%= Phoenix.HTML.raw(assigns[:meta] || "") %>
|
||||||
<link rel="stylesheet" href="/static/static-fe.css">
|
<link rel="stylesheet" href="/static/static-fe.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
<header>
|
||||||
|
<h1><%= gettext("Oops") %></h1>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<p><%= @message %></p>
|
||||||
|
</main>
|
Loading…
Reference in New Issue
Block a user