From c6409c77a4520d8ad97d24862591f52091617e39 Mon Sep 17 00:00:00 2001 From: broquemonsieur Date: Fri, 9 Aug 2024 03:20:02 -0700 Subject: [PATCH] Initial commit --- assets/404_tv_box_dark_theme.svg | 1261 ++++++++++++++++++++++++++++++ src/invidious/helpers/errors.cr | 5 +- src/invidious/views/error.ecr | 2 +- 3 files changed, 1265 insertions(+), 3 deletions(-) create mode 100644 assets/404_tv_box_dark_theme.svg diff --git a/assets/404_tv_box_dark_theme.svg b/assets/404_tv_box_dark_theme.svg new file mode 100644 index 00000000..6217ccd3 --- /dev/null +++ b/assets/404_tv_box_dark_theme.svg @@ -0,0 +1,1261 @@ + + + + + + Layer 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/invidious/helpers/errors.cr b/src/invidious/helpers/errors.cr index 21b789bc..acabb1f2 100644 --- a/src/invidious/helpers/errors.cr +++ b/src/invidious/helpers/errors.cr @@ -74,7 +74,8 @@ def error_template_helper(env : HTTP::Server::Context, status_code : Int32, exce # Don't show the usual "next steps" widget. The same options are # proposed above the error message, just worded differently. next_steps = "" - + unfound_tv_box_dark_theme = File.read("assets/404_tv_box_dark_theme.svg") + return templated "error" end @@ -84,7 +85,7 @@ def error_template_helper(env : HTTP::Server::Context, status_code : Int32, mess locale = env.get("preferences").as(Preferences).locale - error_message = translate(locale, message) + unfound_tv_box_dark_theme = File.read("assets/404_tv_box_dark_theme.svg") next_steps = error_redirect_helper(env) return templated "error" diff --git a/src/invidious/views/error.ecr b/src/invidious/views/error.ecr index 04eb74d5..80305be0 100644 --- a/src/invidious/views/error.ecr +++ b/src/invidious/views/error.ecr @@ -3,6 +3,6 @@ <% end %>
- <%= error_message %> + <%= unfound_tv_box_dark_theme %> <%= next_steps %>