feat(in_app_help): support webviews

This commit is contained in:
Elian Doran 2025-02-15 01:02:24 +02:00
parent 9299f90b85
commit ecb2c53c6f
No known key found for this signature in database
2 changed files with 16 additions and 1 deletions

View File

@ -44,6 +44,15 @@ function parseNoteMeta(noteMeta: NoteMeta, docNameRoot: string): HiddenSubtreeIt
for (const attribute of noteMeta.attributes ?? []) {
if (attribute.name === "iconClass") {
iconClass = attribute.value;
continue;
}
if (attribute.name === "webViewSrc") {
item.attributes?.push({
type: "label",
name: attribute.name,
value: attribute.value
});
}
}
@ -64,6 +73,11 @@ function parseNoteMeta(noteMeta: NoteMeta, docNameRoot: string): HiddenSubtreeIt
});
}
// Handle web views
if (noteMeta.type === "webView") {
item.type = "webView";
}
// Handle children
if (noteMeta.children) {
const children: HiddenSubtreeItem[] = [];

View File

@ -1,3 +1,4 @@
import type { NoteType } from "../../becca/entities/rows.js";
import type AttachmentMeta from "./attachment_meta.js";
import type AttributeMeta from "./attribute_meta.js";
@ -15,7 +16,7 @@ export default interface NoteMeta {
notePosition?: number;
prefix?: string | null;
isExpanded?: boolean;
type?: string;
type?: NoteType;
mime?: string;
/** 'html' or 'markdown', applicable to text notes only */
format?: "html" | "markdown";