From c9c75070f6bd856c75e3a3d590d129a740776b92 Mon Sep 17 00:00:00 2001 From: Miguel Ángel Moreno Date: Thu, 19 Dec 2024 03:09:00 +0100 Subject: feat: use correct icon for error container based on failure type --- src/frontend/tubo/layout/views.cljs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/frontend/tubo/layout/views.cljs b/src/frontend/tubo/layout/views.cljs index c7c94d7..63e6b84 100644 --- a/src/frontend/tubo/layout/views.cljs +++ b/src/frontend/tubo/layout/views.cljs @@ -255,11 +255,15 @@ (str "show " (if open? "less" "more"))])])}))) (defn error - [{:keys [_failure parse-error status status-text]} cb] + [{:keys [failure parse-error status status-text]} cb] [:div.flex.flex-auto.h-full.items-center.justify-center.p-8 [:div.flex.flex-col.gap-y-8.border-border-neutral-300.rounded.dark:border-neutral-700 [:div.flex.items-center.gap-x-4.text-xl - [:i.fa-solid.fa-circle-exclamation] + (case failure + :success [:i.fa-solid.fa-circle-check] + :error [:i.fa-solid.fa-circle-exclamation] + :loading [:div.grow-0 [loading-icon]] + [:i.fa-solid.fa-circle-info]) [:h3.font-bold (str status " " status-text)]] (when parse-error -- cgit v1.2.3