mirror of
https://github.com/dragonwocky/obsidian-tray.git
synced 2025-04-04 03:59:03 +00:00
Add vault window commands
Add commands for open and toggle vault
This commit is contained in:
parent
cc0baa3226
commit
20a14c9856
12
main.js
12
main.js
@ -20,6 +20,8 @@ const LOG_PREFIX = "obsidian-tray",
|
||||
ACTION_HIDE = "Hide Vault",
|
||||
ACTION_RELAUNCH = "Relaunch Obsidian",
|
||||
ACTION_CLOSE = "Close Vault",
|
||||
ACTION_OPEN = "Open Vault",
|
||||
ACTION_TOGGLE = "Toggle Vault Window"
|
||||
DEFAULT_DATE_FORMAT = "YYYY-MM-DD",
|
||||
ACCELERATOR_FORMAT = `
|
||||
This hotkey is registered globally and will be detected even if Obsidian does
|
||||
@ -473,6 +475,16 @@ class TrayPlugin extends obsidian.Plugin {
|
||||
name: ACTION_CLOSE,
|
||||
callback: closeVault,
|
||||
});
|
||||
this.addCommand({
|
||||
id: "open-vault",
|
||||
name: ACTION_OPEN,
|
||||
callback: showWindows,
|
||||
});
|
||||
this.addCommand({
|
||||
id: "toggle-vault",
|
||||
name: ACTION_TOGGLE,
|
||||
callback: toggleWindows,
|
||||
});
|
||||
}
|
||||
onunload() {
|
||||
cleanup();
|
||||
|
Loading…
Reference in New Issue
Block a user