chore(client/ts): port doc

This commit is contained in:
Elian Doran 2025-02-02 12:59:00 +02:00
parent 2fdac9b438
commit 00bb7af5bd
No known key found for this signature in database
2 changed files with 8 additions and 3 deletions

View File

@ -39,6 +39,7 @@ interface CustomGlobals {
maxEntityChangeIdAtLoad: number;
maxEntityChangeSyncIdAtLoad: number;
assetPath: string;
appPath: string;
instanceName: string;
appCssNoteIds: string[];
triliumVersion: string;

View File

@ -1,3 +1,4 @@
import type FNote from "../../entities/fnote.js";
import TypeWidget from "./type_widget.js";
const TPL = `<div class="note-detail-doc note-detail-printable">
@ -18,6 +19,9 @@ const TPL = `<div class="note-detail-doc note-detail-printable">
</div>`;
export default class DocTypeWidget extends TypeWidget {
private $content!: JQuery<HTMLElement>;
static getType() {
return "doc";
}
@ -29,7 +33,7 @@ export default class DocTypeWidget extends TypeWidget {
super.doRender();
}
async doRefresh(note) {
async doRefresh(note: FNote) {
const docName = note.getLabelValue("docName");
if (docName) {