mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 15:19:01 +02:00
fix(client): pressing "Open" on PDF preview also opens note
This commit is contained in:
parent
0c9d1e91bb
commit
c5dbaccea8
@ -257,7 +257,15 @@ function renderFile(entity: FNote | FAttachment, type: string, $renderedContent:
|
||||
`);
|
||||
|
||||
$downloadButton.on("click", () => openService.downloadFileNote(entity.noteId));
|
||||
$openButton.on("click", () => openService.openNoteExternally(entity.noteId, entity.mime));
|
||||
$openButton.on("click", async (e) => {
|
||||
const iconEl = $openButton.find("> .bx");
|
||||
iconEl.removeClass("bx bx-link-external");
|
||||
iconEl.addClass("bx bx-loader spin");
|
||||
e.stopPropagation();
|
||||
await openService.openNoteExternally(entity.noteId, entity.mime)
|
||||
iconEl.removeClass("bx bx-loader spin");
|
||||
iconEl.addClass("bx bx-link-external");
|
||||
});
|
||||
// open doesn't work for protected notes since it works through a browser which isn't in protected session
|
||||
$openButton.toggle(!entity.isProtected);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user