added command to open this pane

This commit is contained in:
caffae 2024-03-23 13:49:16 +08:00
parent 237cb363d3
commit 77b086e8f4

View file

@ -41,6 +41,15 @@ export default class CurrentFolderNotesDisplay extends Plugin {
this.activateView();
});
// Add a command to open the view
this.addCommand({
id: 'activate-folder-notes-display',
name: 'Open Current Folder Notes Pane',
callback: () => {
this.activateView();
}
});
// when file is changes (opened) in the editor, update the view
this.registerEvent(this.app.workspace.on('file-open', async (file) => {
// let views = this.app.workspace.getLeavesOfType(CurrentFolderNotesDisplayView);