mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-15 02:26:54 -04:00
on user test request: when the recipe pane is maximised but the rec-list is empty, open the operations-dropdown on click of the recipe-list ( which holds no items )
This commit is contained in:
parent
f5f0e91d51
commit
4b030c7d61
3 changed files with 26 additions and 4 deletions
|
@ -489,6 +489,24 @@ ${navigator.userAgent}
|
|||
btn.setAttribute("data-original-title", "Maximise pane");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* If #recipe is maximised and #rec-list is empty, clicking / tapping on
|
||||
* the ( empty ) list will open #operations-dropdown to help guide users
|
||||
* with that they are supposed to do
|
||||
*/
|
||||
onMaximisedRecipeClick() {
|
||||
if (this.app.isMobileView()
|
||||
// if #recipe is maximised
|
||||
&& document.querySelector("#recipe.maximised-pane")
|
||||
// and #rec-list is empty
|
||||
&& document.querySelectorAll("#rec-list > li").length === 0 ) {
|
||||
|
||||
// close max pane and display the expanded #operations-dropdown
|
||||
this.setPaneMaximised("recipe", false);
|
||||
this.manager.ops.openOperationsDropdown();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default ControlsWaiter;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue