Просмотр исходного кода

enhance(mobile): logseq spin style

charlie 8 месяцев назад
Родитель
Сommit
bca69ee047
2 измененных файлов с 6 добавлено и 1 удалено
  1. 1 1
      src/main/capacitor/components/app.cljs
  2. 5 0
      src/main/capacitor/components/ui.cljs

+ 1 - 1
src/main/capacitor/components/app.cljs

@@ -140,7 +140,7 @@
    (if db-restoring?
      (ion/content
       [:strong.flex.justify-center.items-center.py-24
-       (ion/tabler-icon "loader" {:class "animate animate-spin opacity-50" :size 30})])
+       (ui-component/loading)])
      (ion/content {:class "scrolling ion-padding"}
                   (journals)))))
 

+ 5 - 0
src/main/capacitor/components/ui.cljs

@@ -3,6 +3,7 @@
             [cljs-bean.core :as bean]
             [frontend.handler.notification :as notification]
             [frontend.rum :as r]
+            [frontend.ui :as ui]
             [frontend.state :as fstate]
             [medley.core :as medley]
             [react-transition-group :refer [CSSTransition TransitionGroup]]
@@ -192,3 +193,7 @@
                  props' (assoc props :close! close!)]]
        (x-modal props'
                 (if (fn? content) (content props') content)))]))
+
+(rum/defc loading
+  ([] (loading ""))
+  ([content] [:span.opacity-50 (ui/loading content)]))