diff options
author | Miguel Ángel Moreno <mail@migalmoreno.com> | 2024-12-19 03:09:00 +0100 |
---|---|---|
committer | Miguel Ángel Moreno <mail@migalmoreno.com> | 2024-12-19 03:12:54 +0100 |
commit | c9c75070f6bd856c75e3a3d590d129a740776b92 (patch) | |
tree | 214cf4bb58d82964568227900cd3aa5e16f82819 | |
parent | bc535d072f332736a6fe9e7b47fb608277657e35 (diff) |
feat: use correct icon for error container based on failure type
-rw-r--r-- | src/frontend/tubo/layout/views.cljs | 8 |
1 files 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 |