From ac53d67cd0b89e77b9e387fae8400b22b0c158d3 Mon Sep 17 00:00:00 2001 From: Monkey Do Date: Mon, 6 May 2024 14:47:15 +0200 Subject: [PATCH 01/11] Add error message to error page --- frontend/js/src/error/ErrorBoundary.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/js/src/error/ErrorBoundary.tsx b/frontend/js/src/error/ErrorBoundary.tsx index 65ab0c76c9..0375033968 100644 --- a/frontend/js/src/error/ErrorBoundary.tsx +++ b/frontend/js/src/error/ErrorBoundary.tsx @@ -43,7 +43,8 @@ export function ErrorBoundary() { Error -

Error Occured!

+

An error occured

+

{errorMessage}

); } From 227f629af16dde14b8b2fde98f0bc4f78f26c08b Mon Sep 17 00:00:00 2001 From: Monkey Do Date: Mon, 6 May 2024 14:48:01 +0200 Subject: [PATCH 02/11] Change base template For error pages for example which were not rendered like the rest of our react pages, because it uses a different base template --- listenbrainz/webserver/templates/art/index.html | 2 +- listenbrainz/webserver/templates/errors/base.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/listenbrainz/webserver/templates/art/index.html b/listenbrainz/webserver/templates/art/index.html index ac394d08b1..1b9d2b2c28 100644 --- a/listenbrainz/webserver/templates/art/index.html +++ b/listenbrainz/webserver/templates/art/index.html @@ -1,4 +1,4 @@ -{%- extends 'base.html' -%} +{%- extends 'index.html' -%} {%- block content -%}

ListenBrainz Cover Art Grid demo

Custom layouts

diff --git a/listenbrainz/webserver/templates/errors/base.html b/listenbrainz/webserver/templates/errors/base.html index f85cb845c0..c20739b733 100644 --- a/listenbrainz/webserver/templates/errors/base.html +++ b/listenbrainz/webserver/templates/errors/base.html @@ -1,4 +1,4 @@ -{% extends 'base.html' %} +{% extends 'index.html' %} {% block title %}{% block error_title %}{% endblock %} - ListenBrainz{% endblock %} From 076fffd691489f356ceecbf3c29dbdac8bcf9af1 Mon Sep 17 00:00:00 2001 From: Monkey Do Date: Wed, 8 May 2024 16:47:18 +0200 Subject: [PATCH 03/11] Update base templates add content block so error pages are diplayed properly if rendered from flask --- listenbrainz/webserver/templates/base.html | 7 ++----- listenbrainz/webserver/templates/index.html | 3 +++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/listenbrainz/webserver/templates/base.html b/listenbrainz/webserver/templates/base.html index a70187f600..939c79a40b 100644 --- a/listenbrainz/webserver/templates/base.html +++ b/listenbrainz/webserver/templates/base.html @@ -29,14 +29,11 @@ {% endfor %} {% endwith %} - {%- block wrapper -%} -
- +
{%- block content -%} - + {%- endblock -%}
- {%- endblock -%} {%- block footer -%}