|
@@ -9,6 +9,7 @@
|
|
|
[frontend.db.async :as db-async]
|
|
[frontend.db.async :as db-async]
|
|
|
[frontend.db.conn :as db-conn]
|
|
[frontend.db.conn :as db-conn]
|
|
|
[frontend.flows :as flows]
|
|
[frontend.flows :as flows]
|
|
|
|
|
+ [frontend.handler.editor :as editor-handler]
|
|
|
[frontend.handler.notification :as notification]
|
|
[frontend.handler.notification :as notification]
|
|
|
[frontend.handler.page :as page-handler]
|
|
[frontend.handler.page :as page-handler]
|
|
|
[frontend.handler.route :as route-handler]
|
|
[frontend.handler.route :as route-handler]
|
|
@@ -114,6 +115,10 @@
|
|
|
(case (.-id e)
|
|
(case (.-id e)
|
|
|
"title" (open-graph-switch!)
|
|
"title" (open-graph-switch!)
|
|
|
"calendar" (open-journal-calendar!)
|
|
"calendar" (open-journal-calendar!)
|
|
|
|
|
+ "capture" (do
|
|
|
|
|
+ (state/clear-edit!)
|
|
|
|
|
+ (editor-handler/quick-add-blocks!))
|
|
|
|
|
+ "audio-record" (state/pub-event! [:mobile/start-audio-record])
|
|
|
"add-graph" (state/pub-event! [:graph/new-db-graph])
|
|
"add-graph" (state/pub-event! [:graph/new-db-graph])
|
|
|
"home-setting" (open-home-settings-actions!)
|
|
"home-setting" (open-home-settings-actions!)
|
|
|
"graph-setting" (open-graph-settings-actions!)
|
|
"graph-setting" (open-graph-settings-actions!)
|
|
@@ -146,8 +151,11 @@
|
|
|
base {:title title
|
|
base {:title title
|
|
|
:hidden (boolean hidden?)}
|
|
:hidden (boolean hidden?)}
|
|
|
page? (= route-name :page)
|
|
page? (= route-name :page)
|
|
|
- left-buttons (when (and (= tab "home") (nil? route-view))
|
|
|
|
|
- [(conj {:id "calendar" :systemIcon "calendar"})])
|
|
|
|
|
|
|
+ left-buttons (cond
|
|
|
|
|
+ (and (= tab "home") (nil? route-view))
|
|
|
|
|
+ [(conj {:id "calendar" :systemIcon "calendar"})]
|
|
|
|
|
+ (and (= tab "capture") (nil? route-view))
|
|
|
|
|
+ [(conj {:id "audio-record" :systemIcon "waveform"})])
|
|
|
right-buttons (cond
|
|
right-buttons (cond
|
|
|
page?
|
|
page?
|
|
|
(into [{:id "page-setting" :systemIcon "ellipsis"}
|
|
(into [{:id "page-setting" :systemIcon "ellipsis"}
|
|
@@ -165,6 +173,9 @@
|
|
|
[{:id "graph-setting" :systemIcon "ellipsis"}
|
|
[{:id "graph-setting" :systemIcon "ellipsis"}
|
|
|
{:id "add-graph" :systemIcon "plus"}]
|
|
{:id "add-graph" :systemIcon "plus"}]
|
|
|
|
|
|
|
|
|
|
+ (= tab "capture")
|
|
|
|
|
+ [{:id "capture" :systemIcon "paperplane"}]
|
|
|
|
|
+
|
|
|
:else nil)
|
|
:else nil)
|
|
|
header (cond-> base
|
|
header (cond-> base
|
|
|
left-buttons (assoc :leftButtons left-buttons)
|
|
left-buttons (assoc :leftButtons left-buttons)
|