mirror of
https://github.com/penpot/penpot.git
synced 2025-02-03 04:49:03 -05:00
✨ Remove letter prefix in all new object names
This commit is contained in:
parent
06712bf1a5
commit
f33713912a
3 changed files with 4 additions and 4 deletions
|
@ -246,7 +246,7 @@
|
||||||
(ptk/reify ::create-project
|
(ptk/reify ::create-project
|
||||||
ptk/WatchEvent
|
ptk/WatchEvent
|
||||||
(watch [_ state stream]
|
(watch [_ state stream]
|
||||||
(let [name (str "New Project " (gensym ""))
|
(let [name (name (gensym "New Project "))
|
||||||
team-id (get-in state [:dashboard-local :team-id])]
|
team-id (get-in state [:dashboard-local :team-id])]
|
||||||
(->> (rp/mutation! :create-project {:name name :team-id team-id})
|
(->> (rp/mutation! :create-project {:name name :team-id team-id})
|
||||||
(rx/map project-created))))))
|
(rx/map project-created))))))
|
||||||
|
@ -348,7 +348,7 @@
|
||||||
(ptk/reify ::create-file
|
(ptk/reify ::create-file
|
||||||
ptk/WatchEvent
|
ptk/WatchEvent
|
||||||
(watch [_ state stream]
|
(watch [_ state stream]
|
||||||
(let [name (str "New File " (gensym ""))
|
(let [name (name (gensym "New File "))
|
||||||
params {:name name :project-id project-id}]
|
params {:name name :project-id project-id}]
|
||||||
(->> (rp/mutation! :create-file params)
|
(->> (rp/mutation! :create-file params)
|
||||||
(rx/map file-created))))))
|
(rx/map file-created))))))
|
||||||
|
|
|
@ -83,7 +83,7 @@
|
||||||
:content content
|
:content content
|
||||||
:id (uuid/next)
|
:id (uuid/next)
|
||||||
;; TODO Keep the name of the original icon
|
;; TODO Keep the name of the original icon
|
||||||
:name (str "Icon " (gensym "i"))
|
:name (name (gensym "Icon "))
|
||||||
:metadata metadata})]
|
:metadata metadata})]
|
||||||
(->> (rx/from files)
|
(->> (rx/from files)
|
||||||
(rx/filter allowed?)
|
(rx/filter allowed?)
|
||||||
|
|
|
@ -221,7 +221,7 @@
|
||||||
ptk/WatchEvent
|
ptk/WatchEvent
|
||||||
(watch [this state stream]
|
(watch [this state stream]
|
||||||
(let [file-id (get-in state [:workspace-file :id])
|
(let [file-id (get-in state [:workspace-file :id])
|
||||||
name (str "Page " (gensym "p"))
|
name (name (gensym "Page "))
|
||||||
ordering (count (get-in state [:workspace-file :pages]))
|
ordering (count (get-in state [:workspace-file :pages]))
|
||||||
params {:name name
|
params {:name name
|
||||||
:file-id file-id
|
:file-id file-id
|
||||||
|
|
Loading…
Add table
Reference in a new issue