|
|
@@ -1,6 +1,5 @@
|
|
|
(ns capacitor.components.settings
|
|
|
(:require [capacitor.ionic :as ion]
|
|
|
- [capacitor.state :as state]
|
|
|
[frontend.components.repo :as repo]
|
|
|
[frontend.components.user.login :as login]
|
|
|
[frontend.handler.user :as user-handler]
|
|
|
@@ -8,25 +7,6 @@
|
|
|
[logseq.shui.ui :as shui]
|
|
|
[rum.core :as rum]))
|
|
|
|
|
|
-(comment
|
|
|
- (rum/defc all-graphs < rum/reactive
|
|
|
- []
|
|
|
- (let [graphs (fstate/sub :rtc/graphs)]
|
|
|
- [:div.py-4
|
|
|
- [:div.flex.justify-between.items-center
|
|
|
- [:h2.text-xl.font-medium.my-3.flex.gap-2.items-center.opacity-80
|
|
|
- (shui/tabler-icon "server" {:size 22}) "Your RTC graphs"]
|
|
|
-
|
|
|
- (ion/button
|
|
|
- {:mode "ios" :size "small" :color "secondary"
|
|
|
- :on-click (fn [] (rtc-handler/<get-remote-graphs))} "refresh")]
|
|
|
-
|
|
|
- [:ul
|
|
|
- (for [{:keys [url GraphName GraphSchemaVersion]} graphs]
|
|
|
- [:li
|
|
|
- [:p.inline-flex.items-center.gap-1
|
|
|
- [:a.text-lg.mr-2 GraphName]] [:code "ver." GraphSchemaVersion]])]])))
|
|
|
-
|
|
|
(rum/defc user-profile < rum/reactive
|
|
|
[]
|
|
|
(let [login? (and (fstate/sub :auth/id-token) (user-handler/logged-in?))]
|
|
|
@@ -48,27 +28,22 @@
|
|
|
|
|
|
(rum/defc page
|
|
|
[]
|
|
|
- (let [[^js nav] (state/use-nav-root)]
|
|
|
- (ion/page
|
|
|
- (ion/header
|
|
|
- (ion/toolbar
|
|
|
- (ion/title "Settings")
|
|
|
- (ion/buttons {:slot "end"}
|
|
|
- (ion/button {:fill "clear"
|
|
|
- :on-click #(.pop nav)}
|
|
|
- (ion/tabler-icon "help" {:size 26})))))
|
|
|
+ (ion/page
|
|
|
+ (ion/header
|
|
|
+ (ion/toolbar
|
|
|
+ (ion/title "Settings")))
|
|
|
|
|
|
- (ion/content {:class "ion-padding"}
|
|
|
- (ion/refresher
|
|
|
- {:slot "fixed"
|
|
|
- :pull-factor 0.5
|
|
|
- :pull-min 100
|
|
|
- :pull-max 200
|
|
|
- :on-ion-refresh (fn [^js e]
|
|
|
- (js/setTimeout
|
|
|
- #(.complete (.-detail e))
|
|
|
- 3000))}
|
|
|
- (ion/refresher-content))
|
|
|
- (user-profile)
|
|
|
- [:div.mt-8
|
|
|
- (repo/repos-cp)]))))
|
|
|
+ (ion/content {:class "ion-padding"}
|
|
|
+ (ion/refresher
|
|
|
+ {:slot "fixed"
|
|
|
+ :pull-factor 0.5
|
|
|
+ :pull-min 100
|
|
|
+ :pull-max 200
|
|
|
+ :on-ion-refresh (fn [^js e]
|
|
|
+ (js/setTimeout
|
|
|
+ #(.complete (.-detail e))
|
|
|
+ 3000))}
|
|
|
+ (ion/refresher-content))
|
|
|
+ (user-profile)
|
|
|
+ [:div.mt-8
|
|
|
+ (repo/repos-cp)])))
|