update
This commit is contained in:
15
main.ts
15
main.ts
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user