You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-23 22:36:32 +02:00
Chore: Refactor WebViewController (#13133)
This commit is contained in:
@@ -47,5 +47,22 @@ joplin.plugins.register({
|
||||
}));
|
||||
},
|
||||
});
|
||||
|
||||
await joplin.commands.register({
|
||||
name: 'getTestDialogVisibility',
|
||||
label: 'Returns the dialog visibility state',
|
||||
execute: async () => {
|
||||
// panels.visible should also work for dialogs.
|
||||
const visible = await joplin.views.panels.visible(dialogHandle);
|
||||
// For dialogs, isActive should return the visibility.
|
||||
// (Prefer panels.visible for dialogs).
|
||||
const active = await joplin.views.panels.isActive(dialogHandle);
|
||||
|
||||
await joplin.commands.execute('editor.setText', JSON.stringify({
|
||||
visible,
|
||||
active,
|
||||
}));
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user