From d18185f49e2f32540225dda8e41e6a754c1a5d43 Mon Sep 17 00:00:00 2001 From: Thomas Rupprecht Date: Tue, 17 Jan 2023 15:05:47 +0100 Subject: [PATCH] Improve alerts and conversation (#1062) * add role="alert" * improve conversation styling * replace alert with card for conversation --- includes/helper/message_helper.php | 2 +- resources/assets/themes/base.scss | 8 ++++---- resources/views/errors/419.twig | 2 +- resources/views/errors/default.twig | 2 +- resources/views/macros/base.twig | 2 +- resources/views/pages/messages/conversation.twig | 14 ++++++++------ 6 files changed, 16 insertions(+), 14 deletions(-) diff --git a/includes/helper/message_helper.php b/includes/helper/message_helper.php index e4058b0b..52c63eb3 100644 --- a/includes/helper/message_helper.php +++ b/includes/helper/message_helper.php @@ -100,7 +100,7 @@ function alert($class, $msg, $immediately = false) } if ($immediately) { - return '
' . $msg . '
'; + return ''; } $session = session(); diff --git a/resources/assets/themes/base.scss b/resources/assets/themes/base.scss index c94d7c09..d0d6963f 100644 --- a/resources/assets/themes/base.scss +++ b/resources/assets/themes/base.scss @@ -357,14 +357,14 @@ code { } .conversation { + align-content: flex-start; height: 55vh; overflow-x: hidden; overflow-y: auto; -} -.message { - max-width: 75%; - display: inline-block; + .alert { + max-width: 75%; + } } /* Hide the arrow up/down buttons rendered by the browser in the input field */ diff --git a/resources/views/errors/419.twig b/resources/views/errors/419.twig index dcfec022..a9545af2 100644 --- a/resources/views/errors/419.twig +++ b/resources/views/errors/419.twig @@ -3,5 +3,5 @@ {% block title %}{{ __("Authentication expired") }}{% endblock %} {% block content %} -
{{ __("The provided CSRF token is invalid or has expired") }}
+ {% endblock %} diff --git a/resources/views/errors/default.twig b/resources/views/errors/default.twig index 30960b7e..e3c76d15 100644 --- a/resources/views/errors/default.twig +++ b/resources/views/errors/default.twig @@ -5,7 +5,7 @@ {% block content %}
{% block content_container %} -
+