fix: select directory

This commit is contained in:
Tienson Qin
2022-11-07 21:46:24 +08:00
parent bdd31bd7bb
commit 6534f34236
3 changed files with 25 additions and 52 deletions

View File

@@ -43,15 +43,9 @@
[]
[:div.mobile-intro
(cond
(mobile-util/native-ios?)
[:div
[:ul
[:li "Save them in " [:span.font-bold "iCloud Drive's Logseq directory"] ", and sync them across devices using iCloud."]
[:li "Save them in Logseq's directory of your device's local storage."]]]
(mobile-util/native-android?)
[:div
"You can save them in your local storage, and use any third-party sync service to keep your notes sync with other devices. "
"You can save them in your local storage, and use Logseq Sync or any third-party sync service to keep your notes sync with other devices. "
"If you prefer to use Dropbox to sync your notes, you can use "
[:a {:href "https://play.google.com/store/apps/details?id=com.ttxapps.dropsync"
:target "_blank"}
@@ -75,12 +69,10 @@
(setups-container
:picker
[:article.flex
[:section.a
[:strong "Lets get you set up."]
[:small (str "Where on your " DEVICE " do you want to save your work?")
(when (and (mobile-util/native-platform?) (not native-ios?))
(mobile-intro))]
[:article.flex.w-full
[:section.a.
(when (and (mobile-util/native-platform?) (not native-ios?))
(mobile-intro))
(if native-ios?
;; TODO: open for all native mobile platforms

View File

@@ -6,7 +6,8 @@
[frontend.ui :as ui]
[rum.core :as rum]
[frontend.config :as config]
[frontend.mobile.util :as mobile-util]))
[frontend.mobile.util :as mobile-util]
[frontend.state :as state]))
(rum/defc add-local-directory
[]
@@ -16,33 +17,14 @@
(if (mobile-util/native-platform?)
[:div.text-sm
(ui/button "Open a local directory"
:on-click #(page-handler/ls-dir-files! shortcut/refresh!))
:on-click #(state/pub-event! [:graph/setup-a-repo]))
[:hr]
[:ol
[:li
[:div.font-bold.mb-2 "How to sync my notes?"]
(if (mobile-util/native-android?)
[:div
[:p "We're developing our built-in paid Logseq Sync, but you can use any third-party sync service to keep your notes sync with other devices."]
[:p "If you prefer to use Dropbox to sync your notes, you can use "
[:a {:href "https://play.google.com/store/apps/details?id=com.ttxapps.dropsync"
:target "_blank"}
"Dropsync"]
". Or you can use "
[:a {:href "https://play.google.com/store/apps/details?id=dk.tacit.android.foldersync.lite"
:target "_blank"}
"FolderSync"]
"."]]
[:div
[:p "You can sync your graphs by using iCloud. Please choose an existing graph or create a new graph in your iCloud Drive's Logseq directory."]
[:p "We're developing our built-in paid Logseq Sync. Stay tuned."]])]
[:li.mt-8
[:div.font-bold.mb-2 "I need some help"]
[:p "👋 Join our Forum to chat with the makers and our helpful community members."]
(ui/button "Join the community"
:href "https://discuss.logseq.com"
:target "_blank")]]]
[:div
[:div.font-bold.mb-2 "I need some help"]
[:p "👋 Join our Forum to chat with the makers and our helpful community members."]
(ui/button "Join the community"
:href "https://discuss.logseq.com"
:target "_blank")]]
[:div.cp__widgets-open-local-directory
[:div.select-file-wrap.cursor
(when nfs-supported?

View File

@@ -21,15 +21,14 @@
(rum/defc toggle-item
[{:keys [on? title on-toggle]}]
(ui/button
[:span.flex.items-center.justify-between.w-full.py-1
[:strong title]
(ui/icon (if on? "toggle-right" "toggle-left"))]
:class (str "toggle-item " (when on? "is-on"))
:intent "logseq"
:on-mouse-down #(util/stop %)
:on-click #(when (fn? on-toggle)
(on-toggle (not on?)))))
[:span.flex.items-center.justify-between.w-full.py-1
[:strong title]
(ui/toggle on? (fn []) true)]
:class (str "toggle-item " (when on? "is-on"))
:intent "logseq"
:on-mouse-down #(util/stop %)
:on-click #(when (fn? on-toggle)
(on-toggle (not on?)))))
(rum/defc ^:large-vars/cleanup-todo graph-picker-cp
[{:keys [onboarding-and-home? logged? native-icloud?] :as opts}]
@@ -91,7 +90,7 @@
(case step
;; step 0
:init
[:div.flex.flex-col.w-full.space-y-3
[:div.flex.flex-col.w-full.space-y-6
(ui/button
[:span.flex.items-center.justify-between.w-full.py-1
[:strong "Create a new graph"]
@@ -139,8 +138,8 @@
[:div.flex.justify-between.items-center.pt-2
(ui/button [:span.flex.items-center
(ui/icon "chevron-left" {:size 18}) "Back"]
:intent "logseq"
:on-click #(set-step! :init))
:intent "logseq"
:on-click #(set-step! :init))
(ui/button "Create"
:on-click