mirror of
https://github.com/penpot/penpot.git
synced 2025-01-24 23:49:45 -05:00
✨ Use uuid1 instead of uuid4 on all the codebase.
This commit is contained in:
parent
20cd5b1d9c
commit
8dd6c8457f
8 changed files with 12 additions and 12 deletions
|
@ -79,7 +79,7 @@
|
|||
|
||||
(defn create-collection
|
||||
[]
|
||||
(let [id (uuid/random)]
|
||||
(let [id (uuid/next)]
|
||||
(CreateCollection. id)))
|
||||
|
||||
;; --- Persist Collections
|
||||
|
|
|
@ -201,7 +201,7 @@
|
|||
(prepare [[content metadata]]
|
||||
{:collection-id id
|
||||
:content content
|
||||
:id (uuid/random)
|
||||
:id (uuid/next)
|
||||
;; TODO Keep the name of the original icon
|
||||
:name (str "Icon " (gensym "i"))
|
||||
:metadata metadata})]
|
||||
|
|
|
@ -193,7 +193,7 @@
|
|||
(prepare [[file [width height]]]
|
||||
(cond-> {:name (.-name file)
|
||||
:mimetype (.-type file)
|
||||
:id (uuid/random)
|
||||
:id (uuid/next)
|
||||
:file file
|
||||
:width width
|
||||
:height height}
|
||||
|
|
|
@ -425,7 +425,7 @@
|
|||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(let [selected (get-in state [:workspace :selected])
|
||||
item {:id (uuid/random)
|
||||
item {:id (uuid/next)
|
||||
:created-at (dt/now)
|
||||
:items selected}
|
||||
clipboard (-> (:clipboard state)
|
||||
|
@ -547,7 +547,7 @@
|
|||
(defn add-shape
|
||||
[data]
|
||||
(us/assert ::shape-attrs data)
|
||||
(let [id (uuid/random)]
|
||||
(let [id (uuid/next)]
|
||||
(ptk/reify ::add-shape
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
|
@ -576,7 +576,7 @@
|
|||
(defn add-canvas
|
||||
[data]
|
||||
(us/assert ::shape-attrs data)
|
||||
(let [id (uuid/random)]
|
||||
(let [id (uuid/next)]
|
||||
(ptk/reify ::add-canvas
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
|
@ -600,7 +600,7 @@
|
|||
(defn impl-duplicate-shape
|
||||
[state id]
|
||||
(let [shape (get-in state [:workspace-data :shapes-by-id id])]
|
||||
(assoc shape :id (uuid/random))))
|
||||
(assoc shape :id (uuid/next))))
|
||||
|
||||
(def duplicate-selected
|
||||
(ptk/reify ::duplicate-selected
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
(def initial-state
|
||||
{:route nil
|
||||
:router nil
|
||||
:session-id (uuid/random)
|
||||
:session-id (uuid/next)
|
||||
:auth (:auth storage)
|
||||
:profile (:profile storage)
|
||||
:clipboard #queue []
|
||||
|
|
|
@ -88,7 +88,7 @@
|
|||
[type]
|
||||
(let [tool (seek #(= type (:type %)) minimal-shapes)]
|
||||
(assert tool "unexpected drawing tool")
|
||||
(assoc tool :id (uuid/random))))
|
||||
(assoc tool :id (uuid/next))))
|
||||
|
||||
(defn handle-drawing
|
||||
[type]
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
(deftype WebWorker [stream wrk]
|
||||
IWorker
|
||||
(-ask [this message]
|
||||
(let [sender (uuid/random)
|
||||
(let [sender (uuid/next)
|
||||
data (assoc message :sender sender)
|
||||
data (t/encode data)]
|
||||
(.postMessage wrk data)
|
||||
|
@ -28,7 +28,7 @@
|
|||
(rx/take 1))))
|
||||
|
||||
(-send [this message]
|
||||
(let [sender (uuid/random)
|
||||
(let [sender (uuid/next)
|
||||
data (assoc message :sender sender)
|
||||
data (t/encode data)]
|
||||
(.postMessage wrk data)
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
(enable-console-print!)
|
||||
|
||||
(defonce id (uuid/random))
|
||||
(defonce id (uuid/next))
|
||||
|
||||
(defn- on-message
|
||||
[event]
|
||||
|
|
Loading…
Add table
Reference in a new issue