♻️ Initial refactor of page data structure (wip).

Still work in progress but is a necessary step for a future
(re)introduction of groups.
This commit is contained in:
Andrey Antukh 2020-03-08 12:46:09 +01:00
parent cbad98b783
commit ba373573e0
29 changed files with 1116 additions and 787 deletions

View file

@ -12,6 +12,7 @@
[mount.core :as mount]
[promesa.core :as p]
[uxbox.config :as cfg]
[uxbox.common.pages :as cp]
[uxbox.common.data :as d]
[uxbox.core]
[uxbox.db :as db]
@ -149,12 +150,7 @@
create-page
(fn [conn owner-id project-id file-id index]
(p/let [id (mk-uuid "page" project-id file-id index)
data {:version 1
:shapes []
:canvas []
:options {}
:shapes-by-id {}}
data cp/default-page-data
name (str "page " index)
version 0
ordering index