|
@@ -24,7 +24,6 @@
|
|
|
[frontend.util :as util]
|
|
|
[frontend.util.fs :as fs-util]
|
|
|
[frontend.storage :as storage]
|
|
|
- [logseq.graph-parser.config :as gp-config]
|
|
|
[promesa.core :as p]
|
|
|
[reitit.frontend.easy :as rfe]
|
|
|
[rum.core :as rum]
|
|
@@ -481,20 +480,17 @@
|
|
|
|
|
|
(when (seq history-files)
|
|
|
(map-indexed (fn [i f] (:time f)
|
|
|
- (let [path (:path f)
|
|
|
- ext (util/get-file-ext path)]
|
|
|
- (when ext
|
|
|
- (let [ext (string/lower-case ext)
|
|
|
- full-path (util/node-path.join (config/get-repo-dir current-repo) path)
|
|
|
- page-name (db/get-file-page full-path)]
|
|
|
- {:title [:div.files-history.cursor-pointer
|
|
|
- {:key i :class (when (= i 0) "is-first")
|
|
|
- :on-click (fn []
|
|
|
- (if page-name
|
|
|
- (rfe/push-state :page {:name page-name})
|
|
|
- (rfe/push-state :file {:path full-path})))}
|
|
|
- [:span.file-sync-item (js/decodeURIComponent (:path f))]
|
|
|
- [:div.opacity-50 (ui/humanity-time-ago (:time f) nil)]]}))))
|
|
|
+ (when-let [path (:path f)]
|
|
|
+ (let [full-path (util/node-path.join (config/get-repo-dir current-repo) path)
|
|
|
+ page-name (db/get-file-page full-path)]
|
|
|
+ {:title [:div.files-history.cursor-pointer
|
|
|
+ {:key i :class (when (= i 0) "is-first")
|
|
|
+ :on-click (fn []
|
|
|
+ (if page-name
|
|
|
+ (rfe/push-state :page {:name page-name})
|
|
|
+ (rfe/push-state :file {:path full-path})))}
|
|
|
+ [:span.file-sync-item (js/decodeURIComponent (:path f))]
|
|
|
+ [:div.opacity-50 (ui/humanity-time-ago (:time f) nil)]]})))
|
|
|
(take 10 history-files)))))
|
|
|
|
|
|
;; options
|