2015-06-18 19:35:50 +02:00
|
|
|
(ns uxbox.state
|
2015-12-17 16:43:58 +02:00
|
|
|
(:require [beicon.core :as rx]
|
|
|
|
[uxbox.rstore :as rs]))
|
2015-06-18 19:35:50 +02:00
|
|
|
|
2015-12-13 22:57:14 +02:00
|
|
|
(defonce state (atom {}))
|
|
|
|
|
2015-12-14 14:17:18 +02:00
|
|
|
(defonce stream
|
2015-12-21 19:16:39 +02:00
|
|
|
(rs/init {:user {:fullname "Cirilla Fiona"
|
2015-12-13 22:57:14 +02:00
|
|
|
:avatar "http://lorempixel.com/50/50/"}
|
2015-12-20 20:19:07 +02:00
|
|
|
:dashboard {}
|
2015-12-16 18:08:28 +02:00
|
|
|
:workspace {}
|
2015-12-20 20:19:07 +02:00
|
|
|
:elements-by-id {}
|
|
|
|
:colors-by-id {}
|
|
|
|
:icons-by-id {}
|
2015-12-13 13:04:34 +02:00
|
|
|
:projects-by-id {}
|
|
|
|
:pages-by-id {}}))
|
2015-06-18 19:35:50 +02:00
|
|
|
|
2015-12-23 15:44:03 +02:00
|
|
|
|
|
|
|
(defn init
|
|
|
|
"Initialize the state materialization."
|
|
|
|
[]
|
|
|
|
(rx/to-atom stream state))
|