From b714b0c69a92fe923e092d0bab55242a386edf40 Mon Sep 17 00:00:00 2001 From: Nicolas Perriault Date: Wed, 8 Jan 2025 15:14:39 +0100 Subject: [PATCH] refactor: use warning instead of blocking error --- src/Views/Alert.elm | 7 +++++++ src/Views/Page.elm | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Views/Alert.elm b/src/Views/Alert.elm index cd028cf12..4c356f3ce 100644 --- a/src/Views/Alert.elm +++ b/src/Views/Alert.elm @@ -26,6 +26,7 @@ type Level = Danger | Info | Success + | Warning icon : Level -> Html msg @@ -40,6 +41,9 @@ icon level = Success -> span [ class "me-1" ] [ Icon.checkCircle ] + Warning -> + span [ class "me-1" ] [ Icon.warning ] + httpError : Http.Error -> Html msg httpError error = @@ -125,3 +129,6 @@ levelToClass level = Success -> "success" + + Warning -> + "warning" diff --git a/src/Views/Page.elm b/src/Views/Page.elm index 41629718c..2982159e6 100644 --- a/src/Views/Page.elm +++ b/src/Views/Page.elm @@ -460,7 +460,7 @@ notificationView { closeNotification } notification = Session.StoreDecodingError decodeError -> Alert.simple - { level = Alert.Danger + { level = Alert.Warning , title = Just "Erreur de récupération de session" , close = Nothing , content =