feat(mindMap): support find

This commit is contained in:
SiriusXT
2025-05-29 23:09:52 +08:00
parent af5eab4518
commit 11b8c3425c
4 changed files with 15 additions and 4 deletions

View File

@@ -188,7 +188,7 @@ export default class FindWidget extends NoteContextAwareWidget {
return;
}
if (!["text", "code", "render"].includes(this.note?.type ?? "")) {
if (!["text", "code", "render", "mindMap"].includes(this.note?.type ?? "")) {
return;
}
@@ -250,6 +250,8 @@ export default class FindWidget extends NoteContextAwareWidget {
case "text":
const readOnly = await this.noteContext?.isReadOnly();
return readOnly ? this.htmlHandler : this.textHandler;
case "mindMap":
return this.htmlHandler;
default:
console.warn("FindWidget: Unsupported note type for find widget", this.note?.type);
}
@@ -352,7 +354,7 @@ export default class FindWidget extends NoteContextAwareWidget {
}
isEnabled() {
return super.isEnabled() && ["text", "code", "render"].includes(this.note?.type ?? "");
return super.isEnabled() && ["text", "code", "render", "mindMap"].includes(this.note?.type ?? "");
}
async entitiesReloadedEvent({ loadResults }: EventData<"entitiesReloaded">) {