aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel Ángel Moreno <mail@migalmoreno.com>2024-06-04 13:47:28 +0200
committerMiguel Ángel Moreno <mail@migalmoreno.com>2024-06-04 13:47:28 +0200
commitb39b04606b15314f7a84af33782013a6edd04d99 (patch)
treef8597f6c9318a5d4eddde94e4d2f8dd59ca60f17
parent105fc23d91bc0e7997ee211432ac15b827ed592a (diff)
feat: refine notification ontent appearance
-rw-r--r--src/frontend/tubo/notifications/views.cljs28
1 files changed, 17 insertions, 11 deletions
diff --git a/src/frontend/tubo/notifications/views.cljs b/src/frontend/tubo/notifications/views.cljs
index facc2fc..e886a82 100644
--- a/src/frontend/tubo/notifications/views.cljs
+++ b/src/frontend/tubo/notifications/views.cljs
@@ -5,18 +5,24 @@
(defn notification-content
[{:keys [failure parse-error status status-text] :as notification}]
(when notification
- [:div.relative.flex.flex-col.justify-center.pl-4.pr-8.py-4.rounded.backdrop-blur.shadow.shadow-neutral-700
+ [:div.relative.flex.justify-center.pl-4.pr-8.py-4.rounded.backdrop-blur.shadow.dark:shadow-neutral-900.shadow-neutral-700
{:class (case failure
- :success ["bg-green-600/90" "text-white"]
- :error ["bg-red-600/90" "text-white"]
- ["bg-neutral-300"])}
- [:button.text-lg.absolute.top-1.right-2
- {:on-click
- #(rf/dispatch [:notifications/remove (:id notification)])}
- [:i.fa-solid.fa-close]]
- [:span.font-bold (str (when status (str status ": ")) status-text)]
- (when parse-error
- [:span.line-clamp-1 (:status-text parse-error)])]))
+ :success ["bg-green-600/90" :text-white]
+ :error ["bg-red-600/90" :text-white]
+ ["dark:bg-stone-800" "dark:text-white" :bg-neutral-300 :text-neutral-800])}
+ [:div.flex.items-center.gap-x-4
+ (case failure
+ :success [:i.fa-solid.fa-circle-check]
+ :error [:i.fa-solid.fa-circle-exclamation]
+ [:i.fa-solid.fa-circle-info])
+ [:div.flex.flex-col
+ [:button.text-lg.absolute.top-1.right-2
+ {:on-click
+ #(rf/dispatch [:notifications/remove (:id notification)])}
+ [:i.fa-solid.fa-close]]
+ [:span.font-bold (str (when status (str status ": ")) status-text)]
+ (when parse-error
+ [:span.line-clamp-1 (:status-text parse-error)])]]]))
(defn notifications-panel
[]