From 583d611259d146168a15a9690e56038b7f419b1f Mon Sep 17 00:00:00 2001 From: Andelf Date: Tue, 14 Nov 2023 17:16:06 +0800 Subject: [PATCH 1/3] fix(fs): missing mkdir-recur! for nfs and memory-fs --- src/main/frontend/fs/memory_fs.cljs | 10 ++++++++-- src/main/frontend/fs/nfs.cljs | 3 +++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main/frontend/fs/memory_fs.cljs b/src/main/frontend/fs/memory_fs.cljs index 4b6e066d8d..ccab89ec1f 100644 --- a/src/main/frontend/fs/memory_fs.cljs +++ b/src/main/frontend/fs/memory_fs.cljs @@ -53,6 +53,13 @@ (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] + (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)] @@ -82,8 +89,7 @@ _ ( Date: Wed, 15 Nov 2023 13:08:49 +0800 Subject: [PATCH 2/3] fix: send parameters to ui/button :button-props Fixes LOG-2920 --- src/main/frontend/ui.cljs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/frontend/ui.cljs b/src/main/frontend/ui.cljs index 286e8aa890..77203aa476 100644 --- a/src/main/frontend/ui.cljs +++ b/src/main/frontend/ui.cljs @@ -1014,7 +1014,8 @@ (rum/defc button-inner [text & {:keys [background href class intent on-click small? title icon icon-props disabled? button-props] - :or {small? false}}] + :or {small? false} + :as option}] (let [opts {:text text :theme (when (contains? #{"link" "border-link"} intent) :text) :href href @@ -1022,7 +1023,11 @@ :size (if small? :sm :md) :icon icon :icon-props icon-props - :button-props (merge button-props (when title {:title title})) + :button-props (merge + (dissoc option + :background :href :class :intent :small? :large? :title :icon :icon-props :disabled? button-props) + button-props + (when title {:title title})) :class (if (= intent "border-link") (str class " border") class) :muted disabled? :disabled? disabled?}] From fc450f5398f0297695031c2136dcbd399b177579 Mon Sep 17 00:00:00 2001 From: Tienson Qin Date: Wed, 15 Nov 2023 13:42:01 +0800 Subject: [PATCH 3/3] fix: remove title handling --- src/main/frontend/ui.cljs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/frontend/ui.cljs b/src/main/frontend/ui.cljs index 77203aa476..becce87699 100644 --- a/src/main/frontend/ui.cljs +++ b/src/main/frontend/ui.cljs @@ -1013,7 +1013,7 @@ (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}] (let [opts {:text text @@ -1025,9 +1025,8 @@ :icon-props icon-props :button-props (merge (dissoc option - :background :href :class :intent :small? :large? :title :icon :icon-props :disabled? button-props) - button-props - (when title {:title title})) + :background :href :class :intent :small? :large? :icon :icon-props :disabled? button-props) + button-props) :class (if (= intent "border-link") (str class " border") class) :muted disabled? :disabled? disabled?}]