diff --git a/common/src/app/common/geom/shapes/bounds.cljc b/common/src/app/common/geom/shapes/bounds.cljc index bb14ea345..c60840d7a 100644 --- a/common/src/app/common/geom/shapes/bounds.cljc +++ b/common/src/app/common/geom/shapes/bounds.cljc @@ -111,6 +111,7 @@ shadow-width (->> (:shadow shape) + (remove :hidden) (map #(case (:style % :drop-shadow) :drop-shadow (+ (mth/abs (:offset-x %)) (* (:spread %) 2) (* (:blur %) 2) 10) 0)) @@ -118,6 +119,7 @@ shadow-height (->> (:shadow shape) + (remove :hidden) (map #(case (:style % :drop-shadow) :drop-shadow (+ (mth/abs (:offset-y %)) (* (:spread %) 2) (* (:blur %) 2) 10) 0)) diff --git a/frontend/src/app/main/data/exports.cljs b/frontend/src/app/main/data/exports.cljs index 675f1d4d9..23eb50956 100644 --- a/frontend/src/app/main/data/exports.cljs +++ b/frontend/src/app/main/data/exports.cljs @@ -10,6 +10,7 @@ [app.main.data.modal :as modal] [app.main.data.workspace.persistence :as dwp] [app.main.data.workspace.state-helpers :as wsh] + [app.main.refs :as refs] [app.main.repo :as rp] [app.main.store :as st] [app.util.dom :as dom] @@ -166,6 +167,13 @@ :wait true}] (rx/concat (rx/of ::dwp/force-persist) + + ;; Wait the persist to be succesfull + (->> (rx/from-atom refs/persistence-state {:emit-current-value? true}) + (rx/filter #(or (nil? %) (= :saved %))) + (rx/first) + (rx/timeout 400 (rx/empty))) + (->> (rp/cmd! :export params) (rx/mapcat (fn [{:keys [id filename]}] (->> (rp/cmd! :export {:cmd :get-resource :blob? true :id id}) diff --git a/frontend/src/app/main/refs.cljs b/frontend/src/app/main/refs.cljs index 1a63a5032..434bca57e 100644 --- a/frontend/src/app/main/refs.cljs +++ b/frontend/src/app/main/refs.cljs @@ -591,3 +591,6 @@ (def updating-library (l/derived :updating-library st/state)) + +(def persistence-state + (l/derived (comp :status :workspace-persistence) st/state)) diff --git a/frontend/src/app/main/ui/components/copy_button.scss b/frontend/src/app/main/ui/components/copy_button.scss index 1e07f6455..c81487f45 100644 --- a/frontend/src/app/main/ui/components/copy_button.scss +++ b/frontend/src/app/main/ui/components/copy_button.scss @@ -57,6 +57,7 @@ width: 100%; height: fit-content; text-align: left; + border: 1px solid transparent; .icon-btn { position: absolute; display: flex;