|
@@ -20,7 +20,8 @@
|
|
|
[logseq.graph-parser.util :as gp-util]
|
|
[logseq.graph-parser.util :as gp-util]
|
|
|
[promesa.core :as p]
|
|
[promesa.core :as p]
|
|
|
[reitit.frontend.easy :as rfe]
|
|
[reitit.frontend.easy :as rfe]
|
|
|
- [rum.core :as rum]))
|
|
|
|
|
|
|
+ [rum.core :as rum]
|
|
|
|
|
+ [logseq.common.path :as path]))
|
|
|
|
|
|
|
|
(defn- get-path
|
|
(defn- get-path
|
|
|
[state]
|
|
[state]
|
|
@@ -100,12 +101,14 @@
|
|
|
state)}
|
|
state)}
|
|
|
[state path format]
|
|
[state path format]
|
|
|
(let [original-name (db/get-file-page path)
|
|
(let [original-name (db/get-file-page path)
|
|
|
|
|
+ repo-dir (config/get-repo-dir (state/get-current-repo))
|
|
|
|
|
+ rel-path (path/trim-dir-prefix repo-dir path)
|
|
|
random-id (str (d/squuid))
|
|
random-id (str (d/squuid))
|
|
|
content (rum/react (::file-content state))]
|
|
content (rum/react (::file-content state))]
|
|
|
[:div.file {:id (str "file-edit-wrapper-" random-id)
|
|
[:div.file {:id (str "file-edit-wrapper-" random-id)
|
|
|
:key path}
|
|
:key path}
|
|
|
[:h1.title
|
|
[:h1.title
|
|
|
- [:bdi (or original-name path)]]
|
|
|
|
|
|
|
+ [:bdi (or original-name rel-path path)]]
|
|
|
(when original-name
|
|
(when original-name
|
|
|
[:div.text-sm.mb-4.ml-1 "Page: "
|
|
[:div.text-sm.mb-4.ml-1 "Page: "
|
|
|
[:a.bg-base-2.p-1.ml-1 {:style {:border-radius 4}
|
|
[:a.bg-base-2.p-1.ml-1 {:style {:border-radius 4}
|