feat: added proper annotation link
This commit is contained in:
@@ -3,7 +3,7 @@ import { ZoteroClient } from "./ZoteroClient";
|
|||||||
import { loadAnnotations, renderZoteroAnnotation } from "./Utils"
|
import { loadAnnotations, renderZoteroAnnotation } from "./Utils"
|
||||||
import { Settings } from "./Settings";
|
import { Settings } from "./Settings";
|
||||||
|
|
||||||
const ZOTERO_BASE_URL = "zotero://select/library/items/";
|
const ZOTERO_BASE_URL = "zotero://open-pdf/library/items/";
|
||||||
|
|
||||||
export class AnnotationModal extends FuzzySuggestModal<ZoteroItem> {
|
export class AnnotationModal extends FuzzySuggestModal<ZoteroItem> {
|
||||||
private client: ZoteroClient;
|
private client: ZoteroClient;
|
||||||
@@ -45,7 +45,7 @@ export class AnnotationModal extends FuzzySuggestModal<ZoteroItem> {
|
|||||||
let citation = item.parentItem.citation ?? "";
|
let citation = item.parentItem.citation ?? "";
|
||||||
|
|
||||||
if (this.settings.link) {
|
if (this.settings.link) {
|
||||||
citation = `[${citation}](${ZOTERO_BASE_URL}${item.parentItemKey})`;
|
citation = `[${citation}](${ZOTERO_BASE_URL}${item.attachmentItemKey}?annotation=${item.key})`;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.onChoose(`"${item.annotationText}" ${citation}`);
|
this.onChoose(`"${item.annotationText}" ${citation}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user