mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
chore(client/ts): port doc
This commit is contained in:
parent
2fdac9b438
commit
00bb7af5bd
1
src/public/app/types.d.ts
vendored
1
src/public/app/types.d.ts
vendored
@ -39,6 +39,7 @@ interface CustomGlobals {
|
|||||||
maxEntityChangeIdAtLoad: number;
|
maxEntityChangeIdAtLoad: number;
|
||||||
maxEntityChangeSyncIdAtLoad: number;
|
maxEntityChangeSyncIdAtLoad: number;
|
||||||
assetPath: string;
|
assetPath: string;
|
||||||
|
appPath: string;
|
||||||
instanceName: string;
|
instanceName: string;
|
||||||
appCssNoteIds: string[];
|
appCssNoteIds: string[];
|
||||||
triliumVersion: string;
|
triliumVersion: string;
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import type FNote from "../../entities/fnote.js";
|
||||||
import TypeWidget from "./type_widget.js";
|
import TypeWidget from "./type_widget.js";
|
||||||
|
|
||||||
const TPL = `<div class="note-detail-doc note-detail-printable">
|
const TPL = `<div class="note-detail-doc note-detail-printable">
|
||||||
@ -5,7 +6,7 @@ const TPL = `<div class="note-detail-doc note-detail-printable">
|
|||||||
.note-detail-doc-content {
|
.note-detail-doc-content {
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.note-detail-doc-content pre {
|
.note-detail-doc-content pre {
|
||||||
background-color: var(--accented-background-color);
|
background-color: var(--accented-background-color);
|
||||||
border: 1px solid var(--main-border-color);
|
border: 1px solid var(--main-border-color);
|
||||||
@ -13,11 +14,14 @@ const TPL = `<div class="note-detail-doc note-detail-printable">
|
|||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="note-detail-doc-content"></div>
|
<div class="note-detail-doc-content"></div>
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
export default class DocTypeWidget extends TypeWidget {
|
export default class DocTypeWidget extends TypeWidget {
|
||||||
|
|
||||||
|
private $content!: JQuery<HTMLElement>;
|
||||||
|
|
||||||
static getType() {
|
static getType() {
|
||||||
return "doc";
|
return "doc";
|
||||||
}
|
}
|
||||||
@ -29,7 +33,7 @@ export default class DocTypeWidget extends TypeWidget {
|
|||||||
super.doRender();
|
super.doRender();
|
||||||
}
|
}
|
||||||
|
|
||||||
async doRefresh(note) {
|
async doRefresh(note: FNote) {
|
||||||
const docName = note.getLabelValue("docName");
|
const docName = note.getLabelValue("docName");
|
||||||
|
|
||||||
if (docName) {
|
if (docName) {
|
Loading…
x
Reference in New Issue
Block a user