mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-08-30 15:27:06 +00:00
Limit commands to applicable contexts
This commit is contained in:
@@ -454,8 +454,14 @@ export class ConfigSync extends LiveSyncCommands {
|
||||
this.services.API.addCommand({
|
||||
id: "livesync-plugin-dialog-ex",
|
||||
name: "Show customization sync dialog",
|
||||
callback: () => {
|
||||
this.showPluginSyncModal();
|
||||
checkCallback: (checking) => {
|
||||
if (!this.isThisModuleEnabled()) {
|
||||
return false;
|
||||
}
|
||||
if (!checking) {
|
||||
this.showPluginSyncModal();
|
||||
}
|
||||
return true;
|
||||
},
|
||||
});
|
||||
this.addRibbonIcon("custom-sync", $msg("cmdConfigSync.showCustomizationSync"), () => {
|
||||
|
||||
Reference in New Issue
Block a user