mirror of
https://github.com/logseq/logseq.git
synced 2026-04-24 22:25:01 +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
|
(->elem
|
||||||
:a
|
:a
|
||||||
(cond->
|
(cond->
|
||||||
{:href (path/path-join "file://" path)
|
{:on-click (fn [e]
|
||||||
:data-href path
|
(util/stop e)
|
||||||
:target "_blank"}
|
(js/window.apis.openPath path))
|
||||||
|
:data-href path}
|
||||||
title
|
title
|
||||||
(assoc :title title))
|
(assoc :title title))
|
||||||
(map-inline config label)))
|
(map-inline config label)))
|
||||||
@@ -1622,9 +1623,14 @@
|
|||||||
href)]
|
href)]
|
||||||
(->elem
|
(->elem
|
||||||
:a
|
:a
|
||||||
(cond-> {:href (path/path-join "file://" href*)
|
(cond-> (if (util/electron?)
|
||||||
:data-href href*
|
{:on-click (fn [e]
|
||||||
:target "_blank"}
|
(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))
|
title (assoc :title title))
|
||||||
(map-inline config label))))))
|
(map-inline config label))))))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user