chore(client/ts): port services/note_list_renderer

This commit is contained in:
Elian Doran
2024-12-23 11:00:10 +02:00
parent 9bdee7afff
commit 838dc521b1
5 changed files with 48 additions and 26 deletions

View File

@@ -231,14 +231,14 @@ function parseNavigationStateFromUrl(url: string | undefined) {
};
}
function goToLink(evt: MouseEvent) {
function goToLink(evt: MouseEvent | JQuery.ClickEvent) {
const $link = $(evt.target as any).closest("a,.block-link");
const hrefLink = $link.attr('href') || $link.attr('data-href');
return goToLinkExt(evt, hrefLink, $link);
}
function goToLinkExt(evt: MouseEvent, hrefLink: string | undefined, $link: JQuery<HTMLElement>) {
function goToLinkExt(evt: MouseEvent | JQuery.ClickEvent, hrefLink: string | undefined, $link: JQuery<HTMLElement>) {
if (hrefLink?.startsWith("data:")) {
return true;
}