mirror of
https://github.com/penpot/penpot.git
synced 2025-03-18 18:51:29 -05:00
⬆️ Update plugins runtime
This commit is contained in:
parent
d6f6d78b1e
commit
214733c880
5 changed files with 1504 additions and 1457 deletions
File diff suppressed because it is too large
Load diff
|
@ -267,7 +267,7 @@
|
|||
(delete-comment-thread-on-workspace params identity))
|
||||
([{:keys [id] :as thread} on-delete]
|
||||
(dm/assert! (uuid? id))
|
||||
|
||||
|
||||
(ptk/reify ::delete-comment-thread-on-workspace
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
(cond
|
||||
(or (not (string? content)) (empty? content))
|
||||
(u/display-not-valid :content "Not valid")
|
||||
|
||||
|
||||
(not= (:id profile) (:owner-id data))
|
||||
(u/display-not-valid :content "Cannot change content from another user's comments")
|
||||
|
||||
|
@ -130,7 +130,7 @@
|
|||
{:name "seqNumber" :get (fn [_] (:seqn data))}
|
||||
{:name "owner" :get (fn [_] (user/user-proxy plugin-id (get users (:owner-id data))))}
|
||||
{:name "board" :get (fn [_] (shape/shape-proxy plugin-id file-id page-id (:frame-id data)))}
|
||||
|
||||
|
||||
{:name "position"
|
||||
:get (fn [_] (format/format-point (:position @data*)))
|
||||
:set
|
||||
|
@ -139,7 +139,7 @@
|
|||
(cond
|
||||
(or (not (us/safe-number? (:x position))) (not (us/safe-number? (:y position))))
|
||||
(u/display-not-valid :position "Not valid point")
|
||||
|
||||
|
||||
(not (r/check-permission plugin-id "content:write"))
|
||||
(u/display-not-valid :content "Plugin doesn't have 'content:write' permission")
|
||||
|
||||
|
@ -154,7 +154,7 @@
|
|||
(cond
|
||||
(not (boolean? is-resolved))
|
||||
(u/display-not-valid :resolved "Not a boolean type")
|
||||
|
||||
|
||||
(not (r/check-permission plugin-id "content:write"))
|
||||
(u/display-not-valid :resolved "Plugin doesn't have 'content:write' permission")
|
||||
|
||||
|
|
|
@ -325,17 +325,17 @@
|
|||
(rx/take 1)
|
||||
(rx/subs!
|
||||
(fn [[users comments]]
|
||||
(let [users (d/index-by :id users)]
|
||||
(let [comments
|
||||
(cond->> comments
|
||||
(not show-resolved)
|
||||
(filter (comp not :is-resolved))
|
||||
(let [users (d/index-by :id users)
|
||||
comments
|
||||
(cond->> comments
|
||||
(not show-resolved)
|
||||
(filter (comp not :is-resolved))
|
||||
|
||||
only-yours
|
||||
(filter #(contains? (:participants %) user-id)))]
|
||||
(resolve
|
||||
(format/format-array
|
||||
#(pc/comment-thread-proxy $plugin $file $id users %) comments)))))
|
||||
only-yours
|
||||
(filter #(contains? (:participants %) user-id)))]
|
||||
(resolve
|
||||
(format/format-array
|
||||
#(pc/comment-thread-proxy $plugin $file $id users %) comments))))
|
||||
reject)))))))
|
||||
|
||||
(crc/define-properties!
|
||||
|
|
|
@ -617,7 +617,7 @@
|
|||
|
||||
:else
|
||||
(let [guide (u/proxy->ruler-guide value)]
|
||||
(st/emit! (dwgu/remove-guide guide))))))
|
||||
(st/emit! (dwgu/remove-guide guide))))))
|
||||
|
||||
(defn shape-proxy? [p]
|
||||
(instance? ShapeProxy p))
|
||||
|
|
Loading…
Add table
Reference in a new issue