|
|
@@ -9,7 +9,6 @@
|
|
|
[frontend.state :as state]
|
|
|
[logseq.graph-parser.text :as text]
|
|
|
[frontend.util :as util]
|
|
|
- [goog.object :as gobj]
|
|
|
[reitit.frontend.easy :as rfe]))
|
|
|
|
|
|
(defn redirect!
|
|
|
@@ -137,21 +136,21 @@
|
|
|
(state/set-search-mode! search-mode))
|
|
|
(state/pub-event! [:go/search]))
|
|
|
|
|
|
+(defn sidebar-journals!
|
|
|
+ []
|
|
|
+ (state/sidebar-add-block!
|
|
|
+ (state/get-current-repo)
|
|
|
+ (:db/id (db/get-page (date/today)))
|
|
|
+ :page))
|
|
|
+
|
|
|
(defn go-to-journals!
|
|
|
- [e]
|
|
|
- (if (gobj/get e "shiftKey") ;TODO pretty sure this test should be sidebar.cljs
|
|
|
- (do
|
|
|
- (state/sidebar-add-block!
|
|
|
- (state/get-current-repo)
|
|
|
- (:db/id (db/get-page (date/today)))
|
|
|
- :page))
|
|
|
- (do
|
|
|
- (state/set-journals-length! 3)
|
|
|
- (let [route (if (state/custom-home-page?)
|
|
|
- :all-journals
|
|
|
- :home)]
|
|
|
- (redirect! {:to route}))
|
|
|
- (util/scroll-to-top))))
|
|
|
+ []
|
|
|
+ (state/set-journals-length! 3)
|
|
|
+ (let [route (if (state/custom-home-page?)
|
|
|
+ :all-journals
|
|
|
+ :home)]
|
|
|
+ (redirect! {:to route}))
|
|
|
+ (util/scroll-to-top))
|
|
|
|
|
|
(defn- redirect-to-file!
|
|
|
[page]
|