0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-09 08:20:45 -05:00

Merge remote-tracking branch 'origin/staging' into develop

This commit is contained in:
Alejandro Alonso 2024-04-26 12:50:43 +02:00
commit cf62b083fe
4 changed files with 12 additions and 11 deletions

View file

@ -16,6 +16,7 @@
[app.db.sql :as sql] [app.db.sql :as sql]
[app.features.components-v2 :as feat.compv2] [app.features.components-v2 :as feat.compv2]
[app.features.fdata :as fdata] [app.features.fdata :as fdata]
[app.loggers.audit :as audit]
[app.rpc :as-alias rpc] [app.rpc :as-alias rpc]
[app.rpc.commands.files :as files] [app.rpc.commands.files :as files]
[app.rpc.commands.files-create :as files.create] [app.rpc.commands.files-create :as files.create]
@ -23,6 +24,7 @@
[app.rpc.commands.projects :as projects] [app.rpc.commands.projects :as projects]
[app.rpc.commands.teams :as teams] [app.rpc.commands.teams :as teams]
[app.rpc.doc :as-alias doc] [app.rpc.doc :as-alias doc]
[app.rpc.helpers :as rph]
[app.util.blob :as blob] [app.util.blob :as blob]
[app.util.pointer-map :as pmap] [app.util.pointer-map :as pmap]
[app.util.services :as sv] [app.util.services :as sv]
@ -100,7 +102,9 @@
:revn revn :revn revn
:data nil :data nil
:changes (blob/encode changes)}) :changes (blob/encode changes)})
nil))) (rph/with-meta (rph/wrap nil)
{::audit/replace-props {:file-id id
:revn revn}}))))
;; --- MUTATION COMMAND: persist-temp-file ;; --- MUTATION COMMAND: persist-temp-file

View file

@ -144,18 +144,12 @@
(map-indexed vector) (map-indexed vector)
(filter #(#{(:id group)} (second %))) (filter #(#{(:id group)} (second %)))
(ffirst) (ffirst)
inc) inc)]
;; Shapes that are in a component (including root) must be detached,
;; because cannot be easyly synchronized back to the main component.
shapes-to-detach (filter ctk/in-component-copy?
(cfh/get-children-with-self objects (:id group)))]
(-> (pcb/empty-changes it page-id) (-> (pcb/empty-changes it page-id)
(pcb/with-objects objects) (pcb/with-objects objects)
(pcb/change-parent parent-id children index-in-parent) (pcb/change-parent parent-id children index-in-parent)
(pcb/remove-objects [(:id group)]) (pcb/remove-objects [(:id group)]))))
(pcb/update-shapes (map :id shapes-to-detach) ctk/detach-shape))))
(defn remove-frame-changes (defn remove-frame-changes
[it page-id frame objects] [it page-id frame objects]

View file

@ -133,7 +133,10 @@
(defn- fetch-gfont-css (defn- fetch-gfont-css
[url] [url]
(->> (http/send! {:method :get :uri url :mode :cors :response-type :text}) (->> (http/send! {:method :get :uri url :mode :cors :response-type :text})
(rx/map :body))) (rx/map :body)
(rx/catch (fn [err]
(.warn js/console "Cannot find the font" (obj/get err "message"))
(rx/empty)))))
(defmethod load-font :google (defmethod load-font :google
[{:keys [id ::on-loaded] :as font}] [{:keys [id ::on-loaded] :as font}]

View file

@ -332,7 +332,7 @@
:title (tr "viewer.header.comments-section" (sc/get-tooltip :open-comments))} :title (tr "viewer.header.comments-section" (sc/get-tooltip :open-comments))}
i/comments]) i/comments])
(when (or (= (:type permissions) :membership) (when (or (:in-team permissions)
(and (= (:type permissions) :share-link) (and (= (:type permissions) :share-link)
(= (:who-inspect permissions) "all"))) (= (:who-inspect permissions) "all")))
[:button {:on-click go-to-inspect [:button {:on-click go-to-inspect