enhance(mobile): onboarding graph picker for non-login user

This commit is contained in:
charlie
2022-11-06 15:27:01 +08:00
committed by Tienson Qin
parent 854f8377d6
commit bd3116c3aa
6 changed files with 88 additions and 41 deletions

View File

@@ -763,11 +763,14 @@
false))
(defmethod handle :graph/setup-a-repo [[_ opts]]
(if (mobile-util/native-ios?)
(do (state/set-modal!
#(graph-picker/graph-picker-cp {})
{:label "graph-setup"}))
(page-handler/ls-dir-files! st/refresh! opts)))
(let [opts' (merge {:picked-root-fn #(state/close-modal!)
:native-icloud? (not (string/blank? (state/get-icloud-container-root-url)))
:logged? (user-handler/logged-in?)} opts)]
(if (mobile-util/native-ios?)
(do (state/set-modal!
#(graph-picker/graph-picker-cp opts')
{:label "graph-setup"}))
(page-handler/ls-dir-files! st/refresh! opts'))))
(defmethod handle :file/alter [[_ repo path content]]
(p/let [_ (file-handler/alter-file repo path content {:from-disk? true})]