mirror of
https://github.com/dragonwocky/obsidian-tray.git
synced 2025-04-10 14:29:03 +00:00
chore: update terminology to different between vault-level and app-level actions
This commit is contained in:
parent
fcce4935a3
commit
d37152dd4e
20
main.js
20
main.js
@ -15,11 +15,11 @@ const LOG_PREFIX = "obsidian-tray",
|
|||||||
LOG_TRAY_ICON = "creating tray icon",
|
LOG_TRAY_ICON = "creating tray icon",
|
||||||
LOG_REGISTER_HOTKEY = "registering hotkey",
|
LOG_REGISTER_HOTKEY = "registering hotkey",
|
||||||
LOG_UNREGISTER_HOTKEY = "unregistering hotkey",
|
LOG_UNREGISTER_HOTKEY = "unregistering hotkey",
|
||||||
ACTION_QUICK_NOTE = "Add Quick Note",
|
ACTION_QUICK_NOTE = "Quick Note",
|
||||||
ACTION_OPEN = "Open Obsidian",
|
ACTION_SHOW = "Show Vault",
|
||||||
ACTION_HIDE = "Hide Obsidian",
|
ACTION_HIDE = "Hide Vault",
|
||||||
ACTION_RELAUNCH = "Relaunch Obsidian",
|
ACTION_RELAUNCH = "Relaunch Obsidian",
|
||||||
ACTION_QUIT = "Quit Obsidian",
|
ACTION_CLOSE = "Close Vault",
|
||||||
DEFAULT_DATE_FORMAT = "YYYY-MM-DD",
|
DEFAULT_DATE_FORMAT = "YYYY-MM-DD",
|
||||||
ACCELERATOR_FORMAT = `
|
ACCELERATOR_FORMAT = `
|
||||||
This hotkey is registered globally and will be detected even if Obsidian does
|
This hotkey is registered globally and will be detected even if Obsidian does
|
||||||
@ -103,11 +103,11 @@ const setHideTaskbarIcon = () => {
|
|||||||
openAsHidden: runInBackground && hideOnLaunch,
|
openAsHidden: runInBackground && hideOnLaunch,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
relaunchObsidian = () => {
|
relaunchApp = () => {
|
||||||
app.relaunch();
|
app.relaunch();
|
||||||
app.exit(0);
|
app.exit(0);
|
||||||
},
|
},
|
||||||
quitObsidian = () => {
|
closeVault = () => {
|
||||||
log(LOG_CLEANUP);
|
log(LOG_CLEANUP);
|
||||||
unregisterHotkeys();
|
unregisterHotkeys();
|
||||||
allowWindowClose();
|
allowWindowClose();
|
||||||
@ -148,7 +148,7 @@ const addQuickNote = () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "normal",
|
type: "normal",
|
||||||
label: ACTION_OPEN,
|
label: ACTION_SHOW,
|
||||||
accelerator: plugin.settings.toggleWindowFocusHotkey,
|
accelerator: plugin.settings.toggleWindowFocusHotkey,
|
||||||
click: showWindows,
|
click: showWindows,
|
||||||
},
|
},
|
||||||
@ -159,8 +159,8 @@ const addQuickNote = () => {
|
|||||||
click: hideWindows,
|
click: hideWindows,
|
||||||
},
|
},
|
||||||
{ type: "separator" },
|
{ type: "separator" },
|
||||||
{ label: ACTION_RELAUNCH, click: relaunchObsidian },
|
{ label: ACTION_RELAUNCH, click: relaunchApp },
|
||||||
{ label: ACTION_QUIT, click: quitObsidian },
|
{ label: ACTION_CLOSE, click: closeVault },
|
||||||
]);
|
]);
|
||||||
tray = new Tray(obsidianIcon);
|
tray = new Tray(obsidianIcon);
|
||||||
tray.setContextMenu(contextMenu);
|
tray.setContextMenu(contextMenu);
|
||||||
@ -404,7 +404,7 @@ class TrayPlugin extends obsidian.Plugin {
|
|||||||
this.addCommand({
|
this.addCommand({
|
||||||
id: "relaunch-app",
|
id: "relaunch-app",
|
||||||
name: ACTION_RELAUNCH,
|
name: ACTION_RELAUNCH,
|
||||||
callback: relaunchObsidian,
|
callback: relaunchApp,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
onunload() {
|
onunload() {
|
||||||
|
Loading…
Reference in New Issue
Block a user