From 1a346760461c78da3e932269eec013869a330ffc Mon Sep 17 00:00:00 2001 From: SINF-KEN Date: Wed, 26 Mar 2025 13:37:00 +0100 Subject: [PATCH] UI: Style the crash page and update error page image - Modified the error page - changed the error/crash page Co-authored-by: notnotnescap <97590612+nescapp@users.noreply.github.com> --- Base/res/ladybird/templates/error.html | 10 +++++----- Libraries/LibWebView/ViewImplementation.cpp | 21 +++++++++++++-------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/Base/res/ladybird/templates/error.html b/Base/res/ladybird/templates/error.html index 5bbfc203761..b6947b65e1c 100644 --- a/Base/res/ladybird/templates/error.html +++ b/Base/res/ladybird/templates/error.html @@ -22,7 +22,7 @@ display: flex; flex-direction: column; align-items: center; - gap: 0.5rem; + gap: 2rem; margin-bottom: 1rem; } svg { @@ -30,7 +30,7 @@ width: auto; stroke: currentColor; fill: none; - stroke-width: 2; + stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; } @@ -46,9 +46,9 @@
- - - + + +

Failed to load %failed_url%

diff --git a/Libraries/LibWebView/ViewImplementation.cpp b/Libraries/LibWebView/ViewImplementation.cpp index 6d541dc2583..16095430fde 100644 --- a/Libraries/LibWebView/ViewImplementation.cpp +++ b/Libraries/LibWebView/ViewImplementation.cpp @@ -638,14 +638,19 @@ void ViewImplementation::handle_web_content_process_crash(LoadErrorPage load_err if (load_error_page == LoadErrorPage::Yes) { StringBuilder builder; - builder.append("Crashed: "sv); - builder.append(escape_html_entities(m_url.to_byte_string())); - builder.append(""sv); - builder.append("

Web page crashed"sv); - if (m_url.host().has_value()) { - builder.appendff(" on {}", escape_html_entities(m_url.serialized_host())); - } - builder.append("

"sv); + builder.append(""sv); + builder.append("Error!"sv); + builder.append("
"sv); + builder.append(""sv); + builder.append(""sv); + builder.append(""sv); auto escaped_url = escape_html_entities(m_url.to_byte_string()); builder.appendff("The web page {} has crashed.

You can reload the page to try again.", escaped_url, escaped_url); builder.append(""sv);