This commit is contained in:
team3
2026-05-23 15:14:38 +02:00
parent f37d15cac9
commit 8d83053d9c

15
main.ts
View File

@@ -24,6 +24,21 @@ export default class ContexterPlugin extends Plugin {
callback: () => void this.activateProjectView(),
});
this.registerObsidianProtocolHandler("contexter", async (params) => {
const project = params.project;
if (!project) {
await this.activateProjectView();
return;
}
const leaf = this.app.workspace.getLeaf(false);
await leaf.setViewState({
type: VIEW_TYPE_PROJECT_DETAILS_VIEW,
active: true,
state: { project },
});
this.app.workspace.revealLeaf(leaf);
});
if (Platform.isMobile) {
const reattach = () => this.reattachMobileBreadcrumbs();
this.registerEvent(