diff options
author | Miguel Ángel Moreno <mail@migalmoreno.com> | 2024-12-09 00:14:27 +0100 |
---|---|---|
committer | Miguel Ángel Moreno <mail@migalmoreno.com> | 2024-12-09 00:14:27 +0100 |
commit | d954370ea1ba01904f521cb0c8b8b0ea3812b4ab (patch) | |
tree | b228f23aff86033f08d28a8947c7860a90c7320f /src/frontend | |
parent | 32a6101da668e78368111c0aa2074784cb38df38 (diff) |
feat: add loading notification type and refine styles
Diffstat (limited to 'src/frontend')
-rw-r--r-- | src/frontend/tubo/notifications/views.cljs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/frontend/tubo/notifications/views.cljs b/src/frontend/tubo/notifications/views.cljs index e4f8a53..d3202a4 100644 --- a/src/frontend/tubo/notifications/views.cljs +++ b/src/frontend/tubo/notifications/views.cljs @@ -1,11 +1,12 @@ (ns tubo.notifications.views (:require - [re-frame.core :as rf])) + [re-frame.core :as rf] + [tubo.layout.views :as layout])) (defn notification-content [{:keys [failure parse-error status status-text] :as notification}] (when notification - [:div.relative.flex.justify-center.pl-4.pr-8.py-4.rounded.shadow.dark:shadow-neutral-900.shadow-neutral-400 + [:div.relative.flex.justify-center.pl-4.pr-8.py-5.rounded.shadow.dark:shadow-neutral-900.shadow-neutral-400 {:class (case failure :success ["bg-green-600/90" :text-white] :error ["bg-red-600/90" :text-white] @@ -15,13 +16,14 @@ (case failure :success [:i.fa-solid.fa-circle-check] :error [:i.fa-solid.fa-circle-exclamation] + :loading [:div.grow-0 [layout/loading-icon]] [:i.fa-solid.fa-circle-info]) [:div.flex.flex-col - [:button.text-lg.absolute.top-1.right-2 + [:button.absolute.top-1.right-2 {:on-click #(rf/dispatch [:notifications/remove (:id notification)])} [:i.fa-solid.fa-close]] - [:span.font-bold + [:span.font-bold.break-all (str status " " status-text)] (when parse-error [:span.line-clamp-1 |