mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 23:36:16 -04:00
Change tab element height using stylesheet.
Debounce bake button function changes.
This commit is contained in:
parent
a7eefa88fa
commit
6d95cb01c8
4 changed files with 24 additions and 25 deletions
|
@ -27,7 +27,6 @@
|
||||||
#output-wrapper{
|
#output-wrapper{
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
height: calc(100% - var(--title-height));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#output-wrapper .textarea-wrapper {
|
#output-wrapper .textarea-wrapper {
|
||||||
|
@ -154,9 +153,26 @@
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#input-wrapper,
|
||||||
|
#output-wrapper,
|
||||||
|
#input-wrapper > * ,
|
||||||
|
#output-wrapper > .textarea-wrapper > #output-loader {
|
||||||
|
height: calc(100% - var(--title-height));
|
||||||
|
}
|
||||||
|
|
||||||
|
#input-wrapper.show-tabs,
|
||||||
|
#input-wrapper.show-tabs > *,
|
||||||
|
#output-wrapper.show-tabs,
|
||||||
|
#output-wrapper > .textarea-wrapper > #output-loader {
|
||||||
|
height: calc(100% - var(--tab-height) - var(--title-height));
|
||||||
|
}
|
||||||
|
|
||||||
|
#output-wrapper > .textarea-wrapper > * {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.input-wrapper.textarea-wrapper {
|
.input-wrapper.textarea-wrapper {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100% - var(--title-height));
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
pointer-events: auto;
|
pointer-events: auto;
|
||||||
|
@ -175,7 +191,6 @@
|
||||||
left: 0;
|
left: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100% - var(--title-height));
|
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
@ -193,7 +208,6 @@
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100% - var(--title-height));
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
background-color: var(--primary-background-colour);
|
background-color: var(--primary-background-colour);
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
|
@ -232,7 +246,6 @@
|
||||||
left: 0;
|
left: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100% - var(--title-height));
|
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -314,7 +314,7 @@ class InputWaiter {
|
||||||
*/
|
*/
|
||||||
bakeAll() {
|
bakeAll() {
|
||||||
this.app.progress = 0;
|
this.app.progress = 0;
|
||||||
this.manager.controls.toggleBakeButtonFunction("loading");
|
this.app.debounce(this.manager.controls.toggleBakeButtonFunction, 20, "toggleBakeButton", this, ["loading"]);
|
||||||
this.inputWorker.postMessage({
|
this.inputWorker.postMessage({
|
||||||
action: "bakeAll"
|
action: "bakeAll"
|
||||||
});
|
});
|
||||||
|
|
|
@ -209,15 +209,8 @@ class TabWaiter {
|
||||||
document.getElementById("input-tabs-wrapper").style.display = "block";
|
document.getElementById("input-tabs-wrapper").style.display = "block";
|
||||||
document.getElementById("output-tabs-wrapper").style.display = "block";
|
document.getElementById("output-tabs-wrapper").style.display = "block";
|
||||||
|
|
||||||
document.getElementById("input-wrapper").style.height = "calc(100% - var(--tab-height) - var(--title-height))";
|
document.getElementById("input-wrapper").classList.add("show-tabs");
|
||||||
document.getElementById("input-highlighter").style.height = "calc(100% - var(--tab-height) - var(--title-height))";
|
document.getElementById("output-wrapper").classList.add("show-tabs");
|
||||||
document.getElementById("input-file").style.height = "calc(100% - var(--tab-height) - var(--title-height))";
|
|
||||||
|
|
||||||
document.getElementById("output-wrapper").style.height = "calc(100% - var(--tab-height) - var(--title-height))";
|
|
||||||
document.getElementById("output-highlighter").style.height = "calc(100% - var(--tab-height) - var(--title-height))";
|
|
||||||
document.getElementById("output-file").style.height = "calc(100% - var(--tab-height) - var(--title-height))";
|
|
||||||
document.getElementById("output-loader").style.height = "calc(100% - var(--tab-height) - var(--title-height))";
|
|
||||||
document.getElementById("show-file-overlay").style.top = "calc(var(--tab-height) + var(--title-height) + 10px)";
|
|
||||||
|
|
||||||
document.getElementById("save-all-to-file").style.display = "inline-block";
|
document.getElementById("save-all-to-file").style.display = "inline-block";
|
||||||
}
|
}
|
||||||
|
@ -229,15 +222,8 @@ class TabWaiter {
|
||||||
document.getElementById("input-tabs-wrapper").style.display = "none";
|
document.getElementById("input-tabs-wrapper").style.display = "none";
|
||||||
document.getElementById("output-tabs-wrapper").style.display = "none";
|
document.getElementById("output-tabs-wrapper").style.display = "none";
|
||||||
|
|
||||||
document.getElementById("input-wrapper").style.height = "calc(100% - var(--title-height))";
|
document.getElementById("input-wrapper").classList.remove("show-tabs");
|
||||||
document.getElementById("input-highlighter").style.height = "calc(100% - var(--title-height))";
|
document.getElementById("output-wrapper").classList.remove("show-tabs");
|
||||||
document.getElementById("input-file").style.height = "calc(100% - var(--title-height))";
|
|
||||||
|
|
||||||
document.getElementById("output-wrapper").style.height = "calc(100% - var(--title-height))";
|
|
||||||
document.getElementById("output-highlighter").style.height = "calc(100% - var(--title-height))";
|
|
||||||
document.getElementById("output-file").style.height = "calc(100% - var(--title-height))";
|
|
||||||
document.getElementById("output-loader").style.height = "calc(100% - var(--title-height))";
|
|
||||||
document.getElementById("show-file-overlay").style.top = "calc(var(--title-height) + 10px)";
|
|
||||||
|
|
||||||
document.getElementById("save-all-to-file").style.display = "none";
|
document.getElementById("save-all-to-file").style.display = "none";
|
||||||
}
|
}
|
||||||
|
|
|
@ -281,7 +281,7 @@ class WorkerWaiter {
|
||||||
*/
|
*/
|
||||||
setBakingStatus(bakingStatus) {
|
setBakingStatus(bakingStatus) {
|
||||||
this.app.baking = bakingStatus;
|
this.app.baking = bakingStatus;
|
||||||
this.manager.controls.toggleBakeButtonFunction(bakingStatus ? "cancel" : "bake");
|
this.app.debounce(this.manager.controls.toggleBakeButtonFunction, 20, "toggleBakeButton", this, [bakingStatus ? "cancel" : "bake"])();
|
||||||
|
|
||||||
if (bakingStatus) this.manager.output.hideMagicButton();
|
if (bakingStatus) this.manager.output.hideMagicButton();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue