aboutsummaryrefslogtreecommitdiff
path: root/src/frontend
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend')
-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
[]