|
10 | 10 | [app.style.widget :as widget]
|
11 | 11 | [app.util.keycode :as keycode]))
|
12 | 12 |
|
13 |
| -(def style-body {:flex 1, :overflow :auto}) |
14 |
| - |
15 |
| -(def style-highlight {:color (hsl 0 0 100 0.9)}) |
16 |
| - |
17 |
| -(def style-toolbar {:padding "16px 16px"}) |
18 |
| - |
19 |
| -(def style-column {:padding "16px 16px", :min-width 80, :line-height 1.6, :overflow :auto}) |
20 |
| - |
21 |
| -(defn on-view [path ns-piece] |
22 |
| - (fn [e dispatch!] (dispatch! :graph/view-ns (conj path ns-piece)))) |
23 |
| - |
24 | 13 | (defn on-change [cursor] (fn [e dispatch!] (dispatch! :states [cursor (:value e)])))
|
25 | 14 |
|
26 |
| -(def style-file-tree {:background-color (hsl 0 0 0)}) |
| 15 | +(defn on-graph [e dispatch!] (dispatch! :router/route {:name :graph, :data nil})) |
27 | 16 |
|
28 | 17 | (defn on-keydown [state cursor]
|
29 | 18 | (fn [e dispatch!]
|
|
34 | 23 | (dispatch! :collection/add-namespace state))
|
35 | 24 | (dispatch! :states [cursor ""])))))
|
36 | 25 |
|
37 |
| -(defn on-graph [e dispatch!] (dispatch! :router/route {:name :graph, :data nil})) |
38 |
| - |
39 | 26 | (defn on-stack [e d! m!] (d! :router/route {:name :workspace, :data nil}))
|
40 | 27 |
|
| 28 | +(defn on-view [path ns-piece] |
| 29 | + (fn [e dispatch!] (dispatch! :graph/view-ns (conj path ns-piece)))) |
| 30 | + |
| 31 | +(def style-toolbar {:padding "16px 16px"}) |
| 32 | + |
41 | 33 | (defn render-toolbar [state cursor]
|
42 | 34 | (div
|
43 | 35 | {:style style-toolbar}
|
|
52 | 44 | :on-input (on-change cursor),
|
53 | 45 | :on-keydown (on-keydown state cursor)})))
|
54 | 46 |
|
| 47 | +(def style-body {:flex 1, :overflow :auto}) |
| 48 | + |
| 49 | +(def style-column {:padding "16px 16px", :min-width 80, :line-height 1.6, :overflow :auto}) |
| 50 | + |
55 | 51 | (def style-file
|
56 | 52 | {:cursor :pointer, :color (hsl 0 0 100 0.5), :white-space :nowrap, :font-size 16})
|
57 | 53 |
|
| 54 | +(def style-file-tree {:background-color (hsl 0 0 0)}) |
| 55 | + |
| 56 | +(def style-highlight {:color (hsl 0 0 100 0.9)}) |
| 57 | + |
58 | 58 | (defcomp
|
59 | 59 | comp-file-tree
|
60 | 60 | (states store)
|
|
0 commit comments