Skip to content

Commit

Permalink
Link note and add page number in title
Browse files Browse the repository at this point in the history
  • Loading branch information
eyeseast committed Dec 16, 2024
1 parent 1c8ae00 commit ae70642
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/lib/components/viewer/Note.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
$: rendering = render(canvas, doc, $pdf); // avoid re-using the same canvas
$: edit_link = getViewerHref({ document: doc, note, mode: "annotating" });
$: canEdit = note.edit_access && !embed;
$: note_url = getViewerHref({ document: doc, note });
async function render(
canvas: HTMLCanvasElement,
Expand Down Expand Up @@ -213,7 +214,12 @@
</Button>
{/if}
<div class="headerText">
<h3>{note.title}</h3>
<h3>
<a href={note_url} target={embed ? "_blank" : null}>
{note.title}
{#if embed}({$_("documents.pageAbbrev")} {page_number}){/if}
</a>
</h3>
{#if user}
<p class="author">
{$_("annotation.by", { values: { name: getUserName(user) } })}
Expand Down

0 comments on commit ae70642

Please sign in to comment.