|
|
@@ -13,7 +13,8 @@
|
|
|
[frontend.ui :as ui]
|
|
|
[frontend.util :as util]
|
|
|
[rum.core :as rum]
|
|
|
- [frontend.config :as config]))
|
|
|
+ [frontend.config :as config]
|
|
|
+ [frontend.mobile.util :as mobile-util]))
|
|
|
|
|
|
(rum/defc choose-preferred-format
|
|
|
[]
|
|
|
@@ -88,27 +89,29 @@
|
|
|
[:div.flex.flex-col
|
|
|
[:h1.title "Add a graph"]
|
|
|
(let [nfs-supported? (or (nfs/supported?) (mobile/is-native-platform?))]
|
|
|
- [:div.cp__widgets-open-local-directory
|
|
|
- [:div.select-file-wrap.cursor
|
|
|
- (when nfs-supported?
|
|
|
- {:on-click #(page-handler/ls-dir-files! shortcut/refresh!)})
|
|
|
+ (if (mobile-util/is-native-platform?)
|
|
|
+ (ui/button "Open a local directory"
|
|
|
+ :on-click #(page-handler/ls-dir-files! shortcut/refresh!))
|
|
|
+ [:div.cp__widgets-open-local-directory
|
|
|
+ [:div.select-file-wrap.cursor
|
|
|
+ (when nfs-supported?
|
|
|
+ {:on-click #(page-handler/ls-dir-files! shortcut/refresh!)})
|
|
|
+ [:div
|
|
|
+ [:h1.title "Open a local directory"]
|
|
|
+ [:p "Logseq supports both Markdown and Org-mode. You can open an existing directory or create a new one on your device, a directory is also known simply as a folder. Your data will be stored only on this device."]
|
|
|
+ [:p "After you have opened your directory, it will create three folders in that directory:"]
|
|
|
+ [:ul
|
|
|
+ [:li "/journals - store your journal pages"]
|
|
|
+ [:li "/pages - store the other pages"]
|
|
|
+ [:li "/logseq - store configuration, custom.css, and some metadata."]]
|
|
|
+ (when-not nfs-supported?
|
|
|
+ (ui/admonition :warning
|
|
|
+ [:p "It seems that your browser doesn't support the "
|
|
|
|
|
|
- [:div
|
|
|
- [:h1.title "Open a local directory"]
|
|
|
- [:p "Logseq supports both Markdown and Org-mode. You can open an existing directory or create a new one on your device, a directory is also known simply as a folder. Your data will be stored only on this device."]
|
|
|
- [:p "After you have opened your directory, it will create three folders in that directory:"]
|
|
|
- [:ul
|
|
|
- [:li "/journals - store your journal pages"]
|
|
|
- [:li "/pages - store the other pages"]
|
|
|
- [:li "/logseq - store configuration, custom.css, and some metadata."]]
|
|
|
- (when-not nfs-supported?
|
|
|
- (ui/admonition :warning
|
|
|
- [:p "It seems that your browser doesn't support the "
|
|
|
-
|
|
|
- [:a {:href "https://web.dev/file-system-access/"
|
|
|
- :target "_blank"}
|
|
|
- "new native filesystem API"]
|
|
|
- [:span ", please use any Chromium 86+ based browser like Chrome, Vivaldi, Edge, etc. Notice that the API doesn't support mobile browsers at the moment."]]))]]])]))
|
|
|
+ [:a {:href "https://web.dev/file-system-access/"
|
|
|
+ :target "_blank"}
|
|
|
+ "new native filesystem API"]
|
|
|
+ [:span ", please use any Chromium 86+ based browser like Chrome, Vivaldi, Edge, etc. Notice that the API doesn't support mobile browsers at the moment."]]))]]]))]))
|
|
|
|
|
|
(rum/defcs add-graph <
|
|
|
[state & {:keys [graph-types]
|