mirror of
https://github.com/tazihad/obsidian-easy-keep-view.git
synced 2026-07-22 05:49:04 +00:00
feat: add command supports
This commit is contained in:
parent
bdc6ce3541
commit
ab00e2a50f
2 changed files with 14 additions and 0 deletions
13
src/main.ts
13
src/main.ts
|
|
@ -186,6 +186,19 @@ export default class EasyKeepViewPlugin extends Plugin {
|
|||
this.activateEasyKeepView();
|
||||
});
|
||||
|
||||
// Register commands here
|
||||
this.addCommand({
|
||||
id: "open-easy-keep-view",
|
||||
name: "Open Easy Keep View",
|
||||
callback: () => this.activateEasyKeepView(),
|
||||
});
|
||||
|
||||
this.addCommand({
|
||||
id: "create-easy-keep-note",
|
||||
name: "Create New Easy Keep Note",
|
||||
callback: () => this.createNewNote(),
|
||||
});
|
||||
|
||||
// Update database on file-open
|
||||
this.registerEvent(this.app.workspace.on("file-open", async (file) => {
|
||||
if (file) {
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ export const DEFAULT_SETTINGS: EasyKeepViewPluginSettings = {
|
|||
openAsHomepage: false,
|
||||
};
|
||||
|
||||
|
||||
export class EasySettingTab extends PluginSettingTab {
|
||||
plugin: EasyKeepViewPlugin;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue