mirror of
https://github.com/penpot/penpot.git
synced 2025-05-28 05:46:11 +02:00
Merge remote-tracking branch 'origin/staging' into develop
This commit is contained in:
commit
40fe6369cb
15 changed files with 174 additions and 77 deletions
|
@ -579,8 +579,13 @@
|
|||
ldata (dsh/lookup-file-data state library-id)
|
||||
|
||||
changes (-> (pcb/empty-changes it)
|
||||
(cll/generate-restore-component ldata component-id library-id page objects))]
|
||||
(rx/of (dch/commit-changes changes))))))
|
||||
(cll/generate-restore-component ldata component-id library-id page objects))
|
||||
|
||||
frames
|
||||
(->> changes :redo-changes (keep :frame-id))]
|
||||
|
||||
(rx/of (dch/commit-changes changes)
|
||||
(ptk/data-event :layout/update {:ids frames}))))))
|
||||
|
||||
|
||||
(defn restore-components
|
||||
|
|
|
@ -89,14 +89,16 @@
|
|||
|
||||
(mf/with-effect [file-id revn visible? thumbnail-id]
|
||||
(when (and visible? (not thumbnail-id))
|
||||
(->> (ask-for-thumbnail file-id revn)
|
||||
(rx/subs! (fn [thumbnail-id]
|
||||
(st/emit! (dd/set-file-thumbnail file-id thumbnail-id)))
|
||||
(fn [cause]
|
||||
(log/error :hint "unable to render thumbnail"
|
||||
:file-if file-id
|
||||
:revn revn
|
||||
:message (ex-message cause)))))))
|
||||
(let [subscription
|
||||
(->> (ask-for-thumbnail file-id revn)
|
||||
(rx/subs! (fn [thumbnail-id]
|
||||
(st/emit! (dd/set-file-thumbnail file-id thumbnail-id)))
|
||||
(fn [cause]
|
||||
(log/error :hint "unable to render thumbnail"
|
||||
:file-if file-id
|
||||
:revn revn
|
||||
:message (ex-message cause)))))]
|
||||
(partial rx/dispose! subscription))))
|
||||
|
||||
[:div {:class (stl/css :grid-item-th)
|
||||
:style {:background-color bg-color}
|
||||
|
|
|
@ -117,6 +117,7 @@
|
|||
padding-right: 0 $s-8 $s-40 $s-8;
|
||||
transition: transform 400ms ease 300ms;
|
||||
z-index: $z-index-2;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.reset-button {
|
||||
|
|
|
@ -432,7 +432,7 @@
|
|||
(let [id (obj/get self "$id")
|
||||
value (mapv #(shadow-defaults (parser/parse-shadow %)) value)]
|
||||
(cond
|
||||
(not (sm/validate [:vector ::ctss/shadow] value))
|
||||
(not (sm/validate [:vector ctss/schema:shadow] value))
|
||||
(u/display-not-valid :shadows value)
|
||||
|
||||
(not (r/check-permission plugin-id "content:write"))
|
||||
|
|
|
@ -50,7 +50,8 @@
|
|||
[headers]
|
||||
(into {} (map vec) (seq (.entries ^js headers))))
|
||||
|
||||
(def default-headers
|
||||
(defn default-headers
|
||||
[]
|
||||
{"x-frontend-version" (:full cfg/version)})
|
||||
|
||||
(defn fetch
|
||||
|
@ -74,7 +75,7 @@
|
|||
|
||||
headers (cond-> headers
|
||||
(not omit-default-headers)
|
||||
(d/merge default-headers))
|
||||
(merge (default-headers)))
|
||||
|
||||
headers (-update-headers body headers)
|
||||
|
||||
|
|
|
@ -42,12 +42,11 @@
|
|||
:http-body body})))
|
||||
|
||||
(defn- request-data-for-thumbnail
|
||||
[file-id revn features]
|
||||
[file-id revn]
|
||||
(let [path "api/rpc/command/get-file-data-for-thumbnail"
|
||||
params {:file-id file-id
|
||||
:revn revn
|
||||
:strip-frames-with-thumbnails true
|
||||
:features features}
|
||||
:strip-frames-with-thumbnails true}
|
||||
request {:method :get
|
||||
:uri (u/join cf/public-uri path)
|
||||
:credentials "include"
|
||||
|
@ -86,6 +85,6 @@
|
|||
nil)))
|
||||
|
||||
(defmethod impl/handler :thumbnails/generate-for-file
|
||||
[{:keys [file-id revn features] :as message} _]
|
||||
(->> (request-data-for-thumbnail file-id revn features)
|
||||
[{:keys [file-id revn] :as message} _]
|
||||
(->> (request-data-for-thumbnail file-id revn)
|
||||
(rx/map render-thumbnail)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue