mirror of https://github.com/logseq/logseq
fix: sometimes pdf links can't be opened
parent
de7c6584fb
commit
5987fbcddd
|
@ -456,10 +456,10 @@
|
|||
(string/ends-with? (util/node-path.dirname full-path) config/local-assets-dir))
|
||||
[:a.asset-ref.is-pdf
|
||||
{:href "javascript:void(0);"
|
||||
:on-click (fn [e]
|
||||
:on-mouse-down (fn [e]
|
||||
(when-let [current (pdf-assets/inflate-asset (util/node-path.basename full-path))]
|
||||
(state/set-state! :pdf/current current)
|
||||
(.preventDefault e)))}
|
||||
(util/stop e)
|
||||
(state/set-state! :pdf/current current)))}
|
||||
title-or-path]
|
||||
[:a.asset-ref {:target "_blank" :href full-path}
|
||||
title-or-path])
|
||||
|
|
|
@ -504,13 +504,13 @@
|
|||
&.is-pdf {
|
||||
&:before {
|
||||
content: "[[📚";
|
||||
opacity: .4;
|
||||
opacity: .7;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
&:after {
|
||||
content: "]]";
|
||||
opacity: .4;
|
||||
opacity: .7;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue