mirror of
https://github.com/logseq/logseq.git
synced 2026-02-01 22:47:36 +00:00
fix: uploaded file cannot be opened in file graphs
fixed https://github.com/logseq/db-test/issues/298
This commit is contained in:
@@ -1540,9 +1540,10 @@
|
||||
(->elem
|
||||
:a
|
||||
(cond->
|
||||
{:href (path/path-join "file://" path)
|
||||
:data-href path
|
||||
:target "_blank"}
|
||||
{:on-click (fn [e]
|
||||
(util/stop e)
|
||||
(js/window.apis.openPath path))
|
||||
:data-href path}
|
||||
title
|
||||
(assoc :title title))
|
||||
(map-inline config label)))
|
||||
@@ -1622,9 +1623,14 @@
|
||||
href)]
|
||||
(->elem
|
||||
:a
|
||||
(cond-> {:href (path/path-join "file://" href*)
|
||||
:data-href href*
|
||||
:target "_blank"}
|
||||
(cond-> (if (util/electron?)
|
||||
{:on-click (fn [e]
|
||||
(util/stop e)
|
||||
(js/window.apis.openPath path))
|
||||
:data-href href*}
|
||||
{:href (path/path-join "file://" href*)
|
||||
:data-href href*
|
||||
:target "_blank"})
|
||||
title (assoc :title title))
|
||||
(map-inline config label))))))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user