mirror of
https://github.com/penpot/penpot.git
synced 2025-06-12 10:41:43 +02:00
Merge pull request #3803 from penpot/niwinz-develop-components-migration-4
🐛 Several bugfixes
This commit is contained in:
commit
83d786743b
13 changed files with 209 additions and 206 deletions
|
@ -920,8 +920,8 @@
|
|||
(rx/tap on-success)
|
||||
(rx/catch on-error))))))
|
||||
|
||||
|
||||
;; --- EVENT: clone-template
|
||||
|
||||
(defn clone-template
|
||||
[{:keys [template-id project-id] :as params}]
|
||||
(dm/assert! (uuid? project-id))
|
||||
|
|
|
@ -298,6 +298,7 @@
|
|||
(rx/map (fn [[file thumbnails team-users comments-users]]
|
||||
(let [bundle (-> bundle
|
||||
(assoc :file file)
|
||||
(assoc :features features)
|
||||
(assoc :thumbnails thumbnails)
|
||||
(assoc :team-users team-users)
|
||||
(assoc :comments-users comments-users))]
|
||||
|
|
|
@ -50,6 +50,13 @@
|
|||
(finally
|
||||
(js/console.groupEnd message))))
|
||||
|
||||
(defn print-cause!
|
||||
[message cause]
|
||||
(print-group! message (fn []
|
||||
(print-data! cause)
|
||||
(print-explain! cause)
|
||||
(print-trace! cause))))
|
||||
|
||||
(defn on-error
|
||||
"A general purpose error handler."
|
||||
[error]
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
[app.main.data.events :as ev]
|
||||
[app.main.data.messages :as msg]
|
||||
[app.main.data.modal :as modal]
|
||||
[app.main.errors :as errors]
|
||||
[app.main.features :as features]
|
||||
[app.main.store :as st]
|
||||
[app.main.ui.components.file-uploader :refer [file-uploader]]
|
||||
|
@ -296,10 +297,10 @@
|
|||
(st/emit! (dd/fetch-recent-files)))
|
||||
|
||||
on-template-cloned-error
|
||||
(fn []
|
||||
(st/emit!
|
||||
(modal/hide)
|
||||
(msg/error (tr "dashboard.libraries-and-templates.import-error"))))
|
||||
(fn [cause]
|
||||
(errors/print-cause! "Template Clone Error" cause)
|
||||
(st/emit! (modal/hide)
|
||||
(msg/error (tr "dashboard.libraries-and-templates.import-error"))))
|
||||
|
||||
continue-files
|
||||
(fn []
|
||||
|
@ -314,7 +315,8 @@
|
|||
|
||||
continue-template
|
||||
(fn []
|
||||
(let [mdata {:on-success on-template-cloned-success :on-error on-template-cloned-error}
|
||||
(let [mdata {:on-success on-template-cloned-success
|
||||
:on-error on-template-cloned-error}
|
||||
params {:project-id project-id :template-id (:id template)}]
|
||||
(swap! state
|
||||
(fn [state]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue