diff --git a/src/electron/electron/fs_watcher.cljs b/src/electron/electron/fs_watcher.cljs index d808902118..2bb1771df7 100644 --- a/src/electron/electron/fs_watcher.cljs +++ b/src/electron/electron/fs_watcher.cljs @@ -26,7 +26,7 @@ (clj->js {:ignored (fn [path] (utils/ignored-path? dir path)) - :ignoreInitial true + :ignoreInitial false :ignorePermissionErrors true :interval polling-interval :binaryInterval polling-interval diff --git a/src/main/frontend/components/header.cljs b/src/main/frontend/components/header.cljs index b4ec2f1d39..a5d061d9f2 100644 --- a/src/main/frontend/components/header.cljs +++ b/src/main/frontend/components/header.cljs @@ -194,6 +194,10 @@ (search/search) [:div.flex-1]) + [:a (when refreshing? + [:div {:class "animate-spin-reverse"} + svg/refresh])] + (when electron-mac? (logo {:white? white? :electron-mac? true})) @@ -202,10 +206,6 @@ (new-block-mode) - (when refreshing? - [:div {:class "animate-spin-reverse"} - svg/refresh]) - (when-not (util/electron?) (login logged?)) diff --git a/src/main/frontend/dicts.cljs b/src/main/frontend/dicts.cljs index 120241d550..882e35499d 100644 --- a/src/main/frontend/dicts.cljs +++ b/src/main/frontend/dicts.cljs @@ -251,7 +251,7 @@ :close "Close" :delete "Delete" :re-index "Re-index (rebuild the graph)" - :sync-from-local-files "Sync from local files" + :sync-from-local-files "Refresh (Import changes from local files)" :unlink "unlink" :search (if config/publishing? "Search" @@ -931,7 +931,9 @@ :yes "是" :submit "提交" :cancel "取消" + :new-graph "添加图谱" :re-index "重新建立索引" + :sync-from-local-files "刷新(读取本地最新文件)" :export-json "以 JSON 格式导出" :export-roam-json "以 Roam JSON 格式导出" :export-markdown "以 Markdown 格式导出" @@ -947,6 +949,8 @@ :new-file "新文件" :graph "图谱" :graph-view "全局图谱" + :cards-view "卡片组" + :all-journals "日记" :publishing "发布" :export "导出" :all-graphs "所有库" diff --git a/src/main/frontend/fs/watcher_handler.cljs b/src/main/frontend/fs/watcher_handler.cljs index 3131059b21..1bac096a86 100644 --- a/src/main/frontend/fs/watcher_handler.cljs +++ b/src/main/frontend/fs/watcher_handler.cljs @@ -37,12 +37,13 @@ db-content (or (db/get-file repo path) "")] (when (and content (not (encrypt/content-encrypted? content))) (cond - (= "add" type) - (when-not (db/file-exists? repo path) - (p/let [_ (file-handler/alter-file repo path content {:re-render-root? true - :from-disk? true})] - (set-missing-block-ids! content) - (db/set-file-last-modified-at! repo path mtime))) + (and (= "add" type) + (not= (string/trim content) (string/trim db-content)) + (not (string/includes? path "logseq/pages-metadata.edn"))) + (p/let [_ (file-handler/alter-file repo path content {:re-render-root? true + :from-disk? true})] + (set-missing-block-ids! content) + (db/set-file-last-modified-at! repo path mtime)) (and (= "change" type) (not (db/file-exists? repo path)))