Merge branch 'master' into feat/db

This commit is contained in:
Tienson Qin
2023-11-15 20:16:40 +08:00
2 changed files with 8 additions and 7 deletions

View File

@@ -3,7 +3,6 @@
Paths are denoted by `memory://`. No open-dir/get-files support."
(:require [cljs-bean.core :as bean]
[frontend.db :as db]
[frontend.fs.protocol :as protocol]
[logseq.common.path :as path]
[promesa.core :as p]))
@@ -52,10 +51,12 @@
(let [fpath (path/url-to-path dir)]
(-> (js/window.pfs.mkdir fpath)
(p/catch (fn [error] (println "(memory-fs)Mkdir error: " error)))))))
(mkdir-recur! [this dir]
(p/let [parent (path/parent dir)
_ (when parent (<ensure-dir! parent))]
(protocol/mkdir! this dir)))
(mkdir-recur! [_this dir]
(when js/window.pfs
(let [fpath (path/url-to-path dir)]
(-> (js/window.pfs.mkdir fpath #js {:recursive true})
(p/catch (fn [error] (println "(memory-fs)Mkdir-recur error: " error)))))))
(readdir [_this dir]
(when js/window.pfs
(let [fpath (path/url-to-path dir)]

View File

@@ -1026,9 +1026,9 @@
(def icon shui/icon)
(rum/defc button-inner
[text & {:keys [background href class intent on-click small? title icon icon-props disabled? button-props]
[text & {:keys [background href class intent on-click small? icon icon-props disabled? button-props]
:or {small? false}
:as option}]
:as option}]
(let [opts {:text text
:theme (when (contains? #{"link" "border-link"} intent) :text)
:href href